changeset 112252:6409a00a5462

* whitespace.el (global-whitespace-newline-mode): Fix call to minor mode which used nil accidentally to mean "turn off".
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 10 Jan 2011 19:14:25 -0500
parents 014879f0bfbb
children b0afc08be821
files lisp/ChangeLog lisp/whitespace.el
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Jan 10 21:36:09 2011 +0100
+++ b/lisp/ChangeLog	Mon Jan 10 19:14:25 2011 -0500
@@ -1,3 +1,8 @@
+2011-01-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* whitespace.el (global-whitespace-newline-mode): Fix call (bug#7810)
+	to minor mode which used nil accidentally to mean "turn off".
+
 2011-01-10  Michael Albinus  <michael.albinus@gmx.de>
 
 	* net/tramp.el (tramp-find-inline-compress)
--- a/lisp/whitespace.el	Mon Jan 10 21:36:09 2011 +0100
+++ b/lisp/whitespace.el	Mon Jan 10 19:14:25 2011 -0500
@@ -1188,7 +1188,8 @@
   :global     t
   :group      'whitespace
   (let ((whitespace-style '(newline-mark newline)))
-    (global-whitespace-mode global-whitespace-newline-mode)
+    (global-whitespace-mode (if global-whitespace-newline-mode
+                                1 -1))
     ;; sync states (running a batch job)
     (setq global-whitespace-newline-mode global-whitespace-mode)))