From: Kenichi Handa Date: Thu, 28 Aug 1997 04:51:02 +0000 (+0000) Subject: (gnus-structured-field-decoder): New variable. X-Git-Tag: emacs-20.1~354 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2bd3dcae0eba8e09cd07f180506493a22905d5cc;p=emacs.git (gnus-structured-field-decoder): New variable. (gnus-unstructured-field-decoder): New variable. (gnus-get-newsgroup-headers, gnus-nov-parse-line): Use `gnus-structured-field-decoder' and `gnus-unstructured-field-decoder' for Subject field. --- diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 26bb9cdc715..694e70a640a 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -619,6 +619,17 @@ is not run if `gnus-visual' is nil." :group 'gnus-summary-visual :type 'hook) +;; 1997/5/4 by MORIOKA Tomohiko +(defcustom gnus-structured-field-decoder 'identity + "Function to decode non-ASCII characters in structured field for summary." + :group 'gnus-various + :type 'function) + +(defcustom gnus-unstructured-field-decoder 'identity + "Function to decode non-ASCII characters in unstructured field for summary." + :group 'gnus-various + :type 'function) + (defcustom gnus-parse-headers-hook (list 'gnus-decode-rfc1522) "*A hook called before parsing the headers." @@ -4144,12 +4155,18 @@ The resulting hash table is returned, or nil if no Xrefs were found." (progn (goto-char p) (if (search-forward "\nsubject: " nil t) - (nnheader-header-value) "(none)")) + ;; 1997/5/4 by MORIOKA Tomohiko + (funcall + gnus-unstructured-field-decoder (nnheader-header-value)) + "(none)")) ;; From. (progn (goto-char p) (if (search-forward "\nfrom: " nil t) - (nnheader-header-value) "(nobody)")) + ;; 1997/5/4 by MORIOKA Tomohiko + (funcall + gnus-structured-field-decoder (nnheader-header-value)) + "(nobody)")) ;; Date. (progn (goto-char p) @@ -4284,8 +4301,11 @@ The resulting hash table is returned, or nil if no Xrefs were found." (setq header (vector number ; number - (gnus-nov-field) ; subject - (gnus-nov-field) ; from + ;; 1997/5/4 by MORIOKA Tomohiko + (funcall + gnus-unstructured-field-decoder (gnus-nov-field)) ; subject + (funcall + gnus-structured-field-decoder (gnus-nov-field)) ; from (gnus-nov-field) ; date (setq id (or (gnus-nov-field) (nnheader-generate-fake-message-id))) ; id