From: yamaoka Date: Mon, 28 Jun 1999 23:32:04 +0000 (+0000) Subject: Sync up with Pterodactyl Gnus v0.89. X-Git-Tag: et-gnus-6_11_04-00~3 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65d414e1286c7054c7475796080e3d29d2f372f6;p=elisp%2Fgnus.git- Sync up with Pterodactyl Gnus v0.89. --- diff --git a/aclocal.m4 b/aclocal.m4 index a83ab59..c37987d 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -4,7 +4,7 @@ AC_DEFUN(AM_PATH_LISPDIR, [# If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test "$EMACS" = t && EMACS= - AC_PATH_PROG(EMACS, emacs xemacs, no) + AC_PATH_PROGS(EMACS, emacs xemacs, no) if test $EMACS != "no"; then AC_MSG_CHECKING([where .elc files should go]) dnl Set default value diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d27d230..b807b2d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,67 @@ +Mon Jun 28 17:54:01 1999 Lars Magne Ingebrigtsen + + * gnus.el: Pterodactyl Gnus v0.89 is released. + +1999-06-24 Shenghuo ZHU + + * nnmail.el (nnmail-file-coding-system-1): For NTEmacs in Windows. + * message.el (message-draft-coding-system): Ditto. + * mm-util.el (mm-running-ntemacs): Ditto. + +1999-06-23 Shenghuo ZHU + + * gnus-xmas.el (gnus-xmas-summary-recenter): A blank line may + cause problem. + +1999-06-23 Shenghuo ZHU + + * mm-view.el (mm-inline-text): Ignore error in w3-region. + +1999-06-23 Shenghuo ZHU + + * mml.el: require mm-decode. + +1999-06-23 Shenghuo ZHU + + * gnus-art.el (gnus-display-mime): Treat as head only if necessary. + +1999-06-23 Shenghuo ZHU + + * mm-view.el (mm-inline-image): Fix image undisplayer. + +1999-06-22 Shenghuo ZHU + + * mml.el (mml-insert-multipart): Error in compeling-read. + (mml-insert-tag): Match tags. + +1999-06-19 Shenghuo ZHU + + * gnus-cache.el (gnus-cache-braid-nov): Fix coding-system bug. + (gnus-cache-braid-heads): Ditto. + (gnus-cache-retrieve-headers): Ditto. + +1999-06-16 Shenghuo ZHU + + * gnus-draft.el (gnus-draft-send): Fix encoding bug. + +1999-06-16 10:17:29 Katsumi Yamaoka + + * gnus-art.el (gnus-article-read-summary-keys): Convert key events + to string under XEmacs. + +1999-06-28 19:34:03 Petersen Jens-Ulrik + + * gnus-start.el (gnus-find-new-newsgroups): Doc fix. + +1999-06-22 Shenghuo ZHU + + * mm-view.el (mm-inline-message): Fix message view bug. + * gnus-art.el (gnus-article-prepare): Ditto. + +1999-06-16 Shenghuo ZHU + + * gnus-cache.el (gnus-cache-possibly-enter-article): Fetch headers. + Tue Jun 15 04:13:01 1999 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.88 is released. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 8a2b2b6..4490032 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1513,7 +1513,10 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (set-buffer gnus-article-buffer) (let ((inhibit-point-motion-hooks t) buffer-read-only - (mail-parse-charset gnus-newsgroup-charset)) + (mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets + (save-excursion (set-buffer gnus-summary-buffer) + gnus-newsgroup-ignored-charsets))) (mail-decode-encoded-word-region (point-min) (point-max))))) (defun article-decode-charset (&optional prompt) @@ -1535,9 +1538,10 @@ If PROMPT (the prefix), prompt for a coding system to use." (ctl (mail-content-type-get ctl 'charset)))) (mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets + (save-excursion (set-buffer gnus-summary-buffer) + gnus-newsgroup-ignored-charsets)) buffer-read-only) - (when (memq charset gnus-newsgroup-ignored-charsets) - (setq charset nil)) (goto-char (point-max)) (widen) (forward-line 1) @@ -3094,7 +3098,10 @@ Type any key: " (save-current-buffer (set-buffer gnus-article-buffer) (let ((handles (or handles gnus-article-mime-handles)) - (mail-parse-charset gnus-newsgroup-charset)) + (mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets + (save-excursion (set-buffer gnus-summary-buffer) + gnus-newsgroup-ignored-charsets))) (if (stringp (car handles)) (gnus-mime-view-all-parts (cdr handles)) (mapcar 'mm-display-part handles))))) @@ -3165,7 +3172,10 @@ Type any key: " (let* ((handle (or handle (get-text-property (point) 'gnus-data))) (mm-user-display-methods nil) (mm-all-images-fit t) - (mail-parse-charset gnus-newsgroup-charset)) + (mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets + (save-excursion (set-buffer gnus-summary-buffer) + gnus-newsgroup-ignored-charsets))) (if (mm-handle-undisplayer handle) (mm-remove-part handle) (mm-display-part handle)))) @@ -3177,7 +3187,10 @@ Type any key: " (let* ((handle (or handle (get-text-property (point) 'gnus-data))) (mm-user-display-methods '((".*" . inline))) (mm-all-images-fit t) - (mail-parse-charset gnus-newsgroup-charset)) + (mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets + (save-excursion (set-buffer gnus-summary-buffer) + gnus-newsgroup-ignored-charsets))) (if (mm-handle-undisplayer handle) (mm-remove-part handle) (mm-display-part handle)))) @@ -3243,7 +3256,10 @@ Type any key: " (forward-line 1) (prog1 (let ((window (selected-window)) - (mail-parse-charset gnus-newsgroup-charset)) + (mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets + (save-excursion (set-buffer gnus-summary-buffer) + gnus-newsgroup-ignored-charsets))) (save-excursion (unwind-protect (let ((win (get-buffer-window (current-buffer) t)) @@ -3355,9 +3371,10 @@ Type any key: " (when (and (not ihandles) (not gnus-displaying-mime)) ;; Top-level call; we clean up. - (mm-destroy-parts gnus-article-mime-handles) - (setq gnus-article-mime-handles handles - gnus-article-mime-handle-alist nil) + (when gnus-article-mime-handles + (mm-destroy-parts gnus-article-mime-handles) + (setq gnus-article-mime-handle-alist nil)) ;; A trick. + (setq gnus-article-mime-handles handles) ;; We allow users to glean info from the handles. (when gnus-article-mime-part-function (gnus-mime-part-function handles))) @@ -3377,12 +3394,13 @@ Type any key: " (narrow-to-region (point) (point-max)) (gnus-treat-article nil 1 1) (widen))) - ;; Highlight the headers. - (save-excursion - (save-restriction - (article-goto-body) - (narrow-to-region (point-min) (point)) - (gnus-treat-article 'head))))))) + (if (not ihandles) + ;; Highlight the headers. + (save-excursion + (save-restriction + (article-goto-body) + (narrow-to-region (point-min) (point)) + (gnus-treat-article 'head)))))))) (defvar gnus-mime-display-multipart-as-mixed nil) @@ -3457,7 +3475,10 @@ Type any key: " (display (when move (forward-line -2)) - (let ((mail-parse-charset gnus-newsgroup-charset)) + (let ((mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets + (save-excursion (set-buffer gnus-summary-buffer) + gnus-newsgroup-ignored-charsets))) (mm-display-part handle t)) (goto-char (point-max))) ((and text not-attachment) @@ -3565,7 +3586,10 @@ Type any key: " (when preferred (if (stringp (car preferred)) (gnus-display-mime preferred) - (let ((mail-parse-charset gnus-newsgroup-charset)) + (let ((mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets + (save-excursion (set-buffer gnus-summary-buffer) + gnus-newsgroup-ignored-charsets))) (mm-display-part preferred))) (goto-char (point-max)) (setcdr begend (point-marker))))) diff --git a/lisp/gnus-cache.el b/lisp/gnus-cache.el index 97d660c..99bc5d9 100644 --- a/lisp/gnus-cache.el +++ b/lisp/gnus-cache.el @@ -184,6 +184,8 @@ it's not cached." (when (> (buffer-size) 0) (gnus-write-buffer-as-coding-system gnus-cache-write-file-coding-system file) + (setq headers (nnheader-parse-head t)) + (mail-header-set-number headers number) (gnus-cache-change-buffer group) (set-buffer (cdr gnus-cache-buffer)) (goto-char (point-max)) @@ -306,7 +308,9 @@ it's not cached." ;; unsuccessful), so we use the cached headers exclusively. (set-buffer nntp-server-buffer) (erase-buffer) - (nnheader-insert-file-contents cache-file) + (let ((nnheader-file-coding-system + gnus-cache-overview-coding-system)) + (nnheader-insert-file-contents cache-file)) 'nov) ((eq type 'nov) ;; We have both cached and uncached NOV headers, so we @@ -542,7 +546,9 @@ Returns the list of articles removed." (save-excursion (set-buffer cache-buf) (erase-buffer) - (nnheader-insert-file-contents (or file (gnus-cache-file-name group ".overview"))) + (let ((nnheader-file-coding-system gnus-cache-overview-coding-system)) + (nnheader-insert-file-contents + (or file (gnus-cache-file-name group ".overview")))) (goto-char (point-min)) (insert "\n") (goto-char (point-min))) @@ -584,7 +590,9 @@ Returns the list of articles removed." (save-excursion (set-buffer cache-buf) (erase-buffer) - (nnheader-insert-file-contents (gnus-cache-file-name group (car cached))) + (let ((nnheader-file-coding-system gnus-cache-coding-system)) + (nnheader-insert-file-contents + (gnus-cache-file-name group (car cached)))) (goto-char (point-min)) (insert "220 ") (princ (car cached) (current-buffer)) diff --git a/lisp/gnus-cus.el b/lisp/gnus-cus.el index ee9f042..71c36af 100644 --- a/lisp/gnus-cus.el +++ b/lisp/gnus-cus.el @@ -170,6 +170,15 @@ in it..") (charset (symbol :tag "Charset") "\ The default charset to use in the group.") + (ignored-charsets + (choice :tag "Ignored charsets" + :value nil + (repeat (symbol))) "\ +List of charsets that should be ignored. + +When these charsets are used in the \"charset\" parameter, the +default charset will be used instead.") + (highlight-words (choice :tag "Highlight words" :value nil diff --git a/lisp/gnus-draft.el b/lisp/gnus-draft.el index dbdcf09..a917ea5 100644 --- a/lisp/gnus-draft.el +++ b/lisp/gnus-draft.el @@ -125,8 +125,12 @@ (gnus-draft-setup-for-sending article (or group "nndraft:queue")) (let ((message-syntax-checks (if interactive nil 'dont-check-for-anything-just-trust-me)) - (message-inhibit-body-encoding t) - message-send-hook type method) + (message-inhibit-body-encoding (or (not group) + (equal group "nndraft:queue") + message-inhibit-body-encoding)) + (message-send-hook (and group (not (equal group "nndraft:queue")) + message-send-hook)) + type method) ;; We read the meta-information that says how and where ;; this message is to be sent. (save-restriction diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index ddd5d12..ff75518 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -954,7 +954,7 @@ If LEVEL is non-nil, the news will be set up at level LEVEL." (defun gnus-find-new-newsgroups (&optional arg) "Search for new newsgroups and add them. -Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method.' +Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method'. The `-n' option line from .newsrc is respected. With 1 C-u, use the `ask-server' method to query the server for new diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 7ff3cb9..02b6399 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -845,6 +845,15 @@ default charset will be used instead." :type '(repeat symbol) :group 'gnus-charset) +(defcustom gnus-group-ignored-charsets-alist + '(("alt\\.chinese\\.text" iso-8859-1)) + "Alist of regexps (to match group names) and charsets that should be ignored. +When these charsets are used in the \"charset\" parameter, the +default charset will be used instead." + :type '(repeat (cons (regexp :tag "Group") + (repeat symbol))) + :group 'gnus-charset) + (defcustom gnus-group-highlight-words-alist nil "Alist of group regexps and highlight regexps. This variable uses the same syntax as `gnus-emphasis-alist'." @@ -1519,6 +1528,7 @@ increase the score of each group you read." "\M-\C-e" gnus-summary-expire-articles-now "\177" gnus-summary-delete-article [delete] gnus-summary-delete-article + [backspace] gnus-summary-delete-article "m" gnus-summary-move-article "r" gnus-summary-respool-article "w" gnus-summary-edit-article @@ -2504,7 +2514,10 @@ marks of articles." (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)))) - (mail-parse-charset gnus-newsgroup-charset)) + (mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets + (save-excursion (set-buffer gnus-summary-buffer) + gnus-newsgroup-ignored-charsets))) (cond ((and to gnus-ignored-from-addresses @@ -4546,7 +4559,10 @@ The resulting hash table is returned, or nil if no Xrefs were found." (save-excursion (set-buffer gnus-summary-buffer) gnus-newsgroup-dependencies))) headers id end ref - (mail-parse-charset gnus-newsgroup-charset)) + (mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets + (save-excursion (set-buffer gnus-summary-buffer) + gnus-newsgroup-ignored-charsets))) (save-excursion (set-buffer nntp-server-buffer) ;; Translate all TAB characters into SPACE characters. @@ -4709,6 +4725,7 @@ list of headers that match SEQUENCE (see `nntp-retrieve-headers')." ;; NNTP servers do not include Xrefs when using XOVER. (setq gnus-article-internal-prepare-hook '(gnus-article-get-xrefs)) (let ((mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets) (cur nntp-server-buffer) (dependencies (or dependencies gnus-newsgroup-dependencies)) number headers header) @@ -7571,9 +7588,10 @@ This will have permanent effect only in mail groups. If FORCE is non-nil, allow editing of articles even in read-only groups." (interactive "P") - (let ((mail-parse-charset gnus-newsgroup-charset)) - (save-excursion - (set-buffer gnus-summary-buffer) + (save-excursion + (set-buffer gnus-summary-buffer) + (let ((mail-parse-charset gnus-newsgroup-charset) + (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets)) (gnus-set-global-variables) (when (and (not force) (gnus-group-read-only-p)) @@ -7582,7 +7600,9 @@ groups." (gnus-article-edit-article 'ignore `(lambda (no-highlight) - (let ((mail-parse-charset ',gnus-newsgroup-charset)) + (let ((mail-parse-charset ',gnus-newsgroup-charset) + (mail-parse-ignored-charsets + ',gnus-newsgroup-ignored-charsets)) (gnus-summary-edit-article-done ,(or (mail-header-references gnus-current-headers) "") ,(gnus-group-read-only-p) ,gnus-summary-buffer no-highlight))))))) @@ -9399,8 +9419,22 @@ If REVERSE, save parts that do not match TYPE." (defun gnus-summary-setup-default-charset () "Setup newsgroup default charset." - (let ((name (and gnus-newsgroup-name - (gnus-group-real-name gnus-newsgroup-name)))) + (let* ((name (and gnus-newsgroup-name + (gnus-group-real-name gnus-newsgroup-name))) + (ignored-charsets + (append + (and gnus-newsgroup-name + (or (gnus-group-find-parameter gnus-newsgroup-name + 'ignored-charsets t) + (let ((alist gnus-group-ignored-charsets-alist) + elem (charsets nil)) + (while (setq elem (pop alist)) + (when (and name + (string-match (car elem) name)) + (setq alist nil + charsets (cdr elem)))) + charsets))) + gnus-newsgroup-ignored-charsets))) (setq gnus-newsgroup-charset (or (and gnus-newsgroup-name (or (gnus-group-find-parameter gnus-newsgroup-name @@ -9413,7 +9447,9 @@ If REVERSE, save parts that do not match TYPE." (setq alist nil charset (cadr elem)))) charset))) - gnus-default-charset)))) + gnus-default-charset)) + (set (make-local-variable 'gnus-newsgroup-ignored-charsets) + ignored-charsets))) ;;; ;;; Mime Commands diff --git a/lisp/gnus-xmas.el b/lisp/gnus-xmas.el index 7e65c43..5e9a7ad 100644 --- a/lisp/gnus-xmas.el +++ b/lisp/gnus-xmas.el @@ -178,7 +178,7 @@ displayed, no centering will be performed." (sit-for 0)) (when gnus-auto-center-summary (let* ((height (if (fboundp 'window-displayed-height) - (window-displayed-height) + (1- (window-displayed-height)) (- (window-height) 2))) (top (cond ((< height 4) 0) ((< height 7) 1) diff --git a/lisp/mail-prsvr.el b/lisp/mail-prsvr.el index f59b1ff..82187fc 100644 --- a/lisp/mail-prsvr.el +++ b/lisp/mail-prsvr.el @@ -29,6 +29,12 @@ This variable should never be set. Instead, it should be bound by functions that wish to call mail-parse functions and let them know what the desired charset is to be.") +(defvar mail-parse-ignored-charsets nil + "Ignored charsets used by low-level libraries. +This variable should never be set. Instead, it should be bound by +functions that wish to call mail-parse functions and let them know +what the desired charsets is to be ignored.") + (provide 'mail-prsvr) ;;; mail-prsvr.el ends here diff --git a/lisp/message.el b/lisp/message.el index 6f3b1fa..7d59686 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1050,7 +1050,7 @@ The cdr of ech entry is a function for applying the face to a region.") ((boundp 'MULE) '*junet*) ((not (fboundp 'find-coding-system)) nil) ((find-coding-system 'emacs-mule) - (if (string-match "nt" system-configuration) + (if (string-match "nt\\|windows" system-configuration) 'emacs-mule-dos 'emacs-mule)) ((find-coding-system 'escape-quoted) 'escape-quoted) ((find-coding-system 'no-conversion) 'no-conversion) diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index bcbd4f1..1107947 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -194,7 +194,10 @@ If no encoding was done, nil is returned." (defun mm-decode-body (charset &optional encoding type) "Decode the current article that has been encoded with ENCODING. The characters in CHARSET should then be decoded." - (setq charset (or charset mail-parse-charset)) + (if (stringp charset) + (setq charset (intern (downcase charset)))) + (if (or (not charset) (memq charset mail-parse-ignored-charsets)) + (setq charset mail-parse-charset)) (save-excursion (when encoding (mm-decode-content-transfer-encoding encoding type)) @@ -212,7 +215,10 @@ The characters in CHARSET should then be decoded." (defun mm-decode-string (string charset) "Decode STRING with CHARSET." - (setq charset (or charset mail-parse-charset)) + (if (stringp charset) + (setq charset (intern (downcase charset)))) + (if (or (not charset) (memq charset mail-parse-ignored-charsets)) + (setq charset mail-parse-charset)) (or (when (featurep 'mule) (let (mule-charset) diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 2ade070..966cb91 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -28,7 +28,7 @@ (defvar mm-running-ntemacs (and (not mm-running-xemacs) - (string-match "nt" system-configuration))) + (string-match "nt\\|windows" system-configuration))) (defvar mm-binary-coding-system (if mm-running-xemacs diff --git a/lisp/mm-view.el b/lisp/mm-view.el index b781bb3..9e48939 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -36,15 +36,25 @@ ;; Avoid byte compile warnings for the use of old W3. (defvar w3-meta-content-type-charset-regexp) (defvar w3-meta-charset-content-type-regexp) +;; Avoid byte compile warning. +(defvar gnus-article-mime-handles) ;;; ;;; Functions for displaying various formats inline ;;; (defun mm-inline-image (handle) - (let ((annot (make-annotation (mm-get-image handle) nil 'text)) + (let ((b (point)) + (annot (make-annotation (mm-get-image handle) nil 'text)) buffer-read-only) - (mm-insert-inline handle "\n") + (insert "\n") + (mm-handle-set-undisplayer + handle + `(lambda () + (let (buffer-read-only) + (delete-annotation ,annot) + (delete-region ,(set-marker (make-marker) b) + ,(set-marker (make-marker) (point)))))) (set-extent-property annot 'mm t) (set-extent-property annot 'duplicable t))) @@ -77,28 +87,34 @@ (save-restriction (narrow-to-region b (point)) (goto-char (point-min)) - (if (or (re-search-forward w3-meta-content-type-charset-regexp nil t) - (re-search-forward w3-meta-charset-content-type-regexp nil t)) + (if (or (re-search-forward + w3-meta-content-type-charset-regexp nil t) + (re-search-forward + w3-meta-charset-content-type-regexp nil t)) (setq charset (w3-coding-system-for-mime-charset (buffer-substring-no-properties (match-beginning 2) (match-end 2))))) (mm-decode-body charset) (save-window-excursion - (let ((w3-strict-width width) - (url-standalone-mode t)) - (w3-region (point-min) (point-max))))) - (narrow-to-region (1+ (point-min)) (point-max)) - (mm-handle-set-undisplayer - handle - `(lambda () - (let (buffer-read-only) - (mapc (lambda (prop) - (remove-specifier - (face-property 'default prop) (current-buffer))) - '(background background-pixmap foreground)) - (delete-region ,(point-min-marker) - ,(point-max-marker)))))))) + (save-restriction + (let ((w3-strict-width width) + (url-standalone-mode t)) + (condition-case var + (w3-region (point-min) (point-max)) + (error))))) +;;; (narrow-to-region (1+ (point-min)) (point-max)) + (mm-handle-set-undisplayer + handle + `(lambda () + (let (buffer-read-only) + (if (functionp 'remove-specifier) + (mapc (lambda (prop) + (remove-specifier + (face-property 'default prop) (current-buffer))) + '(background background-pixmap foreground))) + (delete-region ,(point-min-marker) + ,(point-max-marker))))))))) ((or (equal type "enriched") (equal type "richtext")) (save-excursion @@ -161,13 +177,18 @@ (goto-char (point-min))) (defun mm-inline-message (handle) - (let ((b (point))) + (let ((b (point)) gnus-displaying-mime handles) (save-excursion (save-restriction (narrow-to-region b b) (mm-insert-part handle) - (run-hooks 'gnus-article-decode-hook) - (gnus-article-prepare-display) + (let (gnus-article-mime-handles) + (run-hooks 'gnus-article-decode-hook) + (gnus-article-prepare-display) + (setq handles gnus-article-mime-handles)) + (if handles + (setq gnus-article-mime-handles + (append gnus-article-mime-handles handles))) (mm-handle-set-undisplayer handle `(lambda () diff --git a/lisp/mml.el b/lisp/mml.el index dc6266b..16c7341 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -26,6 +26,7 @@ (require 'mm-util) (require 'mm-bodies) (require 'mm-encode) +(require 'mm-decode) (eval-and-compile (autoload 'message-make-message-id "message")) @@ -617,7 +618,7 @@ (when (string-match "[\"\\~/* \t\n]" value) (setq value (prin1-to-string value))) (insert (format " %s=%s" key value))))) - (insert ">\n<#/part>\n")) + (insert ">\n<#/" name ">\n")) ;;; Attachment functions. @@ -661,14 +662,13 @@ TYPE is the MIME type to use." 'description description)) (defun mml-insert-multipart (&optional type) - (interactive (list (completing-read "Multipart type (default mixed): ") - "mixed" + (interactive (list (completing-read "Multipart type (default mixed): " '(("mixed") ("alternative") ("digest") ("parallel") - ("signed") ("encrypted")))) + ("signed") ("encrypted")) + nil nil "mixed"))) (or type (setq type "mixed")) (mml-insert-tag "multipart" 'type type) - (insert "<#/!multipart>\n") (forward-line -1)) (defun mml-preview (&optional raw) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 1372d9f..9d67fb9 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -423,7 +423,7 @@ parameter. It should return nil, `warn' or `delete'." "Coding system used in nnmail.") (defvar nnmail-file-coding-system-1 - (if (string-match "nt" system-configuration) + (if (string-match "nt\\|windows" system-configuration) 'raw-text-dos 'binary) "Another coding system used in nnmail.") diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index f11194c..a389d36 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -326,6 +326,10 @@ Return WORD if not." "Decode STRING that uses CHARSET with ENCODING. Valid ENCODINGs are \"B\" and \"Q\". If your Emacs implementation can't decode CHARSET, it returns nil." + (if (stringp charset) + (setq charset (intern (downcase charset)))) + (if (or (not charset) (memq charset mail-parse-ignored-charsets)) + (setq charset mail-parse-charset)) (let ((cs (mm-charset-to-coding-system charset))) (when cs (when (and (eq cs 'ascii)