From 8fad672be93e409400d284463ddb391945395a23 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 13 Feb 2002 15:59:53 +0000 Subject: [PATCH] (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. --- lisp/mail/mailabbrev.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index 5243438fbe8..75e8d54e555 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, -- 2.39.2