X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/6946ae5b110a82d238c6546f29fec986f32d071b..2d8a544976354b3787e4f28f2d97b3ab96f4a052:/lisp/mail/mailabbrev.el diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index 64ca66ad45..1b94f179f9 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el @@ -1,6 +1,6 @@ ;;; mailabbrev.el --- abbrev-expansion of mail aliases -;; Copyright (C) 1985, 86, 87, 92, 93, 96, 1997, 2000, 2002 +;; Copyright (C) 1985, 86, 87, 92, 93, 96, 1997, 2000, 2002, 2003 ;; Free Software Foundation, Inc. ;; Author: Jamie Zawinski , now @@ -30,7 +30,7 @@ ;; This file ensures that, when the point is in a To:, CC:, BCC:, or From: ;; field, word-abbrevs are defined for each of your mail aliases. These ;; aliases will be defined from your .mailrc file (or the file specified by -;; the MAILRC environment variable) if it exists. Your mail aliases will +;; `mail-personal-alias-file') if it exists. Your mail aliases will ;; expand any time you type a word-delimiter at the end of an abbreviation. ;; ;; What you see is what you get: if mailabbrev is in use when you type @@ -111,10 +111,8 @@ ;; (add-hook ;; 'mail-mode-hook ;; (lambda () -;; (substitute-key-definition 'next-line 'mail-abbrev-next-line -;; mail-mode-map global-map) -;; (substitute-key-definition 'end-of-buffer 'mail-abbrev-end-of-buffer -;; mail-mode-map global-map))) +;; (define-key mail-mode-map [remap next-line] 'mail-abbrev-next-line) +;; (define-key mail-mode-map [remap end-of-buffer] 'mail-abbrev-end-of-buffer))) ;; ;; If you want multiple addresses separated by a string other than ", " then ;; you can set the variable mail-alias-separator-string to it. This has to @@ -163,12 +161,13 @@ no aliases, which is represented by this being a table with no entries.)") "The modification time of your mail alias file when it was last examined.") (defun mail-abbrevs-sync-aliases () - (if (file-exists-p mail-personal-alias-file) - (let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) - (if (not (equal mail-abbrev-modtime modtime)) - (progn - (setq mail-abbrev-modtime modtime) - (build-mail-abbrevs)))))) + (when mail-personal-alias-file + (if (file-exists-p mail-personal-alias-file) + (let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) + (if (not (equal mail-abbrev-modtime modtime)) + (progn + (setq mail-abbrev-modtime modtime) + (build-mail-abbrevs))))))) ;;;###autoload (defun mail-abbrevs-setup () @@ -420,6 +419,11 @@ of a mail alias. The value is set up, buffer-local, when first needed.") (set-char-table-range tab key w)))) tab) (modify-syntax-entry ?@ "w" tab) + (modify-syntax-entry ?% "w" tab) + (modify-syntax-entry ?! "w" tab) + (modify-syntax-entry ?. "w" tab) + (modify-syntax-entry ?_ "w" tab) + (modify-syntax-entry ?- "w" tab) (setq mail-abbrev-syntax-table tab)))) (defun mail-abbrev-in-expansion-header-p () @@ -622,4 +626,5 @@ Don't use this command in Lisp programs! (if mail-abbrevs-mode (mail-abbrevs-enable)) +;;; arch-tag: 5aa2d901-73f8-4ad7-b73c-4802282ad2ff ;;; mailabbrev.el ends here