2 ;;; tm-sgnus.el --- tm-gnus module for September GNUS
14 (defconst tm-gnus/RCS-ID
15 "$Id: tm-sgnus.el,v 6.23 1995/09/24 20:20:32 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
84 (function mime-viewer/quitting-method-for-sgnus))
85 (set-alist 'tm:callback-property-alist
86 'fundamental-mode 'gnus-callback)
87 (set-alist 'tm:data-property-alist
88 'fundamental-mode 'gnus-data)
95 (defun tm-gnus/decode-summary-from-and-subjects ()
100 (mime/decode-string (or (mail-header-from header) ""))
102 (mail-header-set-subject
104 (mime/decode-string (or (mail-header-subject header) ""))
107 gnus-newsgroup-headers)
110 (add-hook 'gnus-select-group-hook
111 (function tm-gnus/decode-summary-from-and-subjects))
117 (defun tm-gnus/preview-article ()
118 (let (mime-viewer/ignored-field-list)
119 (make-local-variable 'tm:mother-button-dispatcher)
120 (setq tm:mother-button-dispatcher
121 (function gnus-article-push-button))
122 (mime/viewer-mode nil nil nil gnus-original-article-buffer
126 (defun tm-gnus/set-mime-method (mode)
127 (setq gnus-show-mime-method
129 (function tm-gnus/preview-article)
130 (function mime/decode-message-header)
133 (tm-gnus/set-mime-method tm-gnus/decode-all)
135 (setq gnus-show-mime t)
144 (set-alist 'mime/message-sender-alist
146 (function gnus-inews-news))