(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.
: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'."
: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)
"\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
"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
(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)
(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)