diff options
| author | Richard M. Stallman | 1995-11-10 17:21:30 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-11-10 17:21:30 +0000 |
| commit | 6c714afe4fb86d63bc5cb80a6529dccd30a616d9 (patch) | |
| tree | b446b2e1bbf322d2b1c4e91149ed2b1568806a20 | |
| parent | 4bba4654c6f16fefbe2e7c222fa4ea6ef8f155bf (diff) | |
| download | emacs-6c714afe4fb86d63bc5cb80a6529dccd30a616d9.tar.gz emacs-6c714afe4fb86d63bc5cb80a6529dccd30a616d9.zip | |
(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.
| -rw-r--r-- | lisp/mail/rmail.el | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index bdd0256768e..fed21ca86bc 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -112,6 +112,24 @@ and the value of the environment variable MAIL overrides it).") | |||
| 112 | (defvar rmail-secondary-file-regexp "\\.xmail$" | 112 | (defvar rmail-secondary-file-regexp "\\.xmail$" |
| 113 | "*Regexp for which files are secondary Rmail files.") | 113 | "*Regexp for which files are secondary Rmail files.") |
| 114 | 114 | ||
| 115 | ;;;###autoload | ||
| 116 | (defvar rmail-mode-hook nil | ||
| 117 | "List of functions to call when Rmail is invoked.") | ||
| 118 | |||
| 119 | ;;;###autoload | ||
| 120 | (defvar rmail-get-new-mail-hook nil | ||
| 121 | "List of functions to call when Rmail has retrieved new mail.") | ||
| 122 | |||
| 123 | ;;;###autoload | ||
| 124 | (defvar rmail-show-message-hook nil | ||
| 125 | "List of functions to call when Rmail displays a message.") | ||
| 126 | |||
| 127 | ;;;###autoload | ||
| 128 | (defvar rmail-delete-message-hook nil | ||
| 129 | "List of functions to call when Rmail deletes a message. | ||
| 130 | When the hooks are called, the message has been marked deleted but is | ||
| 131 | still the current message in the Rmail buffer.") | ||
| 132 | |||
| 115 | ;; These may be altered by site-init.el to match the format of mmdf files | 133 | ;; These may be altered by site-init.el to match the format of mmdf files |
| 116 | ;; delimiting used on a given host (delim1 and delim2 from the config | 134 | ;; delimiting used on a given host (delim1 and delim2 from the config |
| 117 | ;; files). | 135 | ;; files). |
| @@ -1875,7 +1893,8 @@ If N is negative, go forwards instead." | |||
| 1875 | (defun rmail-delete-message () | 1893 | (defun rmail-delete-message () |
| 1876 | "Delete this message and stay on it." | 1894 | "Delete this message and stay on it." |
| 1877 | (interactive) | 1895 | (interactive) |
| 1878 | (rmail-set-attribute "deleted" t)) | 1896 | (rmail-set-attribute "deleted" t) |
| 1897 | (run-hooks 'rmail-delete-message-hook)) | ||
| 1879 | 1898 | ||
| 1880 | (defun rmail-undelete-previous-message () | 1899 | (defun rmail-undelete-previous-message () |
| 1881 | "Back up to deleted message, select it, and undelete it." | 1900 | "Back up to deleted message, select it, and undelete it." |
| @@ -1903,6 +1922,7 @@ With prefix argument, delete and move backward. | |||
| 1903 | Returns t if a new message is displayed after the delete, or nil otherwise." | 1922 | Returns t if a new message is displayed after the delete, or nil otherwise." |
| 1904 | (interactive "P") | 1923 | (interactive "P") |
| 1905 | (rmail-set-attribute "deleted" t) | 1924 | (rmail-set-attribute "deleted" t) |
| 1925 | (run-hooks 'rmail-delete-message-hook) | ||
| 1906 | (let ((del-msg rmail-current-message)) | 1926 | (let ((del-msg rmail-current-message)) |
| 1907 | (if (rmail-summary-exists) | 1927 | (if (rmail-summary-exists) |
| 1908 | (rmail-select-summary | 1928 | (rmail-select-summary |