2 ;;; tm-ognus.el --- tm-gnus module for Original GNUS
14 (defconst tm-gnus/RCS-ID
15 "$Id: tm-ognus.el,v 6.0 1995/05/23 13:23:31 morioka Exp $")
17 (defconst tm-gnus/version
18 (concat (get-version-string tm-gnus/RCS-ID) " (for ORIGINAL GNUS)"))
21 ;;; @ change MIME header decoding mode, decoding or non decoding.
24 (defun tm-gnus/set-mime-header-decoding-mode (arg)
25 "Set MIME header processing.
26 With arg, turn MIME processing on iff arg is positive."
27 (setq mime/header-decoding-mode arg)
28 (setq gnus-have-all-headers (not gnus-have-all-headers))
29 (gnus-summary-select-article (not gnus-have-all-headers) t)
32 (defun tm-gnus/toggle-mime-header-decoding-mode ()
33 "Toggle MIME header processing.
34 With arg, turn MIME processing on iff arg is positive."
36 (tm-gnus/set-mime-header-decoding-mode (not mime/header-decoding-mode))
40 ;;; @ to decode subjects in mode-line
42 ;; This function imported from gnus.el.
44 ;; New implementation in gnus 3.14.3
46 (defun tm-gnus/article-set-mode-line ()
47 "Set Article mode line string.
48 If you don't like it, define your own gnus-article-set-mode-line."
49 (let ((maxlen 15) ;Maximum subject length
51 (if gnus-current-headers
52 (mime/decode-string (nntp-header-subject gnus-current-headers))
55 ;; The value must be a string to escape %-constructs because of subject.
56 (setq mode-line-buffer-identification
57 (format "GNUS: %s%s %s%s%s"
59 (if gnus-current-article
60 (format "/%d" gnus-current-article) "")
61 (rightful-boundary-short-string subject
62 (min (string-width subject)
64 (if (> (string-width subject) maxlen) "..." "")
65 (make-string (max 0 (- 17 (string-width subject))) ? )
67 (set-buffer-modified-p t))
70 ;;; @ to decode subjects in Summary buffer
72 (defun tm-gnus/decode-summary-subjects ()
75 (let ((subj (or (gnus-header-subject header) "")))
76 (nntp-set-header-subject header (mime/decode-string subj))
78 gnus-newsgroup-headers)