1998-11-21 Tatsuya Ichikawa <t-ichi@po.shiojiri.ne.jp>
+ * lisp/gnus.el (gnus-version-number): Update to 6.10.038.
+
+ * Sync up with Pterodactyl Gnus 0.52.
+
* lisp/pop3-fma.el (pop3-fma-init-message-hook): Change
message-send-hook to mime-edit-translate-hook - enbug.
+Sat Nov 21 09:57:01 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
+
+ * gnus.el: Pterodactyl Gnus v0.53 is released.
+
+1998-11-21 05:54:19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mm-decode.el (mm-get-image): New function.
+ (mm-image-fit-p): New function.
+
+ * gnus-xmas.el (gnus-xmas-annotation-in-region-p): Ditto.
+
+ * gnus-util.el (gnus-annotation-in-region-p): New definition.
+
+ * gnus-art.el (gnus-article-insert-newline): New function.
+ (article-goto-body): New function.
+
+1998-11-20 10:34:04 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-art.el (gnus-mime-display-single): Insert blank line before
+ buttons.
+
+ * gnus-sum.el (gnus-summary-display-buttonized): New command and
+ keystroke.
+
+ * gnus-art.el (gnus-mime-display-single): Don't insert a blank
+ line between parts.
+
+ * message.el (message-remove-header): Go to end if wanted.
+
+1998-11-20 Karl Kleinpaste <karl@justresearch.com>
+
+ * gnus-art.el (gnus-mime-display-alternative): Avoid window
+ movement with save-window-excursion.
+
+Fri Nov 20 03:50:30 1998 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-art.el (gnus-mime-inline-part): Use argument as charset.
+
+Fri Nov 20 03:37:53 1998 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-bodies.el (mm-decode-body): Remove buffer-file-coding-system.
+
+Fri Nov 20 01:20:38 1998 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): Use
+ gnus-newsgroup-coding-system.
+ (gnus-get-newsgroup-headers): Ditto.
+ (gnus-get-newsgroup-headers-xover): Ditto.
+ (gnus-set-global-variables): Ditto.
+ * gnus-art.el (article-decode-mime-words): Ditto.
+ (article-decode-charset): Ditto.
+ (article-decode-encoded-words): Ditto.
+ (article-de-quoted-unreadable): Ditto.
+ (gnus-mime-view-all-parts): Ditto.
+ (gnus-mime-externalize-part): Ditto.
+ (gnus-mm-display-part): Ditto.
+ (gnus-mime-display-alternative): Ditto.
+ (gnus-mime-display-single): Ditto.
+ * mm-view.el (mm-inline-text): Use default coding system.
+
+Fri Nov 20 00:54:37 1998 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-sum.el (gnus-newsgroup-coding-system-alist): New variable.
+ (gnus-newsgroup-iso-8859-1-forced-regexp): New variable.
+ (gnus-newsgroup-coding-system): New local variable.
+ (gnus-newsgroup-iso-8859-1-forced): New local variable.
+ (gnus-summary-local-variables): Add two new local variables.
+ (gnus-newsgroup-setup-coding-system): New function.
+ (gnus-select-newsgroup): Setup coding system.
+ * lpath.el: Add two new variables.
+ * mm-util.el (mm-charset-iso-8859-1-forced): New variable.
+ (mm-charset-to-coding-system): Use mm-charset-iso-8859-1-forced.
+ * gnus-cus.el (gnus-group-parameters): Customizable
+ iso-8859-1-forced.
+
Fri Nov 20 05:30:26 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.52 is released.
FROM is a string of characters to translate from; to is a string of
characters to translate to."
(save-excursion
- (goto-char (point-min))
- (when (search-forward "\n\n" nil t)
+ (when (article-goto-body)
(let ((buffer-read-only nil)
(x (make-string 225 ?x))
(i -1))
"Translate all string in the body of the article according to MAP.
MAP is an alist where the elements are on the form (\"from\" \"to\")."
(save-excursion
- (goto-char (point-min))
- (when (search-forward "\n\n" nil t)
+ (when (article-goto-body)
(let ((buffer-read-only nil)
elem)
(while (setq elem (pop map))
"Translate overstrikes into bold text."
(interactive)
(save-excursion
- (goto-char (point-min))
- (when (search-forward "\n\n" nil t)
+ (when (article-goto-body)
(let ((buffer-read-only nil))
(while (search-forward "\b" nil t)
(let ((next (char-after))
(save-excursion
(let ((buffer-read-only nil))
(widen)
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
+ (article-goto-body)
(end-of-line 1)
(let ((paragraph-start "^[>|#:<;* ]*[ \t]*$")
(adaptive-fill-regexp "[ \t]*\\([|#:<;>*]+ *\\)?")
(save-excursion
(set-buffer gnus-article-buffer)
(let ((inhibit-point-motion-hooks t)
- buffer-read-only)
+ buffer-read-only
+ (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(mail-decode-encoded-word-region (point-min) (point-max)))))
(defun article-decode-charset (&optional prompt)
(mm-read-coding-system "Charset to decode: "))
(ctl
(mail-content-type-get ctl 'charset))
- (gnus-newsgroup-name
- (gnus-group-find-parameter
- gnus-newsgroup-name 'charset))))
+ (t
+ gnus-newsgroup-coding-system)))
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced)
buffer-read-only)
(goto-char (point-max))
(widen)
(interactive (list 'force))
(save-excursion
(let ((buffer-read-only nil)
- (type (gnus-fetch-field "content-transfer-encoding")))
+ (type (gnus-fetch-field "content-transfer-encoding"))
+ (charset
+ (or gnus-newsgroup-coding-system mm-default-coding-system))
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(when (or force
(and type (string-match "quoted-printable" (downcase type))))
- (goto-char (point-min))
- (search-forward "\n\n" nil 'move)
+ (article-goto-body)
(save-restriction
(narrow-to-region (point) (point-max))
(quoted-printable-decode-region (point-min) (point-max))
- (when mm-default-coding-system
- (mm-decode-body mm-default-coding-system)))))))
+ (when charset
+ (mm-decode-body charset)))))))
(defun article-hide-pgp (&optional arg)
"Toggle hiding of any PGP headers and signatures in the current article.
(save-excursion
(let ((inhibit-point-motion-hooks t)
buffer-read-only)
- (goto-char (point-min))
- (when (search-forward "\n\n" nil t)
+ (when (article-goto-body)
(while (and (not (eobp))
(looking-at "[ \t]*$"))
(gnus-delete-line))))))
+(defun article-goto-body ()
+ "Place point at the start of the body."
+ (goto-char (point-min))
+ (if (search-forward "\n\n" nil t)
+ t
+ (goto-char (point-max))
+ nil))
+
(defun article-strip-multiple-blank-lines ()
"Replace consecutive blank lines with one empty line."
(interactive)
(let ((inhibit-point-motion-hooks t)
buffer-read-only)
;; First make all blank lines empty.
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
+ (article-goto-body)
(while (re-search-forward "^[ \t]+$" nil t)
(unless (gnus-annotation-in-region-p
(match-beginning 0) (match-end 0))
(replace-match "" nil t)))
;; Then replace multiple empty lines with a single empty line.
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
+ (article-goto-body)
(while (re-search-forward "\n\n\n+" nil t)
(unless (gnus-annotation-in-region-p
(match-beginning 0) (match-end 0))
(save-excursion
(let ((inhibit-point-motion-hooks t)
buffer-read-only)
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
+ (article-goto-body)
(while (re-search-forward "^[ \t]+" nil t)
(replace-match "" t t)))))
(save-excursion
(let ((inhibit-point-motion-hooks t)
buffer-read-only)
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
+ (article-goto-body)
(while (re-search-forward "^[ \t]*\n" nil t)
(replace-match "" t t)))))
(props (append '(article-type emphasis)
gnus-hidden-properties))
regexp elem beg invisible visible face)
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
+ (article-goto-body)
(setq beg (point))
(while (setq elem (pop alist))
(goto-char beg)
(save-excursion
(save-restriction
(widen)
- (goto-char (point-min))
- (when (search-forward "\n\n" nil t)
+ (when (article-goto-body)
(narrow-to-region (point) (point-max)))
(gnus-output-to-file filename))))
filename)
t)))
(gnus-set-mode-line 'article)
(gnus-configure-windows 'article)
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
+ (article-goto-body)
(set-window-point (get-buffer-window (current-buffer)) (point))
t))))))
"View all the MIME parts."
(interactive)
(gnus-article-check-buffer)
- (let ((handles gnus-article-mime-handles))
+ (let ((handles gnus-article-mime-handles)
+ (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(while handles
(mm-display-part (pop handles)))))
(normal-mode)
(goto-char (point-min))))
-(defun gnus-mime-inline-part ()
+(defun gnus-mime-inline-part (&optional charset)
"Insert the MIME part under point into the current buffer."
- (interactive)
+ (interactive "P") ; For compatible reason, not using "z".
(gnus-article-check-buffer)
(let* ((data (get-text-property (point) 'gnus-data))
(contents (mm-get-part data))
(if (mm-handle-undisplayer data)
(mm-remove-part data)
(forward-line 2)
+ (when charset
+ (unless (symbolp charset)
+ (setq charset (mm-read-coding-system "Charset: ")))
+ (setq contents (mm-decode-coding-string contents charset)))
(mm-insert-inline data contents)
(goto-char b))))
(gnus-article-check-buffer)
(let* ((handle (get-text-property (point) 'gnus-data))
(url-standalone-mode (not gnus-plugged))
- (mm-user-display-methods nil))
+ (mm-user-display-methods nil)
+ (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(if (mm-handle-undisplayer handle)
(mm-remove-part handle)
(mm-display-part handle))))
(gnus-insert-mime-button
handle id (list (not (mm-handle-displayed-p handle))))
(prog1
- (let ((window (selected-window)))
+ (let ((window (selected-window))
+ (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(save-excursion
(unwind-protect
(let ((win (get-buffer-window (current-buffer) t)))
(cdr handles)))
(unless ihandles
;; Clean up for mime parts.
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
+ (article-goto-body)
(delete-region (point) (point-max)))
(if (stringp (car handles))
(if (equal (car handles) "multipart/alternative")
(while types
(when (string-match (pop types) type)
(throw 'found t)))))))
+ (gnus-article-insert-newline)
(gnus-insert-mime-button
handle id (list (or display
- (and (not not-attachment) text))))))
- (insert "\n\n")
+ (and (not not-attachment) text))))
+ (gnus-article-insert-newline)))
+ (gnus-article-insert-newline)
(cond
(display
(forward-line -2)
- (mm-display-part handle t)
+ (let ((rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced
+ gnus-newsgroup-iso-8859-1-forced))
+ (mm-display-part handle t))
(goto-char (point-max)))
((and text not-attachment)
(forward-line -2)
- (insert "\n")
+ (gnus-article-insert-newline)
(mm-insert-inline handle (mm-get-part handle))
(goto-char (point-max))))))))
+(defun gnus-article-insert-newline ()
+ "Insert a newline, but mark it as undeletable."
+ (gnus-put-text-property
+ (point) (progn (insert "\n") (point)) 'gnus-undeletable t))
+
(defun gnus-mime-display-alternative (handles &optional preferred ibegend id)
(let* ((preferred (or preferred (mm-preferred-alternative handles)))
(ihandles handles)
(point (point))
handle buffer-read-only from props begend not-pref)
- (save-restriction
- (when ibegend
- (narrow-to-region (car ibegend) (cdr ibegend))
- (delete-region (point-min) (point-max))
- (mm-remove-parts handles))
- (setq begend (list (point-marker)))
- ;; Do the toggle.
- (unless (setq not-pref (cadr (member preferred ihandles)))
- (setq not-pref (car ihandles)))
- (gnus-add-text-properties
- (setq from (point))
- (progn
- (insert (format "%d. " id))
- (point))
- `(gnus-callback
- (lambda (handles)
- (unless ,(not ibegend)
- (setq gnus-article-mime-handle-alist
- ',gnus-article-mime-handle-alist))
- (gnus-mime-display-alternative
- ',ihandles ',not-pref ',begend ,id))
- local-map ,gnus-mime-button-map
- ,gnus-mouse-face-prop ,gnus-article-mouse-face
- face ,gnus-article-button-face
- keymap ,gnus-mime-button-map
- gnus-part ,id
- gnus-data ,handle))
- (widget-convert-button 'link from (point)
- :action 'gnus-widget-press-button
- :button-keymap gnus-widget-button-keymap)
- ;; Do the handles
- (while (setq handle (pop handles))
+ (save-window-excursion
+ (save-restriction
+ (when ibegend
+ (narrow-to-region (car ibegend) (cdr ibegend))
+ (delete-region (point-min) (point-max))
+ (mm-remove-parts handles))
+ (setq begend (list (point-marker)))
+ ;; Do the toggle.
+ (unless (setq not-pref (cadr (member preferred ihandles)))
+ (setq not-pref (car ihandles)))
(gnus-add-text-properties
(setq from (point))
(progn
- (insert (format "[%c] %-18s"
- (if (equal handle preferred) ?* ? )
- (if (stringp (car handle))
- (car handle)
- (car (mm-handle-type handle)))))
+ (insert (format "%d. " id))
(point))
`(gnus-callback
(lambda (handles)
(unless ,(not ibegend)
(setq gnus-article-mime-handle-alist
',gnus-article-mime-handle-alist))
- (gnus-mime-display-alternative ',ihandles ',handle ',begend ,id))
+ (gnus-mime-display-alternative
+ ',ihandles ',not-pref ',begend ,id))
local-map ,gnus-mime-button-map
,gnus-mouse-face-prop ,gnus-article-mouse-face
face ,gnus-article-button-face
(widget-convert-button 'link from (point)
:action 'gnus-widget-press-button
:button-keymap gnus-widget-button-keymap)
- (insert " "))
- (insert "\n\n")
- (when preferred
- (if (stringp (car preferred))
- (gnus-display-mime preferred)
- (mm-display-part preferred)
- (goto-char (point-max)))
- (setcdr begend (point-marker))))
+ ;; Do the handles
+ (while (setq handle (pop handles))
+ (gnus-add-text-properties
+ (setq from (point))
+ (progn
+ (insert (format "[%c] %-18s"
+ (if (equal handle preferred) ?* ? )
+ (if (stringp (car handle))
+ (car handle)
+ (car (mm-handle-type handle)))))
+ (point))
+ `(gnus-callback
+ (lambda (handles)
+ (unless ,(not ibegend)
+ (setq gnus-article-mime-handle-alist
+ ',gnus-article-mime-handle-alist))
+ (gnus-mime-display-alternative
+ ',ihandles ',handle ',begend ,id))
+ local-map ,gnus-mime-button-map
+ ,gnus-mouse-face-prop ,gnus-article-mouse-face
+ face ,gnus-article-button-face
+ keymap ,gnus-mime-button-map
+ gnus-part ,id
+ gnus-data ,handle))
+ (widget-convert-button 'link from (point)
+ :action 'gnus-widget-press-button
+ :button-keymap gnus-widget-button-keymap)
+ (insert " "))
+ (insert "\n\n")
+ (when preferred
+ (if (stringp (car preferred))
+ (gnus-display-mime preferred)
+ (let ((rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced
+ gnus-newsgroup-iso-8859-1-forced))
+ (mm-display-part preferred)))
+ (goto-char (point-max))
+ (setcdr begend (point-marker)))))
(when ibegend
(goto-char point))))
(save-excursion
(save-restriction
(widen)
- (goto-char (point-min))
- (when (search-forward "\n\n" nil 1)
+ (when (article-goto-body)
(let ((lines (count-lines (point) (point-max)))
(length (- (point-max) (point)))
(case-fold-search t)
'gnus-callback nil))
(set-marker marker nil)))
;; We skip the headers.
- (goto-char (point-min))
- (unless (search-forward "\n\n" nil t)
- (goto-char (point-max)))
+ (article-goto-body)
(setq beg (point))
(while (setq entry (pop alist))
(setq regexp (car entry))
(charset (string :tag "Charset") "\
The default charset to use in the group.")
+
+ (iso-8859-1-forced (const :tag "Force ISO 8859-1 to default charset"
+ t)"\
+Force ISO 8859-1 to default charset in the group.")
)
"Alist of valid group parameters.
:group 'gnus-summary
:type 'regexp)
+(defcustom gnus-newsgroup-coding-system-alist
+ '(("^hk\\>\\|^tw\\>\\|\\<big5\\>" . cn-big5)
+ ("^cn\\>\\|\\<chinese\\>" . cn-gb-2312)
+ ("^fj\\>" . iso-2022-jp-2)
+ ("^relcom\\>" . koi8-r))
+ "Alist of Regexps (to match group names) and CODING-SYSTEMs to be applied."
+ :type '(repeat (cons (regexp :tag "Group")
+ (symbol :tag "Charset")))
+ :group 'gnus)
+
+(defcustom gnus-newsgroup-iso-8859-1-forced-regexp
+ "^tw\\>\\|^hk\\>\\|^cn\\>\\|\\<chinese\\>"
+ "Regexp of newsgroup in which ISO-8859-1 is forced to other charset."
+ :type 'regexp
+ :group 'gnus)
+
;;; Internal variables
(defvar gnus-scores-exclude-files nil)
(defvar gnus-last-article nil)
(defvar gnus-newsgroup-history nil)
+(defvar gnus-newsgroup-coding-system nil)
+(defvar gnus-newsgroup-iso-8859-1-forced nil)
+
(defconst gnus-summary-local-variables
'(gnus-newsgroup-name
gnus-newsgroup-begin gnus-newsgroup-end
(gnus-newsgroup-expunged-tally . 0)
gnus-cache-removable-articles gnus-newsgroup-cached
gnus-newsgroup-data gnus-newsgroup-data-reverse
- gnus-newsgroup-limit gnus-newsgroup-limits)
+ gnus-newsgroup-limit gnus-newsgroup-limits
+ gnus-newsgroup-coding-system gnus-newsgroup-iso-8859-1-forced)
"Variables that are buffer-local to the summary buffers.")
;; Byte-compiler warning.
"h" gnus-summary-save-article-folder
"v" gnus-summary-save-article-vm
"p" gnus-summary-pipe-output
- "s" gnus-soup-add-article))
+ "s" gnus-soup-add-article)
+
+ (gnus-define-keys (gnus-summary-mime-map "K" gnus-summary-mode-map)
+ "b" gnus-summary-display-buttonized)
+ )
(defun gnus-summary-make-menu-bar ()
(gnus-turn-off-edit-menu 'summary)
(original gnus-original-article-buffer)
(gac gnus-article-current)
(reffed gnus-reffed-article-number)
- (score-file gnus-current-score-file))
+ (score-file gnus-current-score-file)
+ (coding-system gnus-newsgroup-coding-system)
+ (iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(save-excursion
(set-buffer gnus-group-buffer)
(setq gnus-newsgroup-name name
gnus-article-buffer article-buffer
gnus-original-article-buffer original
gnus-reffed-article-number reffed
- gnus-current-score-file score-file)
+ gnus-current-score-file score-file
+ gnus-newsgroup-coding-system coding-system
+ gnus-newsgroup-iso-8859-1-forced iso-8859-1-forced)
;; The article buffer also has local variables.
(when (gnus-buffer-live-p gnus-article-buffer)
(set-buffer gnus-article-buffer)
(defun gnus-summary-from-or-to-or-newsgroups (header)
(let ((to (cdr (assq 'To (mail-header-extra header))))
- (newsgroups (cdr (assq 'Newsgroups (mail-header-extra header)))))
+ (newsgroups (cdr (assq 'Newsgroups (mail-header-extra header))))
+ (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(cond
((and to
gnus-ignored-from-addresses
(or dependencies
(save-excursion (set-buffer gnus-summary-buffer)
gnus-newsgroup-dependencies)))
- headers id end ref)
+ headers id end ref
+ (rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
(save-excursion
(set-buffer nntp-server-buffer)
;; Translate all TAB characters into SPACE characters.
;; Get the Xref when the users reads the articles since most/some
;; NNTP servers do not include Xrefs when using XOVER.
(setq gnus-article-internal-prepare-hook '(gnus-article-get-xrefs))
- (let ((cur nntp-server-buffer)
+ (let ((rfc2047-default-charset gnus-newsgroup-coding-system)
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced)
+ (cur nntp-server-buffer)
(dependencies (or dependencies gnus-newsgroup-dependencies))
number headers header)
(save-excursion
;;; @ end
;;;
+(defun gnus-newsgroup-setup-coding-system ()
+ "Setup newsgroup default coding system."
+ (setq gnus-newsgroup-coding-system
+ (or (and gnus-newsgroup-name
+ (or (gnus-group-find-parameter
+ gnus-newsgroup-name 'charset)
+ (let ((alist gnus-newsgroup-coding-system-alist)
+ elem (charset nil))
+ (while alist
+ (if (string-match
+ (car (setq elem (pop alist)))
+ gnus-newsgroup-name)
+ (setq alist nil
+ charset (cdr elem))))
+ charset)))
+ rfc2047-default-charset))
+ (setq gnus-newsgroup-iso-8859-1-forced
+ (and gnus-newsgroup-name
+ (or (gnus-group-find-parameter
+ gnus-newsgroup-name 'iso-8859-1-forced)
+ (string-match gnus-newsgroup-iso-8859-1-forced-regexp
+ gnus-newsgroup-name))))
+ (if (stringp gnus-newsgroup-coding-system)
+ (setq gnus-newsgroup-coding-system
+ (intern (downcase gnus-newsgroup-coding-system))))
+ (setq gnus-newsgroup-iso-8859-1-forced
+ (if (stringp gnus-newsgroup-iso-8859-1-forced)
+ (intern (downcase gnus-newsgroup-iso-8859-1-forced))
+ (and gnus-newsgroup-iso-8859-1-forced
+ gnus-newsgroup-coding-system))))
+
+;;;
+;;; MIME Commands
+;;;
+
+(defun gnus-summary-display-buttonized (&optional arg)
+ "Display the current buffer fully MIME-buttonized."
+ (interactive "P")
+ (require 'gnus-art)
+ (let ((gnus-unbuttonized-mime-types nil))
+ (gnus-summary-show-article arg)))
+
(gnus-ems-redefine)
(provide 'gnus-sum)
(when win
(set-window-start win (or point (point))))))
+(defun gnus-annotation-in-region-p (b e)
+ (if (= b e)
+ (eq (cadr (memq 'gnus-undeletable (text-properties-at b))) t)
+ (text-property-any b e 'gnus-undeletable t)))
+
(provide 'gnus-util)
;;; gnus-util.el ends here
(gnus-splash)))
(defun gnus-xmas-annotation-in-region-p (b e)
- (map-extents (lambda (e u) t) nil b e nil nil 'mm t))
+ (or (map-extents (lambda (e u) t) nil b e nil nil 'mm t)
+ (if (= b e)
+ (eq (cadr (memq 'gnus-undeletable (text-properties-at b))) t)
+ (text-property-any b e 'gnus-undeletable t))))
(defun gnus-xmas-mime-button-menu (event)
"Construct a context-sensitive menu of MIME commands."
(defconst gnus-product-name "T-gnus"
"Product name of this version of gnus.")
-(defconst gnus-version-number "6.10.038"
+(defconst gnus-version-number "6.10.039"
"Version number for this version of gnus.")
-(defconst gnus-original-version-number "0.52"
+(defconst gnus-original-version-number "0.53"
"Version number for this version of Gnus.")
(defconst gnus-original-product-name "Pterodactyl Gnus"
(defalias 'gnus-deactivate-mark 'deactivate-mark)
(defalias 'gnus-window-edges 'window-edges)
(defalias 'gnus-key-press-event-p 'numberp)
- (defalias 'gnus-annotation-in-region-p 'ignore)
(defalias 'gnus-decode-rfc1522 'ignore))
;; We define these group faces here to avoid the display
mouse-selection-click-count-buffer buffer-display-table
font-lock-defaults user-full-name user-login-name
gnus-newsgroup-name gnus-article-x-face-too-ugly
+ gnus-newsgroup-coding-system
+ gnus-newsgroup-iso-8859-1-forced
mail-mode-hook enable-multibyte-characters
adaptive-fill-first-line-regexp adaptive-fill-regexp
url-current-mime-headers buffer-file-coding-system)))
(forward-line 1)
(if (re-search-forward "^[^ \t]" nil t)
(goto-char (match-beginning 0))
- (point-max))))
+ (goto-char (point-max)))))
number))
(defun message-narrow-to-headers ()
(let (mule-charset)
(when (and charset
(setq mule-charset (mm-charset-to-coding-system charset))
- buffer-file-coding-system
+ ;; buffer-file-coding-system
+ ;Article buffer is nil coding system
+ ;in XEmacs
enable-multibyte-characters
(or (not (eq mule-charset 'ascii))
(setq mule-charset rfc2047-default-charset)))
`(nth 5 ,handle))
(defvar mm-inline-media-tests
- '(("image/jpeg" mm-inline-image (featurep 'jpeg))
- ("image/png" mm-inline-image (featurep 'png))
- ("image/gif" mm-inline-image (featurep 'gif))
- ("image/tiff" mm-inline-image (featurep 'tiff))
+ '(("image/jpeg" mm-inline-image
+ (and (featurep 'jpeg) (mm-image-fit-p handle)))
+ ("image/png" mm-inline-image
+ (and (featurep 'png) (mm-image-fit-p handle)))
+ ("image/gif" mm-inline-image
+ (and (featurep 'gif) (mm-image-fit-p handle)))
+ ("image/tiff" mm-inline-image
+ (and (featurep 'tiff) (mm-image-fit-p handle)))
("image/xbm" mm-inline-image (and (fboundp 'device-type)
(eq (device-type) 'x)))
("image/xpm" mm-inline-image (featurep 'xpm))
"Return the handle(s) referred to by ID."
(cdr (assoc id mm-content-id-alist)))
+(defun mm-get-image (handle)
+ "Return an image instance based on HANDLE."
+ (let ((type (cadr (split-string (car (mm-handle-type handle)) "/"))))
+ (mm-with-unibyte-buffer
+ (insert-buffer-substring (mm-handle-buffer handle))
+ (mm-decode-content-transfer-encoding
+ (mm-handle-encoding handle)
+ (car (mm-handle-type handle)))
+ (make-image-specifier
+ (vector (intern type) :data (buffer-string))))))
+
+(defun mm-image-fit-p (handle)
+ "Say whether the image in HANDLE will fit the current window."
+ (or t
+ (let ((image (make-image-instance (mm-get-image handle))))
+ (and (< (image-instance-width image)
+ (window-pixel-width))
+ (< (image-instance-height image)
+ (window-pixel-height))))))
+
(provide 'mm-decode)
;; mm-decode.el ends here
dest)
"Charset/coding system alist.")
+;;;Internal variable
+(defvar mm-charset-iso-8859-1-forced nil)
+
(defun mm-mule-charset-to-mime-charset (charset)
"Return the MIME charset corresponding to MULE CHARSET."
(let ((alist mm-mime-mule-charset-alist)
used as the line break code type of the coding system."
(when (stringp charset)
(setq charset (intern (downcase charset))))
+ (if (and mm-charset-iso-8859-1-forced
+ (eq charset 'iso-8859-1))
+ (setq charset mm-charset-iso-8859-1-forced))
(setq charset
(or (cdr (assq charset mm-charset-coding-system-alist))
charset))
;;;
(defun mm-inline-image (handle)
- (let ((type (cadr (split-string (car (mm-handle-type handle)) "/")))
- buffer-read-only image)
- (mm-with-unibyte-buffer
- (insert-buffer-substring (mm-handle-buffer handle))
- (mm-decode-content-transfer-encoding
- (mm-handle-encoding handle)
- (car (mm-handle-type handle)))
- (setq image (make-image-specifier
- (vector (intern type) :data (buffer-string)))))
- (let ((annot (make-annotation image nil 'text)))
- (mm-insert-inline handle ".\n")
- (set-extent-property annot 'mm t)
- (set-extent-property annot 'duplicable t))))
+ (let ((annot (make-annotation (mm-get-image handle) nil 'text))
+ buffer-read-only)
+ (mm-insert-inline handle ".\n")
+ (set-extent-property annot 'mm t)
+ (set-extent-property annot 'duplicable t)))
(defun mm-inline-text (handle)
(let ((type (cadr (split-string (car (mm-handle-type handle)) "/")))
(narrow-to-region b (point))
(let ((charset (mail-content-type-get
(mm-handle-type handle) 'charset)))
- (when charset
- (mm-decode-body charset nil)))
+ (mm-decode-body charset nil))
(mm-handle-set-undisplayer
handle
`(lambda ()
\input texinfo @c -*-texinfo-*-
@setfilename gnus-ja
-@settitle Semi-gnus 6.10.038 Manual
+@settitle Semi-gnus 6.10.039 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Semi-gnus 6.10.038 Manual
+@title Semi-gnus 6.10.039 Manual
@author by Lars Magne Ingebrigtsen
@author by members of Semi-gnus mailing-list
\e$B$J8@8l7w$r:9JL$7$^$;$s!#$"$"!"%/%j%s%4%s$NJ}$O\e(B Unicode Next Generation\e$B$r\e(B
\e$B$*BT$A$/$@$5$$!#\e(B
-\e$B$3$N@bL@=q$O\e(B Semi-gnus 6.10.038 \e$B$KBP1~$7$^$9!#\e(B
+\e$B$3$N@bL@=q$O\e(B Semi-gnus 6.10.039 \e$B$KBP1~$7$^$9!#\e(B
@end ifinfo
\input texinfo @c -*-texinfo-*-
@setfilename gnus
-@settitle Semi-gnus 6.10.038 Manual
+@settitle Semi-gnus 6.10.039 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Semi-gnus 6.10.038 Manual
+@title Semi-gnus 6.10.039 Manual
@author by Lars Magne Ingebrigtsen
@page
API. So Semi-gnus does not discriminate various language communities.
Oh, if you are a Klingon, please wait Unicode Next Generation.
-This manual corresponds to Semi-gnus 6.10.038.
+This manual corresponds to Semi-gnus 6.10.039.
@end ifinfo
\input texinfo @c -*-texinfo-*-
@setfilename message-ja
-@settitle Message 6.10.038 Manual
+@settitle Message 6.10.039 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Message 6.10.038 Manual
+@title Message 6.10.039 Manual
@author by Lars Magne Ingebrigtsen
@translated by members of Semi-gnus mailing-list
* Key Index:: \e$B%a%C%;!<%8%b!<%I%-!<$N0lMw!#\e(B
@end menu
-\e$B$3$N%^%K%e%"%k$O\e(B Message 6.10.038 \e$B$KBP1~$7$^$9!#\e(BMessage \e$B$O$3$N%^%K%e%"%k$H\e(B
+\e$B$3$N%^%K%e%"%k$O\e(B Message 6.10.039 \e$B$KBP1~$7$^$9!#\e(BMessage \e$B$O$3$N%^%K%e%"%k$H\e(B
\e$BF1$8HGHV9f$N\e(B Gnus \e$B$NG[I[$H6&$KG[I[$5$l$^$9!#\e(B
\input texinfo @c -*-texinfo-*-
@setfilename message
-@settitle Message 6.10.038 Manual
+@settitle Message 6.10.039 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Message 6.10.038 Manual
+@title Message 6.10.039 Manual
@author by Lars Magne Ingebrigtsen
@page
* Key Index:: List of Message mode keys.
@end menu
-This manual corresponds to Message 6.10.038. Message is
+This manual corresponds to Message 6.10.039. Message is
distributed with the Gnus distribution bearing the same version number
as this manual.