Commit 8fad672b authored by Richard M. Stallman's avatar Richard M. Stallman

(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.
parent 5b1d5e63
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment