(with-temp-message): At the end, always discard
authorRichard M. Stallman <rms@gnu.org>
Sun, 16 Dec 2001 17:41:30 +0000 (17:41 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 16 Dec 2001 17:41:30 +0000 (17:41 +0000)
the temp message, even by clearing the echo area.

lisp/ChangeLog
lisp/subr.el

index 612a7ea..6af9ae7 100644 (file)
@@ -1,3 +1,10 @@
+2001-12-16  Richard M. Stallman  <rms@gnu.org>
+
+       * subr.el (with-temp-message): At the end, always discard
+       the temp message, even by clearing the echo area.
+
+       * progmodes/sh-script.el (sh-mode): Run sh-mode-hook.
+
 2001-12-16  Stefan Monnier  <monnier@cs.yale.edu>
 
        * international/fontset.el: Build the list L at compile time.
index 4029b7f..6296d6a 100644 (file)
@@ -1216,8 +1216,10 @@ Use a MESSAGE of \"\" to temporarily clear the echo area."
               (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'.