aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1997-02-26 12:10:24 +0000
committerKenichi Handa1997-02-26 12:10:24 +0000
commita1a45cd2359bacd97ca5e7f33f9dc9c7ff06e61f (patch)
tree158cfa757de8f705ba538dc713d6d25385910fec
parentf61d15a75760925a76489b177c0e177483a40c2e (diff)
downloademacs-a1a45cd2359bacd97ca5e7f33f9dc9c7ff06e61f.tar.gz
emacs-a1a45cd2359bacd97ca5e7f33f9dc9c7ff06e61f.zip
(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.
-rw-r--r--lisp/gnus/gnus-mule.el30
1 files 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."
131 (setq gnus-mule-article-decoded t)) 131 (setq gnus-mule-article-decoded t))
132 132
133;; Decode the current summary buffer. This function is set in 133;; Decode the current summary buffer. This function is set in
134;; `gnus-summary-prepare-hook'. 134;; `gnus-summary-generate-hook'.
135;; Made by <sangil@hugsvr.kaist.ac.kr>,
136;; coded by <crisp@hugsvr.kaist.ac.kr>.
135(defun gnus-mule-decode-summary () 137(defun gnus-mule-decode-summary ()
136 ;; I have not yet implemented this function because I'm not yet 138 (if gnus-mule-coding-system
137 ;; familiar with the new Gnus codes, especialy how to extract only 139 (mapcar
138 ;; subjects from a summary buffer. 140 (lambda (headers)
139 nil) 141 (let ((subject (aref headers 1))
142 (author (aref headers 2)))
143 (aset headers 1
144 (decode-coding-string subject gnus-mule-coding-system))
145 (aset headers 2
146 (decode-coding-string author gnus-mule-coding-system))))
147 gnus-newsgroup-headers)))
140 148
141(defun gnus-mule-toggle-article-format () 149(defun gnus-mule-toggle-article-format ()
142 "Toggle decoding/encoding of the current article buffer." 150 "Toggle decoding/encoding of the current article buffer."
@@ -160,20 +168,20 @@ coding-system for reading and writing respectively."
160 (define-key gnus-summary-mode-map "z" 'gnus-mule-toggle-article-format) 168 (define-key gnus-summary-mode-map "z" 'gnus-mule-toggle-article-format)
161 ;; Hook definition 169 ;; Hook definition
162 (add-hook 'gnus-select-group-hook 'gnus-mule-select-coding-system) 170 (add-hook 'gnus-select-group-hook 'gnus-mule-select-coding-system)
163 (add-hook 'gnus-summary-prepare-hook 'gnus-mule-decode-summary) 171 (add-hook 'gnus-summary-generate-hook 'gnus-mule-decode-summary)
164 (add-hook 'gnus-article-prepare-hook 'gnus-mule-decode-article)) 172 (add-hook 'gnus-article-prepare-hook 'gnus-mule-decode-article))
165 173
166(gnus-mule-add-group "" 'coding-system-iso-2022-7) ;; default coding system 174(gnus-mule-add-group "" 'iso-2022-7) ;; default coding system
167(gnus-mule-add-group "alt" 'no-conversion) 175(gnus-mule-add-group "alt" 'no-conversion)
168(gnus-mule-add-group "comp" 'no-conversion) 176(gnus-mule-add-group "comp" 'no-conversion)
169(gnus-mule-add-group "gnu" 'no-conversion) 177(gnus-mule-add-group "gnu" 'no-conversion)
170(gnus-mule-add-group "rec" 'no-conversion) 178(gnus-mule-add-group "rec" 'no-conversion)
171(gnus-mule-add-group "sci" 'no-conversion) 179(gnus-mule-add-group "sci" 'no-conversion)
172(gnus-mule-add-group "soc" 'no-conversion) 180(gnus-mule-add-group "soc" 'no-conversion)
173(gnus-mule-add-group "alt.chinese.text" 'coding-system-hz) 181(gnus-mule-add-group "alt.chinese.text" 'hz-gb-2312)
174(gnus-mule-add-group "alt.hk" 'coding-system-hz) 182(gnus-mule-add-group "alt.hk" 'hz-gb-2312)
175(gnus-mule-add-group "alt.chinese.text.big5" 'coding-system-big5) 183(gnus-mule-add-group "alt.chinese.text.big5" 'cn-big5)
176(gnus-mule-add-group "soc.culture.vietnamese" '(nil . coding-system-viqr)) 184(gnus-mule-add-group "soc.culture.vietnamese" '(nil . viqr))
177 185
178(add-hook 'gnus-startup-hook 'gnus-mule-initialize) 186(add-hook 'gnus-startup-hook 'gnus-mule-initialize)
179 187