changeset 42076:d6765861f6ea

(with-temp-message): At the end, always discard the temp message, even by clearing the echo area.
author Richard M. Stallman <rms@gnu.org>
date Sun, 16 Dec 2001 17:41:20 +0000
parents a39583392219
children 3a0f6537e4e9
files lisp/subr.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Sun Dec 16 17:27:44 2001 +0000
+++ b/lisp/subr.el	Sun Dec 16 17:41:20 2001 +0000
@@ -1216,8 +1216,10 @@
 	       (setq ,current-message (current-message))
 	       (message "%s" ,temp-message))
 	     ,@body)
-	 (and ,temp-message ,current-message
-	      (message "%s" ,current-message))))))
+	 (and ,temp-message
+	      (if ,current-message
+		  (message "%s" ,current-message)
+		(message nil)))))))
 
 (defmacro with-temp-buffer (&rest body)
   "Create a temporary buffer, and evaluate BODY there like `progn'.