Autoload gnus-i18n.
authormorioka <morioka>
Thu, 27 Nov 1997 15:56:39 +0000 (15:56 +0000)
committermorioka <morioka>
Thu, 27 Nov 1997 15:56:39 +0000 (15:56 +0000)
(gnus-show-mime): `t' in default.
(gnus-structured-field-decoder): Use
`eword-decode-structured-field-body' in default.
(gnus-unstructured-field-decoder): Use
`eword-decode-unstructured-field-body' in default.

(gnus-parse-headers-hook): Use `(gnus-set-summary-default-charset)' in
default.

(gnus-summary-mode-map): Add binding for `gnus-summary-scroll-down'
and `gnus-summary-preview-mime-message'.

(gnus-summary-preview-mime-message): New function.
(gnus-mime-partial-preview-function): New function.
Add setting for mime-view.

lisp/gnus-sum.el

index 05f7b26..4b28ea1 100644 (file)
 (require 'gnus-range)
 (require 'gnus-int)
 (require 'gnus-undo)
+(require 'std11)
+(require 'mime-view)
 (autoload 'gnus-summary-limit-include-cached "gnus-cache" nil t)
+(autoload 'gnus-set-summary-default-charset "gnus-i18n" nil t)
 
 (defcustom gnus-kill-summary-on-exit t
   "*If non-nil, kill the summary buffer when you exit from it.
@@ -322,7 +325,7 @@ variable."
   :group 'gnus-article-various
   :type 'boolean)
 
-(defcustom gnus-show-mime nil
+(defcustom gnus-show-mime t
   "*If non-nil, do mime processing of articles.
 The articles will simply be fed to the function given by
 `gnus-show-mime-method'."
@@ -652,18 +655,28 @@ is not run if `gnus-visual' is nil."
   :type 'hook)
 
 ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
-(defcustom gnus-structured-field-decoder 'identity
+(defcustom gnus-structured-field-decoder
+  (function
+   (lambda (string)
+     (eword-decode-structured-field-body
+      (std11-unfold-string string) 'must-unfold)
+     ))
   "Function to decode non-ASCII characters in structured field for summary."
   :group 'gnus-various
   :type 'function)
 
-(defcustom gnus-unstructured-field-decoder 'identity
+(defcustom gnus-unstructured-field-decoder
+  (function
+   (lambda (string)
+     (eword-decode-unstructured-field-body
+      (std11-unfold-string string) 'must-unfold)
+     ))
   "Function to decode non-ASCII characters in unstructured field for summary."
   :group 'gnus-various
   :type 'function)
 
 (defcustom gnus-parse-headers-hook
-  (list 'gnus-hack-decode-rfc1522 'gnus-decode-rfc1522)
+  '(gnus-set-summary-default-charset)
   "*A hook called before parsing the headers."
   :group 'gnus-various
   :type 'hook)
@@ -1117,6 +1130,7 @@ increase the score of each group you read."
     "\177" gnus-summary-prev-page
     [delete] gnus-summary-prev-page
     "\r" gnus-summary-scroll-up
+    "\e\r" gnus-summary-scroll-down
     "n" gnus-summary-next-unread-article
     "p" gnus-summary-prev-unread-article
     "N" gnus-summary-next-article
@@ -1198,6 +1212,7 @@ increase the score of each group you read."
     "t" gnus-article-hide-headers
     "g" gnus-summary-show-article
     "l" gnus-summary-goto-last-article
+    "v" gnus-summary-preview-mime-message
     "\C-c\C-v\C-v" gnus-uu-decode-uu-view
     "\C-d" gnus-summary-enter-digest-group
     "\M-\C-d" gnus-summary-read-document
@@ -5167,6 +5182,28 @@ which existed when entering the ephemeral is reset."
       (gnus-summary-recenter)
       (gnus-summary-position-point))))
 
+(defun gnus-summary-preview-mime-message (arg)
+  "MIME decode and play this message."
+  (interactive "P")
+  (let ((gnus-break-pages nil))
+    (gnus-summary-select-article t t)
+    )
+  (pop-to-buffer gnus-original-article-buffer t)
+  (let (buffer-read-only)
+    (if (text-property-any (point-min) (point-max) 'invisible t)
+       (remove-text-properties (point-min) (point-max)
+                               gnus-hidden-properties)
+      ))
+  (mime-view-mode nil nil nil gnus-original-article-buffer
+                 gnus-article-buffer)
+  )
+
+(defun gnus-summary-scroll-down ()
+  "Scroll down one line current article."
+  (interactive)
+  (gnus-summary-scroll-up -1)
+  )
+
 ;;; Dead summaries.
 
 (defvar gnus-dead-summary-mode-map nil)
@@ -8868,6 +8905,33 @@ save those articles instead."
         (lambda (buf) (switch-to-buffer buf) (gnus-summary-exit))
         buffers)))))
 
+
+;;; @ for mime-partial
+;;;
+
+(defun gnus-mime-partial-preview-function ()
+  (gnus-summary-preview-mime-message (gnus-summary-article-number))
+  )
+
+(autoload 'mime-combine-message/partials-automatically
+  "mime-partial"
+  "Internal method to combine message/partial messages automatically.")
+
+(set-atype 'mime-acting-condition
+          '((type . "message/partial")
+            (method . mime-combine-message/partials-automatically)
+            (major-mode . gnus-original-article-mode)
+            (summary-buffer-exp . gnus-summary-buffer)
+            ))
+
+(set-alist 'mime-view-partial-message-method-alist
+          'gnus-original-article-mode
+          'gnus-mime-partial-preview-function)
+
+
+;;; @ end
+;;;
+
 (gnus-ems-redefine)
 
 (provide 'gnus-sum)