changeset 24004:42a8238f0597

* lazy-lock.el (lazy-lock-unstall): (lazy-lock-fontify-after-idle): When using with-temp-message, use nil rather than current-message.
author Simon Marshall <simon@gnu.org>
date Wed, 06 Jan 1999 10:16:28 +0000
parents 5048f069091e
children c78112715e6c
files lisp/lazy-lock.el
diffstat 1 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/lazy-lock.el	Wed Jan 06 10:14:25 1999 +0000
+++ b/lisp/lazy-lock.el	Wed Jan 06 10:16:28 1999 +0000
@@ -313,10 +313,15 @@
   ;; We use this for compatibility with a future Emacs.
   (or (fboundp 'with-temp-message)
       (defmacro with-temp-message (message &rest body)
-	(` (let ((current-message (current-message)))
+	(` (let ((temp-message (, message)) current-message)
 	     (unwind-protect
-		 (progn (message (, message)) (,@ body))
-	       (message current-message))))))
+		 (progn
+		   (when temp-message
+		     (setq current-message (current-message))
+		     (message temp-message))
+		   (,@ body))
+	       (when temp-message
+		 (message current-message)))))))
   ;;
   ;; We use this for compatibility with a future Emacs.
   (or (fboundp 'defcustom)
@@ -680,9 +685,8 @@
 			 (> (buffer-size) font-lock-verbose)
 		       font-lock-verbose)))
 	(with-temp-message
-	    (if verbose
-		(format "Fontifying %s..." (buffer-name))
-	      (current-message))
+	    (when verbose
+	      (format "Fontifying %s..." (buffer-name)))
 	  ;; Make sure we fontify etc. in the whole buffer.
 	  (save-restriction
 	    (widen)
@@ -875,9 +879,8 @@
 	      (setq continue (not (input-pending-p)))
 	    ;; Fontify regions in this buffer while there is no input.
 	    (with-temp-message
-		(if lazy-lock-stealth-verbose
-		    "Fontifying stealthily..."
-		  (current-message))
+		(when lazy-lock-stealth-verbose
+		  "Fontifying stealthily...")
 	      (do-while (and (lazy-lock-unfontified-p) continue)
 		(if (and lazy-lock-stealth-load
 			 (> (car (load-average)) lazy-lock-stealth-load))