Mercurial > emacs
changeset 3816:231b935db22c
(mail-citation-hook): New hook var.
(mail-yank-original): Use that hook if not nil.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 17 Jun 1993 23:44:04 +0000 |
parents | 41ef3e4adb0d |
children | e65e33390314 |
files | lisp/mail/sendmail.el |
diffstat | 1 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/sendmail.el Thu Jun 17 23:41:18 1993 +0000 +++ b/lisp/mail/sendmail.el Thu Jun 17 23:44:04 1993 +0000 @@ -80,12 +80,22 @@ "*Number of spaces to insert at the beginning of each cited line. Used by `mail-yank-original' via `mail-yank-cite'.") (defvar mail-yank-hooks '(mail-indent-citation) + "Obsolete hook for modifying a citation just inserted in the mail buffer. +Each hook function can find the citation between (point) and (mark t). +And each hook function should leave point and mark around the citation +text as modified. + +This is a normal hook, misnamed for historical reasons. +It is semi-obsolete and mail agents should no longer use it.") + +(defvar mail-citation-hook nil "*Hook for modifying a citation just inserted in the mail buffer. Each hook function can find the citation between (point) and (mark t). And each hook function should leave point and mark around the citation text as modified. -This is a normal hook, currently misnamed for historical reasons.") +If this hook is entirely empty (nil), a default action is taken +instead of no action.") (defvar mail-abbrevs-loaded nil) (defvar mail-mode-map nil) @@ -610,7 +620,9 @@ (goto-char start) (let ((mail-indentation-spaces (if arg (prefix-numeric-value arg) mail-indentation-spaces))) - (run-hooks 'mail-yank-hooks))) + (if mail-citation-hook + (run-hooks 'mail-citation-hook) + (run-hooks 'mail-yank-hooks)))) ;; This is like exchange-point-and-mark, but doesn't activate the mark. ;; It is cleaner to avoid activation, even though the command ;; loop would deactivate the mark because we inserted text.