(let ((charset (save-excursion
(set-buffer gnus-summary-buffer)
default-mime-charset)))
- (eword-decode-header charset)
+ (mime-decode-header-in-buffer charset)
)))
(defun article-hide-pgp (&optional arg)
(make-local-variable 'default-mime-charset)
(setq default-mime-charset charset)
(let (buffer-read-only)
- (eword-decode-header charset)
+ (mime-decode-header-in-buffer charset)
(goto-char (point-min))
(if (search-forward "\n\n" nil t)
(decode-mime-charset-region (match-end 0) (point-max) charset)))
(error "message unexists"))
(- (point) 2)))
(let ((to (mail-fetch-field "to")))
- (and to
- (setq to (eword-decode-field-body to 'To t))
- (setq from to)))))
+ (when to
+ (let ((decoder (mime-find-field-decoder 'To 'unfolding)))
+ (and (functionp decoder)
+ (setq to (funcall decoder to))
+ (setq from to)))))))
(when from
(bbdb-annotate-message-sender from t
(or (bbdb-invoke-hook-for-value
;; we can't special-case VM here to use its cache, because the cache has
;; divided real-names from addresses; the actual From: and Subject: fields
;; exist only in the message.
- (let (value)
+ (let (value decoder)
(when (setq value (mail-fetch-field field-name))
- (or (and (fboundp 'eword-decode-field-body)
- (eword-decode-field-body
- value (intern (capitalize field-name)) t))
+ (or (and (setq decoder
+ (mime-find-field-decoder
+ (intern (capitalize field-name)) 'unfolding))
+ (fboundp decoder)
+ (funcall decoder value))
value))))
-
+
;;
;; Insinuation
;;
;;; Utility functions
(defcustom gnus-draft-decoding-function
- (function
- (lambda ()
- (mime-edit-decode-buffer nil)
- (eword-decode-header)
- ))
+ #'mime-edit-decode-buffer
"*Function called to decode the message from network representation."
:group 'gnus-agent
:type 'function)
The first %s will be replaced by the Newsgroups header;
the second with the current group name.")
-(defvar gnus-message-setup-hook '(gnus-maybe-setup-default-charset)
+(defvar gnus-message-setup-hook nil
"Hook run after setting up a message buffer.")
(defvar gnus-bug-create-help-buffer t
(set (make-local-variable 'gnus-message-group-art)
(cons ,group ,article))
(make-local-variable 'gnus-newsgroup-name)
- (gnus-message-maybe-setup-default-charset)
+ (gnus-maybe-setup-default-charset)
(gnus-run-hooks 'gnus-message-setup-hook))
(gnus-add-buffer)
(gnus-configure-windows ,config t)
(set-buffer-modified-p nil))))
-(defun gnus-message-maybe-setup-default-charset ()
- (let ((charset
- (and (boundp 'gnus-summary-buffer)
- (buffer-live-p gnus-summary-buffer)
- (save-excursion
- (set-buffer gnus-summary-buffer)
- default-mime-charset))))
- (if charset
- (progn
- (make-local-variable 'default-mime-charset)
- (setq default-mime-charset charset)
- ))))
-
(defun gnus-inews-add-send-actions (winconf buffer article)
(make-local-hook 'message-sent-hook)
(add-hook 'message-sent-hook 'gnus-inews-do-gcc nil t)
(gnus-kill-buffer buf)))
(setq gnus-current-select-method gnus-select-method)
(pop-to-buffer gnus-group-buffer)
- ;; Clear the current group name.
(if (not quit-config)
(progn
(goto-char group-point)
(gnus-configure-windows 'group 'force))
(gnus-handle-ephemeral-exit quit-config))
+ ;; Clear the current group name.
(unless quit-config
(setq gnus-newsgroup-name nil)))))
:group 'message-headers
:type 'boolean)
-(defcustom message-setup-hook 'turn-on-mime-edit
+(defcustom message-setup-hook '(turn-on-mime-edit)
"Normal hook, run each time a new outgoing message is initialized.
The function `message-setup' runs this hook."
:group 'message-various
;; Remove some headers.
(save-restriction
(message-narrow-to-headers)
- ;; Remove some headers.
(message-remove-header message-ignored-mail-headers t))
(goto-char (point-max))
;; require one newline at the end.
(let ((funcs message-make-forward-subject-function)
(subject (if message-wash-forwarded-subjects
(message-wash-subject
- (or (eword-decode-unstructured-field-body
- (message-fetch-field "Subject")) ""))
- (or (eword-decode-unstructured-field-body
- (message-fetch-field "Subject")) ""))))
+ (or (nnheader-decode-subject
+ (message-fetch-field "Subject"))
+ ""))
+ (or (nnheader-decode-subject
+ (message-fetch-field "Subject"))
+ ""))))
;; Make sure funcs is a list.
(and funcs
(not (listp funcs))
(cdr local)))))
locals)))
-
;;; @ for MIME Edit mode
;;;
(defalias 'mail-header-xref 'mime-entity-xref-internal)
(defalias 'mail-header-set-xref 'mime-entity-set-xref-internal)
+(defalias 'nnheader-decode-subject
+ (mime-find-field-decoder 'Subject 'unfolding))
+(defalias 'nnheader-decode-from
+ (mime-find-field-decoder 'From 'unfolding))
+
(defsubst make-full-mail-header (&optional number subject from date id
references chars lines xref)
"Create a new mail header structure initialized with the parameters given."
nil
nil nil nil
(if subject
- (eword-decode-field-body subject 'Subject t)
+ (nnheader-decode-subject subject)
)
(if from
- (eword-decode-field-body from 'From t)
+ (nnheader-decode-from from)
)
date id references
chars lines xref
(provide 'pop3-fma)
;;
;; pop3-fma.el ends here.
-
-
spool or your mbox file. All at the same time, if you want to push your
luck.
-<<<<Semi-gnus provides MIME features based on SEMI API. So Semi-gnus
+Semi-gnus provides MIME features based on SEMI API. So Semi-gnus
supports your right to read strange messages including big images or
other various kinds of formats. Semi-gnus also supports
internationalization/localization and multiscript features based on MULE