From: keiichi Date: Fri, 30 Oct 1998 05:45:41 +0000 (+0000) Subject: Sync up with Chao-gnus 6.12. X-Git-Tag: keiichi-199811302358~54 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fa2b75d3d381ca3ddad6fe188cbfe4ca82b14fb;p=elisp%2Fgnus.git- Sync up with Chao-gnus 6.12. --- diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 9cb97df..9fc4012 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -964,7 +964,7 @@ characters to translate to." (let ((charset (save-excursion (set-buffer gnus-summary-buffer) default-mime-charset))) - (eword-decode-header charset) + (mime-decode-header-in-buffer charset) ))) (defun article-hide-pgp (&optional arg) @@ -2000,7 +2000,7 @@ commands: (make-local-variable 'default-mime-charset) (setq default-mime-charset charset) (let (buffer-read-only) - (eword-decode-header charset) + (mime-decode-header-in-buffer charset) (goto-char (point-min)) (if (search-forward "\n\n" nil t) (decode-mime-charset-region (match-end 0) (point-max) charset))) diff --git a/lisp/gnus-bbdb.el b/lisp/gnus-bbdb.el index 3ce45b4..e33a2c6 100644 --- a/lisp/gnus-bbdb.el +++ b/lisp/gnus-bbdb.el @@ -46,9 +46,11 @@ the user confirms the creation." (error "message unexists")) (- (point) 2))) (let ((to (mail-fetch-field "to"))) - (and to - (setq to (eword-decode-field-body to 'To t)) - (setq from to))))) + (when to + (let ((decoder (mime-find-field-decoder 'To 'unfolding))) + (and (functionp decoder) + (setq to (funcall decoder to)) + (setq from to))))))) (when from (bbdb-annotate-message-sender from t (or (bbdb-invoke-hook-for-value @@ -438,13 +440,15 @@ beginning of the message headers." ;; we can't special-case VM here to use its cache, because the cache has ;; divided real-names from addresses; the actual From: and Subject: fields ;; exist only in the message. - (let (value) + (let (value decoder) (when (setq value (mail-fetch-field field-name)) - (or (and (fboundp 'eword-decode-field-body) - (eword-decode-field-body - value (intern (capitalize field-name)) t)) + (or (and (setq decoder + (mime-find-field-decoder + (intern (capitalize field-name)) 'unfolding)) + (fboundp decoder) + (funcall decoder value)) value)))) - + ;; ;; Insinuation ;; diff --git a/lisp/gnus-draft.el b/lisp/gnus-draft.el index ca70902..e29ef9d 100644 --- a/lisp/gnus-draft.el +++ b/lisp/gnus-draft.el @@ -184,11 +184,7 @@ ;;; Utility functions (defcustom gnus-draft-decoding-function - (function - (lambda () - (mime-edit-decode-buffer nil) - (eword-decode-header) - )) + #'mime-edit-decode-buffer "*Function called to decode the message from network representation." :group 'gnus-agent :type 'function) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 6f314b5..34eebdf 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -93,7 +93,7 @@ Thank you. The first %s will be replaced by the Newsgroups header; the second with the current group name.") -(defvar gnus-message-setup-hook '(gnus-maybe-setup-default-charset) +(defvar gnus-message-setup-hook nil "Hook run after setting up a message buffer.") (defvar gnus-bug-create-help-buffer t @@ -217,25 +217,12 @@ Thank you for your help in stamping out bugs. (set (make-local-variable 'gnus-message-group-art) (cons ,group ,article)) (make-local-variable 'gnus-newsgroup-name) - (gnus-message-maybe-setup-default-charset) + (gnus-maybe-setup-default-charset) (gnus-run-hooks 'gnus-message-setup-hook)) (gnus-add-buffer) (gnus-configure-windows ,config t) (set-buffer-modified-p nil)))) -(defun gnus-message-maybe-setup-default-charset () - (let ((charset - (and (boundp 'gnus-summary-buffer) - (buffer-live-p gnus-summary-buffer) - (save-excursion - (set-buffer gnus-summary-buffer) - default-mime-charset)))) - (if charset - (progn - (make-local-variable 'default-mime-charset) - (setq default-mime-charset charset) - )))) - (defun gnus-inews-add-send-actions (winconf buffer article) (make-local-hook 'message-sent-hook) (add-hook 'message-sent-hook 'gnus-inews-do-gcc nil t) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 5fca16e..a5e5710 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -5112,12 +5112,12 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil." (gnus-kill-buffer buf))) (setq gnus-current-select-method gnus-select-method) (pop-to-buffer gnus-group-buffer) - ;; Clear the current group name. (if (not quit-config) (progn (goto-char group-point) (gnus-configure-windows 'group 'force)) (gnus-handle-ephemeral-exit quit-config)) + ;; Clear the current group name. (unless quit-config (setq gnus-newsgroup-name nil))))) diff --git a/lisp/message.el b/lisp/message.el index 13368ee..691687a 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -469,7 +469,7 @@ variable isn't used." :group 'message-headers :type 'boolean) -(defcustom message-setup-hook 'turn-on-mime-edit +(defcustom message-setup-hook '(turn-on-mime-edit) "Normal hook, run each time a new outgoing message is initialized. The function `message-setup' runs this hook." :group 'message-various @@ -2148,7 +2148,6 @@ the user from the mailer." ;; Remove some headers. (save-restriction (message-narrow-to-headers) - ;; Remove some headers. (message-remove-header message-ignored-mail-headers t)) (goto-char (point-max)) ;; require one newline at the end. @@ -4041,10 +4040,12 @@ the message." (let ((funcs message-make-forward-subject-function) (subject (if message-wash-forwarded-subjects (message-wash-subject - (or (eword-decode-unstructured-field-body - (message-fetch-field "Subject")) "")) - (or (eword-decode-unstructured-field-body - (message-fetch-field "Subject")) "")))) + (or (nnheader-decode-subject + (message-fetch-field "Subject")) + "")) + (or (nnheader-decode-subject + (message-fetch-field "Subject")) + "")))) ;; Make sure funcs is a list. (and funcs (not (listp funcs)) @@ -4396,7 +4397,6 @@ regexp varstr." (cdr local))))) locals))) - ;;; @ for MIME Edit mode ;;; diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 4284c7b..1ae0977 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -102,6 +102,11 @@ on your system, you could say something like: (defalias 'mail-header-xref 'mime-entity-xref-internal) (defalias 'mail-header-set-xref 'mime-entity-set-xref-internal) +(defalias 'nnheader-decode-subject + (mime-find-field-decoder 'Subject 'unfolding)) +(defalias 'nnheader-decode-from + (mime-find-field-decoder 'From 'unfolding)) + (defsubst make-full-mail-header (&optional number subject from date id references chars lines xref) "Create a new mail header structure initialized with the parameters given." @@ -110,10 +115,10 @@ on your system, you could say something like: nil nil nil nil (if subject - (eword-decode-field-body subject 'Subject t) + (nnheader-decode-subject subject) ) (if from - (eword-decode-field-body from 'From t) + (nnheader-decode-from from) ) date id references chars lines xref diff --git a/lisp/pop3-fma.el b/lisp/pop3-fma.el index 1f09f87..8ceecff 100644 --- a/lisp/pop3-fma.el +++ b/lisp/pop3-fma.el @@ -385,5 +385,3 @@ Argument PROMPT ." (provide 'pop3-fma) ;; ;; pop3-fma.el ends here. - - diff --git a/texi/gnus.texi b/texi/gnus.texi index 528ef61..4d7e509 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -354,7 +354,7 @@ can be gotten by any nefarious means you can think of---@sc{nntp}, local spool or your mbox file. All at the same time, if you want to push your luck. -<<<