* bug#7810: 24.0.50; global-whitespace-newline-mode impossible to turn off
@ 2011-01-09 18:17 Deniz Dogan
2011-01-11 0:16 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Deniz Dogan @ 2011-01-09 18:17 UTC (permalink / raw)
To: 7810
I start Emacs with the -Q switch.
M-x global-whitespace-newline-mode RET
(Global-Whitespace-Newline mode enabled)
Then I want to turn it off:
M-x global-whitespace-newline-mode RET
(Global-Whitespace-Newline mode enabled)
As you can see, it is still enabled. The mode line shows "Fundamental
NL WS". It is possible to turn off global-whitespace-mode but
global-whitespace-newline-mode is still in effect. I tried to execute
(global-whitespace-newline-mode nil) and
(global-whitespace-newline-mode 0) as well, but neither of them turn
the mode off.
I think it is impossible to turn off global-whitespace-newline-mode.
--
Deniz Dogan
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#7810: 24.0.50; global-whitespace-newline-mode impossible to turn off
2011-01-09 18:17 bug#7810: 24.0.50; global-whitespace-newline-mode impossible to turn off Deniz Dogan
@ 2011-01-11 0:16 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2011-01-11 0:16 UTC (permalink / raw)
To: Deniz Dogan; +Cc: 7810
close 7810
thanks
> I start Emacs with the -Q switch.
> M-x global-whitespace-newline-mode RET
> (Global-Whitespace-Newline mode enabled)
> Then I want to turn it off:
> M-x global-whitespace-newline-mode RET
> (Global-Whitespace-Newline mode enabled)
> As you can see, it is still enabled. The mode line shows "Fundamental
> NL WS".
Indeed, under Emacs-23, it still worked, tho it returned a message
"Toggling global-whitespace-mode off; better pass an explicit argument".
I've installed the fix below in the emacs-23 branch, which should
fix it.
Stefan
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2011-01-10 20:36:09 +0000
+++ lisp/ChangeLog 2011-01-11 00:13:33 +0000
@@ -1,3 +1,8 @@
+2011-01-11 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * whitespace.el (global-whitespace-newline-mode): Fix call
+ 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)
=== modified file 'lisp/whitespace.el'
--- lisp/whitespace.el 2011-01-02 23:50:46 +0000
+++ lisp/whitespace.el 2011-01-11 00:11:37 +0000
@@ -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)))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-11 0:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-09 18:17 bug#7810: 24.0.50; global-whitespace-newline-mode impossible to turn off Deniz Dogan
2011-01-11 0:16 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).