# HG changeset patch # User Richard M. Stallman # Date 1013615993 0 # Node ID 08fa5680829b94ab198013e9eef14c5d609cc186 # Parent a98ecf783878e683d918e5274c9ef7437634e57a (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. diff -r a98ecf783878 -r 08fa5680829b lisp/mail/mailabbrev.el --- a/lisp/mail/mailabbrev.el Wed Feb 13 15:57:15 2002 +0000 +++ b/lisp/mail/mailabbrev.el Wed Feb 13 15:59:53 2002 +0000 @@ -317,7 +317,7 @@ (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 @@ (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 @@ (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,