GNU bug report logs - #11353
M-x global-whitespace-mode, open file, M-x global-whitespace-mode, doesn't toggle off correctly

Previous Next

Package: emacs;

Reported by: Lars Petter Mostad <larspm <at> gmail.com>

Date: Thu, 26 Apr 2012 16:19:01 UTC

Severity: normal

Tags: fixed

Found in versions 24.3, 24.0.95

Fixed in version 24.4

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11353 in the body.
You can then email your comments to 11353 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11353; Package emacs. (Thu, 26 Apr 2012 16:19:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lars Petter Mostad <larspm <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 26 Apr 2012 16:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars Petter Mostad <larspm <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.95; whitespace-mode
Date: Thu, 26 Apr 2012 13:39:27 +0200
When opening file, then running M-x global-whitespace-mode, the running
M-x global-whitespace-mode, everything is OK.

When running M-x global-whitespace-mode, then opening file, and then
running M-x global-whitespace-mode, the mode line shows the WS minor
mode disappear, but whitespace is still highlighted.


In GNU Emacs 24.0.95.1 (i386-mingw-nt6.1.7601)
of 2012-04-03 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --with-gcc (4.6) --no-opt --enable-checking --cflags
-ID:/devel/emacs/libs/libXpm-3.5.8/include
-ID:/devel/emacs/libs/libXpm-3.5.8/src
-ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
-ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
-ID:/devel/emacs/libs/giflib-4.1.4-1/include
-ID:/devel/emacs/libs/jpeg-6b-4/include
-ID:/devel/emacs/libs/tiff-3.8.2-1/include
-ID:/devel/emacs/libs/gnutls-3.0.9/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: NOR
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e <tab> =E5 <tab> <backspace> p <tab> o r <tab>=20
<return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list... [2 times]

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils help-mode easymenu view time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp
w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11353; Package emacs. (Thu, 16 May 2013 14:42:02 GMT) Full text and rfc822 format available.

Message #8 received at 11353 <at> debbugs.gnu.org (full text, mbox):

From: Jeremy Moore <jmoore <at> ieee.org>
To: 11353 <at> debbugs.gnu.org
Cc: viniciusjl <at> ig.com.br
Subject: Suggested patch to whitespace.el
Date: Thu, 16 May 2013 15:41:14 +0100
[Message part 1 (text/plain, inline)]
(whitespace-turn-on-if-enabled) gets called multiple times by hooks when a
file is opened. The value of font-lock-keywords is changed by the first
call, and subsequent calls record that value into
whitespace-font-lock-keywords. When GWM is disabled, the value restored to
font-lock-keywords still includes highlighting for white space characters.

How's this change?

*** whitespace.el.orig    Thu May 16 15:22:05 2013
--- whitespace.el    Thu May 16 15:22:59 2013
*************** resultant list will be returned."
*** 2176,2183 ****
    (add-hook 'write-file-functions 'whitespace-write-file-hook nil t)
    ;; create whitespace local buffer environment
    (set (make-local-variable 'whitespace-font-lock-mode) nil)
!   (set (make-local-variable 'whitespace-font-lock) nil)
!   (set (make-local-variable 'whitespace-font-lock-keywords) nil)
    (set (make-local-variable 'whitespace-display-table) nil)
    (set (make-local-variable 'whitespace-display-table-was-local) nil)
    (set (make-local-variable 'whitespace-active-style)
--- 2176,2184 ----
    (add-hook 'write-file-functions 'whitespace-write-file-hook nil t)
    ;; create whitespace local buffer environment
    (set (make-local-variable 'whitespace-font-lock-mode) nil)
!   (unless whitespace-font-lock
!     (set (make-local-variable 'whitespace-font-lock) nil)
!     (set (make-local-variable 'whitespace-font-lock-keywords) nil))
    (set (make-local-variable 'whitespace-display-table) nil)
    (set (make-local-variable 'whitespace-display-table-was-local) nil)
    (set (make-local-variable 'whitespace-active-style)


Regards,
Jeremy Moore
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11353; Package emacs. (Sun, 02 Apr 2017 00:44:01 GMT) Full text and rfc822 format available.

Message #11 received at 11353 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Lars Petter Mostad <larspm <at> gmail.com>
Cc: 11353 <at> debbugs.gnu.org
Subject: Re: bug#11353: 24.0.95; whitespace-mode
Date: Sat, 01 Apr 2017 20:44:43 -0400
retitle 11353 M-x global-whitespace-mode, open file, M-x global-whitespace-mode, doesn't toggle off correctly
found 11353 24.3
tags 11353 fixed
close 11353 24.4
quit

Lars Petter Mostad <larspm <at> gmail.com> writes:

> When opening file, then running M-x global-whitespace-mode, the running
> M-x global-whitespace-mode, everything is OK.
>
> When running M-x global-whitespace-mode, then opening file, and then
> running M-x global-whitespace-mode, the mode line shows the WS minor
> mode disappear, but whitespace is still highlighted.

This happens in 24.3, but not in 24.4 and above.





Changed bug title to 'M-x global-whitespace-mode, open file, M-x global-whitespace-mode, doesn't toggle off correctly' from '24.0.95; whitespace-mode' Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sun, 02 Apr 2017 00:44:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 24.3. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sun, 02 Apr 2017 00:44:02 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sun, 02 Apr 2017 00:44:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.4, send any further explanations to 11353 <at> debbugs.gnu.org and Lars Petter Mostad <larspm <at> gmail.com> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sun, 02 Apr 2017 00:44:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 30 Apr 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 111 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.