From 20af777c0f2bb6127991727f6d113a43cc7aaad8 Mon Sep 17 00:00:00 2001 From: Simon Marshall Date: Wed, 6 Jan 1999 10:16:28 +0000 Subject: [PATCH] * lazy-lock.el (lazy-lock-unstall): (lazy-lock-fontify-after-idle): When using with-temp-message, use nil rather than current-message. --- lisp/lazy-lock.el | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lisp/lazy-lock.el b/lisp/lazy-lock.el index e2a48fbe3cd..6cd27cafb3b 100644 --- a/lisp/lazy-lock.el +++ b/lisp/lazy-lock.el @@ -313,10 +313,15 @@ The value returned is the value of the last form in BODY." ;; 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 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'." (> (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 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'." (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)) -- 2.39.2