Function: mh-alias-grab-from-field
mh-alias-grab-from-field is an autoloaded, interactive and
byte-compiled function defined in mh-alias.el.gz.
Signature
(mh-alias-grab-from-field)
Documentation
Add alias for the sender of the current message.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-alias.el.gz
;;;###mh-autoload
(defun mh-alias-grab-from-field ()
"Add alias for the sender of the current message."
(interactive)
(mh-alias-reload-maybe)
(save-excursion
(cond
((mh-folder-line-matches-show-buffer-p)
(set-buffer mh-show-buffer))
((and (eq major-mode 'mh-folder-mode)
(mh-get-msg-num nil))
(set-buffer (get-buffer-create mh-temp-buffer))
(insert-file-contents (mh-msg-filename (mh-get-msg-num t))))
((eq major-mode 'mh-folder-mode)
(user-error "Cursor not pointing to a message")))
(let* ((address (or (mh-extract-from-header-value)
(error "Message has no From: header")))
(alias (mh-alias-suggest-alias address)))
(mh-alias-add-alias alias address))))