tm 7.89.
[elisp/tm.git] / tm-gnus.el
index ec6a9d7..e2acfa5 100644 (file)
@@ -1,22 +1,33 @@
 ;;;
-;;; $Id: tm-gnus.el,v 2.0 1994/07/24 08:33:00 morioka Exp morioka $
-;;;
 ;;;   A MIME extension for GNUS
 ;;;
 ;;; by Morioka Tomohiko, 1993/11/20
+;;;
 
 (provide 'tm-gnus)
 
+
+;;; @ require modules
+;;;
 (require 'tm-misc)
+(require 'tl-str)
 (require 'gnus)
 
 
+;;; @ version
+;;;
+(defconst tm-gnus/RCS-ID
+  "$Id: tm-gnus.el,v 5.1 1994/10/25 07:17:51 morioka Exp $")
+
+(defconst tm-gnus/version (get-version-string tm-gnus/RCS-ID))
+
+
 ;;; @ variables
 ;;;
 (defvar tm-gnus/startup-hook nil)
 
 
-;;; @ to decode subject in mode-line
+;;; @ to decode subjects in mode-line
 ;;;
 ;; This function imported from gnus.el.
 ;;
@@ -46,57 +57,22 @@ If you don't like it, define your own gnus-article-set-mode-line."
   (set-buffer-modified-p t))
 
 
-;;; @ MIME full decode message
+;;; @ to decode subjects in Summary buffer
 ;;;
-(defun tm-gnus/full-decode-message-old (arg)
-  "MIME full-decode this article."
-  (interactive "P")
-  (let ((gnus-Article-prepare-hook mime/body-decoding-method))
-    ;; The following is a trick
-    ;; to force to read the current article again.
-    (setq gnus-have-all-headers (not gnus-have-all-headers))
-    (gnus-summary-select-article (not gnus-have-all-headers) t)
-    ))
-
-(defun tm-gnus/full-decode-message-new (arg)
-  "MIME full-decode this article."
-  (interactive "P")
-  (setq gnus-show-mime t)
-  ;; The following is a trick to force to read the current article again.
-  (setq gnus-have-all-headers (not gnus-have-all-headers))
-  (gnus-summary-select-article (not gnus-have-all-headers) t)
-  (setq gnus-show-mime nil))
-
-(defun tm-gnus/play-message (arg)
-  "MIME decode and play this message."
-  (interactive "P")
-  (let ((mime/body-decoding-mode "play"))
-    (tm-gnus/full-decode-message arg)
-    )
-  (mime/show-body-decoded-result)
-  )
-
-(defun tm-gnus/extract-message (arg)
-  "MIME decode and extract files from this message."
-  (interactive "P")
-  (let ((mime/body-decoding-mode "extract"))
-    (tm-gnus/full-decode-message arg)
-    )
-  (mime/show-body-decoded-result)
-  )
-
-(defun tm-gnus/print-message (arg)
-  "MIME decode and print contents of this message."
-  (interactive "P")
-  (let ((mime/body-decoding-mode "print"))
-    (tm-gnus/full-decode-message arg)
-    )
-  (mime/show-body-decoded-result)
+(defun tm-gnus/decode-summary-subjects ()
+  (mapcar (function
+          (lambda (header)
+            (nntp-set-header-subject
+             header
+             (mime/decode-string (gnus-header-subject header))
+             )))
+         gnus-newsgroup-headers)
   )
 
 
 ;;; @ change MIME header decoding mode, decoding or non decoding.
 ;;;
+
 (defun tm-gnus/set-mime-header-decoding-mode (arg)
   "Set MIME header processing.
 With arg, turn MIME processing on iff arg is positive."