changeset 26259:912b004387d9

(whitespace-update-modeline): Bugfix to ensure that the modeline display was updated *only* when `whitespace-display-in-modeline' was set, not otherwise.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 31 Oct 1999 13:59:19 +0000
parents 4ca4f3f6c4a0
children df4cf3aeebfc
files lisp/whitespace.el
diffstat 1 files changed, 15 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/whitespace.el	Sun Oct 31 13:04:20 1999 +0000
+++ b/lisp/whitespace.el	Sun Oct 31 13:59:19 1999 +0000
@@ -502,20 +502,21 @@
   "Update modeline with whitespace errors and whitespaces whose testing has
 been turned off."
   (if whitespace-display-in-modeline
-      (setq whitespace-mode-line nil)
-    ;; Whitespace errors
-    (if (and whitespace-err (not (equal whitespace-err "")))
-	(setq whitespace-mode-line whitespace-err))
-    ;; Whitespace suppressed errors
-    (let ((whitespace-unchecked (whitespace-unchecked-whitespaces)))
-      (if whitespace-unchecked
-	  (setq whitespace-mode-line
-		(concat whitespace-mode-line "!" whitespace-unchecked))))
-    ;; Add the whitespace modeline prefix
-    (setq whitespace-mode-line (if whitespace-mode-line
-				   (concat " W:" whitespace-mode-line)
-				 nil))
-    (whitespace-force-mode-line-update)))
+      (progn
+	(setq whitespace-mode-line nil)
+	;; Whitespace errors
+	(if (and whitespace-err (not (equal whitespace-err "")))
+	    (setq whitespace-mode-line whitespace-err))
+	;; Whitespace suppressed errors
+	(let ((whitespace-unchecked (whitespace-unchecked-whitespaces)))
+	  (if whitespace-unchecked
+	      (setq whitespace-mode-line
+		    (concat whitespace-mode-line "!" whitespace-unchecked))))
+	;; Add the whitespace modeline prefix
+	(setq whitespace-mode-line (if whitespace-mode-line
+				       (concat " W:" whitespace-mode-line)
+				     nil))
+	(whitespace-force-mode-line-update))))
 
 ;; Force mode line updation for different Emacs versions
 (defun whitespace-force-mode-line-update ()