aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-17 23:44:04 +0000
committerRichard M. Stallman1993-06-17 23:44:04 +0000
commit015c5c558211bb5098a27e38dff6fc2afbc9a149 (patch)
treebb03da2afd7c52d487a3c97815da3220f8745f60
parent13b68be55f717b0ab79d3dcba150e4244f616116 (diff)
downloademacs-015c5c558211bb5098a27e38dff6fc2afbc9a149.tar.gz
emacs-015c5c558211bb5098a27e38dff6fc2afbc9a149.zip
(mail-citation-hook): New hook var.
(mail-yank-original): Use that hook if not nil.
-rw-r--r--lisp/mail/sendmail.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 6cb46213b29..39d2c3d1c79 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -80,12 +80,22 @@ nil means use indentation.")
80 "*Number of spaces to insert at the beginning of each cited line. 80 "*Number of spaces to insert at the beginning of each cited line.
81Used by `mail-yank-original' via `mail-yank-cite'.") 81Used by `mail-yank-original' via `mail-yank-cite'.")
82(defvar mail-yank-hooks '(mail-indent-citation) 82(defvar mail-yank-hooks '(mail-indent-citation)
83 "Obsolete hook for modifying a citation just inserted in the mail buffer.
84Each hook function can find the citation between (point) and (mark t).
85And each hook function should leave point and mark around the citation
86text as modified.
87
88This is a normal hook, misnamed for historical reasons.
89It is semi-obsolete and mail agents should no longer use it.")
90
91(defvar mail-citation-hook nil
83 "*Hook for modifying a citation just inserted in the mail buffer. 92 "*Hook for modifying a citation just inserted in the mail buffer.
84Each hook function can find the citation between (point) and (mark t). 93Each hook function can find the citation between (point) and (mark t).
85And each hook function should leave point and mark around the citation 94And each hook function should leave point and mark around the citation
86text as modified. 95text as modified.
87 96
88This is a normal hook, currently misnamed for historical reasons.") 97If this hook is entirely empty (nil), a default action is taken
98instead of no action.")
89 99
90(defvar mail-abbrevs-loaded nil) 100(defvar mail-abbrevs-loaded nil)
91(defvar mail-mode-map nil) 101(defvar mail-mode-map nil)
@@ -610,7 +620,9 @@ and don't delete any header fields."
610 (goto-char start) 620 (goto-char start)
611 (let ((mail-indentation-spaces (if arg (prefix-numeric-value arg) 621 (let ((mail-indentation-spaces (if arg (prefix-numeric-value arg)
612 mail-indentation-spaces))) 622 mail-indentation-spaces)))
613 (run-hooks 'mail-yank-hooks))) 623 (if mail-citation-hook
624 (run-hooks 'mail-citation-hook)
625 (run-hooks 'mail-yank-hooks))))
614 ;; This is like exchange-point-and-mark, but doesn't activate the mark. 626 ;; This is like exchange-point-and-mark, but doesn't activate the mark.
615 ;; It is cleaner to avoid activation, even though the command 627 ;; It is cleaner to avoid activation, even though the command
616 ;; loop would deactivate the mark because we inserted text. 628 ;; loop would deactivate the mark because we inserted text.