Mercurial > emacs
changeset 13477:5c500f39271c
(rmail-delete-message-hook): New hook.
(rmail-delete-message, rmail-delete-forward): Run the hook.
(rmail-mode-hook, rmail-get-new-mail-hook): Add defvars.
(rmail-show-message-hook): Likewise.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 10 Nov 1995 17:21:30 +0000 |
parents | 23173d03180b |
children | 391ce1139d50 |
files | lisp/mail/rmail.el |
diffstat | 1 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/rmail.el Fri Nov 10 17:19:47 1995 +0000 +++ b/lisp/mail/rmail.el Fri Nov 10 17:21:30 1995 +0000 @@ -112,6 +112,24 @@ (defvar rmail-secondary-file-regexp "\\.xmail$" "*Regexp for which files are secondary Rmail files.") +;;;###autoload +(defvar rmail-mode-hook nil + "List of functions to call when Rmail is invoked.") + +;;;###autoload +(defvar rmail-get-new-mail-hook nil + "List of functions to call when Rmail has retrieved new mail.") + +;;;###autoload +(defvar rmail-show-message-hook nil + "List of functions to call when Rmail displays a message.") + +;;;###autoload +(defvar rmail-delete-message-hook nil + "List of functions to call when Rmail deletes a message. +When the hooks are called, the message has been marked deleted but is +still the current message in the Rmail buffer.") + ;; These may be altered by site-init.el to match the format of mmdf files ;; delimiting used on a given host (delim1 and delim2 from the config ;; files). @@ -1875,7 +1893,8 @@ (defun rmail-delete-message () "Delete this message and stay on it." (interactive) - (rmail-set-attribute "deleted" t)) + (rmail-set-attribute "deleted" t) + (run-hooks 'rmail-delete-message-hook)) (defun rmail-undelete-previous-message () "Back up to deleted message, select it, and undelete it." @@ -1903,6 +1922,7 @@ Returns t if a new message is displayed after the delete, or nil otherwise." (interactive "P") (rmail-set-attribute "deleted" t) + (run-hooks 'rmail-delete-message-hook) (let ((del-msg rmail-current-message)) (if (rmail-summary-exists) (rmail-select-summary