Move MH-E from low-level libraries to the high-level mail-parse library.
* lisp/mh-e/mh-comp.el: replace ietf-drums-parse-address with
mail-header-parse-address.
* lisp/mh-e/mh-junk.el: replace ietf-drums-parse-address with
mail-header-parse-address; remove mh-funcall-if-exists wrapper.
* lisp/mh-e/mh-xface.el: replace ietf-drums-parse-address with
mail-header-parse-address; remove fboundp wrapper.
* lisp/mh-e/mh-mime.el: replace rfc2047-decode-region with
mail-decode-encoded-word-region.
(require 'sendmail)
(autoload 'easy-menu-add "easymenu")
+(autoload 'mail-header-parse-address "mail-parse")
(autoload 'mml-insert-tag "mml")
\f
;; Header field exists and we have a value
(let (address mailbox (alias (mh-alias-expand value)))
(and alias
- (setq address (ietf-drums-parse-address alias))
+ (setq address (mail-header-parse-address alias))
(setq mailbox (car address)))
;; XXX - Need to parse all addresses out of field
(if (and
(require 'mh-e)
(require 'mh-scan)
+(autoload 'mail-header-parse-address "mail-parse")
+
;;;###mh-autoload
(defun mh-junk-blocklist (range)
"Blocklist RANGE as spam.
"--ham" "--local" "--no-sync")))
(message "Allowlisting sender of message %d..." msg)
(setq from
- (car (mh-funcall-if-exists
- ietf-drums-parse-address (mh-get-header-field "From:"))))
+ (car (mail-header-parse-address (mh-get-header-field "From:"))))
(kill-buffer nil)
(if (or (null from) (equal from ""))
(message "Allowlisting sender of message %d...%s"
(autoload 'article-emphasize "gnus-art")
(autoload 'gnus-eval-format "gnus-spec")
(autoload 'mail-content-type-get "mail-parse")
+(autoload 'mail-decode-encoded-word-region "mail-parse")
(autoload 'mail-decode-encoded-word-string "mail-parse")
(autoload 'mail-header-parse-content-type "mail-parse")
(autoload 'mail-header-strip-cte "mail-parse")
(autoload 'mm-decode-body "mm-bodies")
(autoload 'mm-uu-dissect "mm-uu")
(autoload 'mml-unsecure-message "mml-sec")
-(autoload 'rfc2047-decode-region "rfc2047")
(autoload 'widget-convert-button "wid-edit")
\f
"Decode RFC2047 encoded message header fields."
(when mh-decode-mime-flag
(let ((buffer-read-only nil))
- (rfc2047-decode-region (point-min) (mh-mail-header-end)))))
+ (mail-decode-encoded-word-region (point-min) (mh-mail-header-end)))))
;;;###mh-autoload
(defun mh-decode-message-subject ()
(when mh-decode-mime-flag
(save-excursion
(let ((buffer-read-only nil))
- (rfc2047-decode-region (progn (mh-goto-header-field "Subject:") (point))
- (progn (mh-header-field-end) (point)))))))
+ (mail-decode-encoded-word-region
+ (progn (mh-goto-header-field "Subject:") (point))
+ (progn (mh-header-field-end) (point)))))))
;;;###mh-autoload
(defun mh-mime-display (&optional pre-dissected-handles)
(require 'mh-e)
+(autoload 'mail-header-parse-address "mail-parse")
(autoload 'message-fetch-field "message")
(defvar mh-show-xface-function
(let* ((from-field (ignore-errors (car (message-tokenize-header
(mh-get-header-field "from:")))))
(from (car (ignore-errors
- ;; Don't use mh-funcall-if-exists because
- ;; ietf-drums-parse-address might exist at run-time but
- ;; not at compile-time.
- (when (fboundp 'ietf-drums-parse-address)
- (ietf-drums-parse-address from-field)))))
+ (mail-header-parse-address from-field))))
(host (and from
(string-match "\\([^+]*\\)\\(\\+.*\\)?@\\(.*\\)" from)
(downcase (match-string 3 from))))