diff options
author | Gerd Moellmann <gerd@gnu.org> | 1999-10-31 13:59:19 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 1999-10-31 13:59:19 +0000 |
commit | 0e38b2a2206bae1fd4e120100615f8d51c316ed6 (patch) | |
tree | f1087583756a12850e6038989852e9ba25dd950d /lisp/whitespace.el | |
parent | e82bd92274ff748a89c86600abfecf8d68930f32 (diff) | |
download | emacs-0e38b2a2206bae1fd4e120100615f8d51c316ed6.tar.gz |
(whitespace-update-modeline): Bugfix to ensure
that the modeline display was updated *only* when
`whitespace-display-in-modeline' was set, not otherwise.
Diffstat (limited to 'lisp/whitespace.el')
-rw-r--r-- | lisp/whitespace.el | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/lisp/whitespace.el b/lisp/whitespace.el index b003798e65a..2b1385bf439 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -502,20 +502,21 @@ whitespace problems." "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 () |