aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-02-13 15:59:53 +0000
committerRichard M. Stallman <[email protected]>2002-02-13 15:59:53 +0000
commit8fad672be93e409400d284463ddb391945395a23 (patch)
tree8d47606d1718f9867df22b83dcfa249c841d5f65
parent5b1d5e6373f928d95c3c5d7a826cc4fa115846b5 (diff)
(define-mail-abbrev): Define as system abbrev.
(mail-abbrev-in-expansion-header-p): Copy the code of mail-header-end to avoid needing sendmail.el at run time.
-rw-r--r--lisp/mail/mailabbrev.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index 5243438fbe..75e8d54e55 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -317,7 +317,7 @@ If DEFINITION contains multiple addresses, separate them with commas."
(setq name (downcase name))
;; use an abbrev table instead of an alist for mail-abbrevs.
(let ((abbrevs-changed abbrevs-changed)) ; protect this from being changed.
- (define-abbrev mail-abbrevs name definition 'mail-abbrev-expand-hook)))
+ (define-abbrev mail-abbrevs name definition 'mail-abbrev-expand-hook 0 t)))
(defun mail-resolve-all-aliases ()
@@ -418,7 +418,12 @@ of a mail alias. The value is set up, buffer-local, when first needed.")
(looking-at mail-abbrev-mode-regexp))
;;
;; ...and are we in the headers?
- (< (point) (mail-header-end)))))
+ (< (point)
+ (save-restriction
+ (widen)
+ (save-excursion
+ (rfc822-goto-eoh)
+ (point)))))))
(defvar mail-mode-abbrev-table) ; quiet the compiler
@@ -464,6 +469,7 @@ of a mail alias. The value is set up, buffer-local, when first needed.")
(if (equal value _)
(set-char-table-range tab key w))))
tab)
+ (modify-syntax-entry ?@ "w" tab)
(setq mail-abbrev-syntax-table tab)))
;; If the character just typed was non-alpha-symbol-syntax,