Mercurial > emacs
comparison lisp/mail/sendmail.el @ 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 | 8154b7ce787e |
children | 7e2410ba8e41 |
comparison
equal
deleted
inserted
replaced
3815:41ef3e4adb0d | 3816:231b935db22c |
---|---|
78 nil means use indentation.") | 78 nil means use indentation.") |
79 (defvar mail-indentation-spaces 3 | 79 (defvar mail-indentation-spaces 3 |
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. |
81 Used by `mail-yank-original' via `mail-yank-cite'.") | 81 Used 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. | |
84 Each hook function can find the citation between (point) and (mark t). | |
85 And each hook function should leave point and mark around the citation | |
86 text as modified. | |
87 | |
88 This is a normal hook, misnamed for historical reasons. | |
89 It 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. |
84 Each hook function can find the citation between (point) and (mark t). | 93 Each hook function can find the citation between (point) and (mark t). |
85 And each hook function should leave point and mark around the citation | 94 And each hook function should leave point and mark around the citation |
86 text as modified. | 95 text as modified. |
87 | 96 |
88 This is a normal hook, currently misnamed for historical reasons.") | 97 If this hook is entirely empty (nil), a default action is taken |
98 instead 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) |
92 | 102 |
93 (autoload 'build-mail-aliases "mailalias" | 103 (autoload 'build-mail-aliases "mailalias" |
608 (if (consp arg) | 618 (if (consp arg) |
609 nil | 619 nil |
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. |
617 (goto-char (prog1 (mark t) | 629 (goto-char (prog1 (mark t) |
618 (set-marker (mark-marker) (point) (current-buffer)))) | 630 (set-marker (mark-marker) (point) (current-buffer)))) |