From: yamaoka Date: Sun, 22 Oct 2000 22:20:54 +0000 (+0000) Subject: Synch with Gnus. X-Git-Tag: t-gnus-6_14-quimby-before-installer-changed-~46 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db282a211e6682ba10805217234737c1de544068;p=elisp%2Fgnus.git- Synch with Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 435e617..6f9f240 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,24 @@ +2000-10-21 11:23:21 ShengHuo ZHU + + * mm-util.el (mm-multibyte-p): Test (featurep 'xemacs). + +2000-10-21 10:54:57 ShengHuo ZHU + + * gnus-art.el (gnus-article-mime-total-parts): New function. + (gnus-mm-display-part): Use it. + (gnus-mime-display-single): Ditto. + (gnus-mime-display-alternative): Ditto. + +2000-10-21 09:38:27 ShengHuo ZHU + + * mailcap.el (mailcap-parse-mailcaps): Don't use parse-colon-path, + because they are files, not directories. + (mailcap-parse-mimetypes): Ditto. + +2000-10-20 19:55:59 ShengHuo ZHU + + * gnus-art.el (gnus-mime-inline-part): Check validity of charset. + 2000-10-18 Dave Love * mail-source.el (mm-util): Require. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 76289a5..6dfc62b 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -3429,9 +3429,11 @@ value of the variable `gnus-show-mime' is non-nil." (read-coding-system "Charset: "))))) (forward-line 2) (mm-insert-inline handle - (if charset - (mm-decode-coding-string - contents (mm-charset-to-coding-system charset)) + (if (and charset + (setq charset (mm-charset-to-coding-system + charset)) + (not (eq charset 'ascii))) + (mm-decode-coding-string contents charset) contents)) (goto-char b)))) @@ -3551,6 +3553,11 @@ In no internal viewer is available, use an external viewer." (when (eq (gnus-mm-display-part handle) 'internal) (gnus-set-window-start))))))) +(defsubst gnus-article-mime-total-parts () + (if (bufferp (car gnus-article-mime-handles)) + 1 ;; single part + (1- (length gnus-article-mime-handles)))) + (defun gnus-mm-display-part (handle) "Display HANDLE and fix MIME button." (let ((id (get-text-property (point) 'gnus-part)) @@ -3584,7 +3591,7 @@ In no internal viewer is available, use an external viewer." (narrow-to-region (point) (point-max)) (gnus-treat-article nil id - (1- (length gnus-article-mime-handles)) + (gnus-article-mime-total-parts) (mm-handle-media-type handle))))) (select-window window)))) (goto-char point) @@ -3772,7 +3779,8 @@ In no internal viewer is available, use an external viewer." (setq display t) (when (equal (mm-handle-media-supertype handle) "text") (setq text t))) - (let ((id (1+ (length gnus-article-mime-handle-alist)))) + (let ((id (1+ (length gnus-article-mime-handle-alist))) + beg) (push (cons id handle) gnus-article-mime-handle-alist) (when (or (not display) (not (gnus-unbuttonized-mime-type-p type))) @@ -3781,8 +3789,8 @@ In no internal viewer is available, use an external viewer." handle id (list (or display (and not-attachment text)))) (gnus-article-insert-newline) ;(gnus-article-insert-newline) - (setq move t))) - (let ((beg (point))) + (setq move t)) + (setq beg (point)) (cond (display (when move @@ -3808,8 +3816,8 @@ In no internal viewer is available, use an external viewer." (save-restriction (narrow-to-region beg (point)) (gnus-treat-article - nil (length gnus-article-mime-handle-alist) - (1- (length gnus-article-mime-handles)) + nil id + (gnus-article-mime-total-parts) (mm-handle-media-type handle))))))))) (defun gnus-unbuttonized-mime-type-p (type) @@ -3911,7 +3919,7 @@ In no internal viewer is available, use an external viewer." (narrow-to-region (car begend) (point-max)) (gnus-treat-article nil (length gnus-article-mime-handle-alist) - (1- (length gnus-article-mime-handles)) + (gnus-article-mime-total-parts) (mm-handle-media-type handle)))))) (goto-char (point-max)) (setcdr begend (point-marker))))) diff --git a/lisp/gnus-mailcap.el b/lisp/gnus-mailcap.el index b48fc26..5317eae 100644 --- a/lisp/gnus-mailcap.el +++ b/lisp/gnus-mailcap.el @@ -357,7 +357,7 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus "/usr/local/etc/mailcap")))) (let ((fnames (reverse (if (stringp path) - (parse-colon-path path) + (delete "" (split-string path path-separator)) path))) fname) (while fnames @@ -860,7 +860,7 @@ If FORCE, re-parse even if already parsed." "/usr/local/etc/mime-types" "/usr/local/www/conf/mime-types")))) (let ((fnames (reverse (if (stringp path) - (parse-colon-path path) + (delete "" (split-string path path-separator)) path))) fname) (while fnames diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 016d3a1..2b85627 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -323,7 +323,8 @@ If the charset is `composition', return the actual one." (defsubst mm-multibyte-p () "Say whether multibyte is enabled." - (if (boundp 'enable-multibyte-characters) + (if (and (not (featurep 'xemacs)) + (boundp 'enable-multibyte-characters)) enable-multibyte-characters (featurep 'mule)))