changeset 111959:4db798bcd48b

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.
author Glenn Morris <rgm@gnu.org>
date Mon, 13 Dec 2010 20:42:59 -0800
parents 707b726cfaed
children b856b44c139b
files doc/misc/ChangeLog doc/misc/faq.texi lisp/ChangeLog lisp/mail/mailalias.el lisp/mail/sendmail.el
diffstat 5 files changed, 25 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/doc/misc/ChangeLog	Mon Dec 13 20:35:33 2010 -0800
+++ b/doc/misc/ChangeLog	Mon Dec 13 20:42:59 2010 -0800
@@ -1,12 +1,17 @@
+2010-12-14  Glenn Morris  <rgm@gnu.org>
+
+	* faq.texi (Expanding aliases when sending mail):
+	Now build-mail-aliases is interactive.
+
 2010-12-13  Andrew Cohen  <cohen@andy.bu.edu>
 
 	* gnus.texi: First pass at adding (rough) nnir documentation.
 
 2010-12-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-	* 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  <rgm@gnu.org>
--- a/doc/misc/faq.texi	Mon Dec 13 20:35:33 2010 -0800
+++ b/doc/misc/faq.texi	Mon Dec 13 20:42:59 2010 -0800
@@ -4299,12 +4299,12 @@
 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
--- a/lisp/ChangeLog	Mon Dec 13 20:35:33 2010 -0800
+++ b/lisp/ChangeLog	Mon Dec 13 20:42:59 2010 -0800
@@ -1,5 +1,8 @@
 2010-12-14  Glenn Morris  <rgm@gnu.org>
 
+	* 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.
--- a/lisp/mail/mailalias.el	Mon Dec 13 20:35:33 2010 -0800
+++ b/lisp/mail/mailalias.el	Mon Dec 13 20:42:59 2010 -0800
@@ -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 @@
 (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 @@
 
 (provide 'mailalias)
 
-;; arch-tag: 1d6a0f87-eb34-4d45-8816-60c1b952cf46
 ;;; mailalias.el ends here
--- a/lisp/mail/sendmail.el	Mon Dec 13 20:35:33 2010 -0800
+++ b/lisp/mail/sendmail.el	Mon Dec 13 20:42:59 2010 -0800
@@ -384,7 +384,7 @@
 
 (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