changeset 20810:55e8d6d2c3b1

(define-mail-alias): If FROM-MAILRC-FILE, don't call sendmail-sync-aliases. (build-mail-aliases): Clear mail-aliases to nil at the beginning.
author Richard M. Stallman <rms@gnu.org>
date Sun, 01 Feb 1998 23:56:13 +0000
parents c582e15d8cfc
children 1e07c8543929
files lisp/mail/mailalias.el
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/mailalias.el	Sun Feb 01 19:13:59 1998 +0000
+++ b/lisp/mail/mailalias.el	Sun Feb 01 23:56:13 1998 +0000
@@ -238,6 +238,9 @@
   "Read mail aliases from personal aliases file and set `mail-aliases'.
 By default, this is the file specified by `mail-personal-alias-file'."
   (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.
+  (setq mail-aliases nil)
   (let ((buffer nil)
 	(obuf (current-buffer)))
     (unwind-protect
@@ -302,7 +305,9 @@
 
   (interactive "sDefine mail alias: \nsDefine %s as mail alias for: ")
   ;; Read the defaults first, if we have not done so.
-  (sendmail-sync-aliases)
+  ;; But not if we are doing that already right now.
+  (unless from-mailrc-file
+    (sendmail-sync-aliases))
   (if (eq mail-aliases t)
       (progn
 	(setq mail-aliases nil)