From 53aff12a2f57ca0830b425a6097d93bb8da637ca Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 13 Dec 2010 20:42:59 -0800 Subject: [PATCH] Make build-mail-aliases an interactive command. * lisp/mail/mailalias.el (build-mail-aliases): Make it interactive. * lisp/mail/sendmail.el (build-mail-aliases): Update autoload. * doc/misc/faq.texi (Expanding aliases when sending mail): Now build-mail-aliases is interactive. --- doc/misc/ChangeLog | 11 ++++++++--- doc/misc/faq.texi | 10 +++++----- lisp/ChangeLog | 3 +++ lisp/mail/mailalias.el | 11 ++++++++--- lisp/mail/sendmail.el | 2 +- 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index c26b3872c0..1ddabaaa70 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,12 +1,17 @@ +2010-12-14 Glenn Morris + + * faq.texi (Expanding aliases when sending mail): + Now build-mail-aliases is interactive. + 2010-12-13 Andrew Cohen * gnus.texi: First pass at adding (rough) nnir documentation. 2010-12-13 Lars Magne Ingebrigtsen - * gnus.texi (Filtering New Groups): Mention - gnus-auto-subscribed-categories. - (The First Time): Removed, since default-subscribed-newsgroups has been + * gnus.texi (Filtering New Groups): + Mention gnus-auto-subscribed-categories. + (The First Time): Remove, since default-subscribed-newsgroups has been removed. 2010-12-13 Glenn Morris diff --git a/doc/misc/faq.texi b/doc/misc/faq.texi index ee5f72ac30..afcd6098af 100644 --- a/doc/misc/faq.texi +++ b/doc/misc/faq.texi @@ -4299,12 +4299,12 @@ file. Normally, Emacs expands aliases when you send the message. To expand them before this, use @kbd{M-x expand-mail-aliases}. -@c FIXME there should be an interactive rebuild command for this. @item -Emacs normally only reads the @file{.mailrc} file once per session, -when you start to compose your first mail message. If you edit -@file{.mailrc}, you can type @kbd{M-: (build-mail-aliases) @key{RET}} to -make Emacs reread @file{~/.mailrc}. +Emacs normally only reads the @file{.mailrc} file once per session, when +you start to compose your first mail message. If you edit the file +after this, you can use @kbd{M-x build-mail-aliases} to make Emacs +reread it. Prior to Emacs 24.1, this is not an interactive command, so +you must instead type @kbd{M-: (build-mail-aliases) @key{RET}}. @item If you like, you can expand mail aliases as abbrevs, as soon as you diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 19cd1963cf..75075e9b20 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-12-14 Glenn Morris + * mail/mailalias.el (build-mail-aliases): Make it interactive. + * mail/sendmail.el (build-mail-aliases): Update autoload. + * dired.el (dired-trivial-filenames, dired-chown-program) (dired-auto-revert-buffer): Remove autoload cookies. * mail/sendmail.el (mail-recover-1): Require 'dired. diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el index 8bf5305895..fbf60bbe36 100644 --- a/lisp/mail/mailalias.el +++ b/lisp/mail/mailalias.el @@ -1,7 +1,8 @@ ;;; mailalias.el --- expand and complete mailing address aliases -;; Copyright (C) 1985, 1987, 1995, 1996, 1997, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1995, 1996, 1997, 2001, 2002, 2003, 2004, +;; 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: mail @@ -240,6 +241,11 @@ removed from alias expansions." (defun build-mail-aliases (&optional file) "Read mail aliases from personal aliases file and set `mail-aliases'. By default, this is the file specified by `mail-personal-alias-file'." + (interactive + (list + (read-file-name (format "Read mail alias file (default %s): " + mail-personal-alias-file) + nil mail-personal-alias-file t))) (setq file (expand-file-name (or file mail-personal-alias-file))) ;; In case mail-aliases is t, make sure define-mail-alias ;; does not recursively call build-mail-aliases. @@ -562,5 +568,4 @@ See `mail-directory-stream'." (provide 'mailalias) -;; arch-tag: 1d6a0f87-eb34-4d45-8816-60c1b952cf46 ;;; mailalias.el ends here diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index fb19354453..5c0176cea0 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -384,7 +384,7 @@ The default value matches citations like `foo-bar>' plus whitespace." (autoload 'build-mail-aliases "mailalias" "Read mail aliases from personal aliases file and set `mail-aliases'. -By default, this is the file specified by `mail-personal-alias-file'.") +By default, this is the file specified by `mail-personal-alias-file'." t) ;;;###autoload (defcustom mail-signature t -- 2.20.1