2 ;;; tm-sgnus.el --- tm-gnus module for September GNUS
14 (defconst tm-gnus/RCS-ID
15 "$Id: tm-sgnus.el,v 6.24 1995/09/26 12:08:35 morioka Exp $")
17 (defconst tm-gnus/version
18 (concat (get-version-string tm-gnus/RCS-ID) " for September"))
24 (autoload 'mime/viewer-mode "tm-view" "View MIME message." t)
25 (autoload 'mime/decode-message-header
26 "tiny-mime" "Decode MIME encoded-word." t)
27 (autoload 'mime/decode-string "tiny-mime" "Decode MIME encoded-word." t)
33 (defvar tm-gnus/decode-all t
35 tm-gnus/automatic-MIME-preview-support is non-nil,
36 article is automatic MIME decoded.")
39 ;;; @ command functions
42 (defun tm-gnus/view-message (arg)
43 "MIME decode and play this message."
45 (let ((gnus-break-pages nil))
46 (gnus-summary-select-article t t)
48 (pop-to-buffer gnus-original-article-buffer t)
49 (let (buffer-read-only)
50 (if (text-property-any (point-min) (point-max) 'invisible t)
51 (remove-text-properties (point-min) (point-max)
52 gnus-hidden-properties)
57 (defun tm-gnus/summary-scroll-down ()
58 "Scroll down one line current article."
60 (gnus-summary-scroll-up -1)
63 (define-key gnus-summary-mode-map "v" (function tm-gnus/view-message))
64 (define-key gnus-summary-mode-map
65 "\e\r" (function tm-gnus/summary-scroll-down))
71 (defun mime-viewer/quitting-method-for-sgnus ()
72 (mime-viewer/kill-buffer)
73 (delete-other-windows)
74 (gnus-article-show-summary)
75 (gnus-summary-display-article (gnus-summary-article-number))
82 (set-alist 'mime-viewer/quitting-method-alist
83 'gnus-original-article-mode
84 (function mime-viewer/quitting-method-for-sgnus))
91 (defun tm-gnus/decode-summary-from-and-subjects ()
96 (mime/decode-string (or (mail-header-from header) ""))
98 (mail-header-set-subject
100 (mime/decode-string (or (mail-header-subject header) ""))
103 gnus-newsgroup-headers)
106 (add-hook 'gnus-select-group-hook
107 (function tm-gnus/decode-summary-from-and-subjects))
113 (defun tm-gnus/preview-article ()
114 (let (mime-viewer/ignored-field-list)
115 (make-local-variable 'tm:mother-button-dispatcher)
116 (setq tm:mother-button-dispatcher
117 (function gnus-article-push-button))
118 (mime/viewer-mode nil nil nil gnus-original-article-buffer
122 (defun tm-gnus/set-mime-method (mode)
123 (setq gnus-show-mime-method
125 (function tm-gnus/preview-article)
126 (function mime/decode-message-header)
129 (tm-gnus/set-mime-method tm-gnus/decode-all)
131 (setq gnus-show-mime t)
140 (set-alist 'mime/message-sender-alist
142 (function gnus-inews-news))