comparison lisp/gnus/gnus-mule.el @ 17081:5810f3bb79d9

(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.
author Kenichi Handa <handa@m17n.org>
date Wed, 26 Feb 1997 12:10:24 +0000
parents 70194012fb3a
children a3ca5e15c82a
comparison
equal deleted inserted replaced
17080:d80a8a46437e 17081:5810f3bb79d9
129 (defun gnus-mule-decode-article () 129 (defun gnus-mule-decode-article ()
130 (gnus-mule-code-convert gnus-mule-coding-system nil) 130 (gnus-mule-code-convert gnus-mule-coding-system nil)
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."
143 (interactive) 151 (interactive)
144 (let ((buf (get-buffer gnus-article-buffer))) 152 (let ((buf (get-buffer gnus-article-buffer)))
158 ;; Convenient key definitions 166 ;; Convenient key definitions
159 (define-key gnus-article-mode-map "z" 'gnus-mule-toggle-article-format) 167 (define-key gnus-article-mode-map "z" 'gnus-mule-toggle-article-format)
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
180 ;; gnus-mule.el ends here 188 ;; gnus-mule.el ends here