From a1a45cd2359bacd97ca5e7f33f9dc9c7ff06e61f Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 26 Feb 1997 12:10:24 +0000 Subject: [PATCH] (gnus-mule-decode-summary): The function implemented correctly. (gnus-mule-initialize): Setup gnus-summary-generate-hook. Remove prefix "coding-system-" from coding system symbol names. --- lisp/gnus/gnus-mule.el | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/lisp/gnus/gnus-mule.el b/lisp/gnus/gnus-mule.el index 8e95b334f91..6d0e2028718 100644 --- a/lisp/gnus/gnus-mule.el +++ b/lisp/gnus/gnus-mule.el @@ -131,12 +131,20 @@ coding-system for reading and writing respectively." (setq gnus-mule-article-decoded t)) ;; Decode the current summary buffer. This function is set in -;; `gnus-summary-prepare-hook'. +;; `gnus-summary-generate-hook'. +;; Made by , +;; coded by . (defun gnus-mule-decode-summary () - ;; I have not yet implemented this function because I'm not yet - ;; familiar with the new Gnus codes, especialy how to extract only - ;; subjects from a summary buffer. - nil) + (if gnus-mule-coding-system + (mapcar + (lambda (headers) + (let ((subject (aref headers 1)) + (author (aref headers 2))) + (aset headers 1 + (decode-coding-string subject gnus-mule-coding-system)) + (aset headers 2 + (decode-coding-string author gnus-mule-coding-system)))) + gnus-newsgroup-headers))) (defun gnus-mule-toggle-article-format () "Toggle decoding/encoding of the current article buffer." @@ -160,20 +168,20 @@ coding-system for reading and writing respectively." (define-key gnus-summary-mode-map "z" 'gnus-mule-toggle-article-format) ;; Hook definition (add-hook 'gnus-select-group-hook 'gnus-mule-select-coding-system) - (add-hook 'gnus-summary-prepare-hook 'gnus-mule-decode-summary) + (add-hook 'gnus-summary-generate-hook 'gnus-mule-decode-summary) (add-hook 'gnus-article-prepare-hook 'gnus-mule-decode-article)) -(gnus-mule-add-group "" 'coding-system-iso-2022-7) ;; default coding system +(gnus-mule-add-group "" 'iso-2022-7) ;; default coding system (gnus-mule-add-group "alt" 'no-conversion) (gnus-mule-add-group "comp" 'no-conversion) (gnus-mule-add-group "gnu" 'no-conversion) (gnus-mule-add-group "rec" 'no-conversion) (gnus-mule-add-group "sci" 'no-conversion) (gnus-mule-add-group "soc" 'no-conversion) -(gnus-mule-add-group "alt.chinese.text" 'coding-system-hz) -(gnus-mule-add-group "alt.hk" 'coding-system-hz) -(gnus-mule-add-group "alt.chinese.text.big5" 'coding-system-big5) -(gnus-mule-add-group "soc.culture.vietnamese" '(nil . coding-system-viqr)) +(gnus-mule-add-group "alt.chinese.text" 'hz-gb-2312) +(gnus-mule-add-group "alt.hk" 'hz-gb-2312) +(gnus-mule-add-group "alt.chinese.text.big5" 'cn-big5) +(gnus-mule-add-group "soc.culture.vietnamese" '(nil . viqr)) (add-hook 'gnus-startup-hook 'gnus-mule-initialize) -- 2.39.5