From unknown Mon Aug 18 09:02:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11353: 24.0.95; whitespace-mode Resent-From: Lars Petter Mostad Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Apr 2012 16:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11353 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11353@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.133545711217139 (code B ref -1); Thu, 26 Apr 2012 16:19:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Apr 2012 16:18:32 +0000 Received: from localhost ([127.0.0.1]:54529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNROp-0004SN-Hp for submit@debbugs.gnu.org; Thu, 26 Apr 2012 12:18:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34430) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNN43-0004oj-DS for submit@debbugs.gnu.org; Thu, 26 Apr 2012 07:40:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNN30-0001jp-C4 for submit@debbugs.gnu.org; Thu, 26 Apr 2012 07:39:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:58683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNN30-0001jk-5u for submit@debbugs.gnu.org; Thu, 26 Apr 2012 07:39:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNN2t-0005NW-Rk for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2012 07:39:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SNN2o-0001QW-1A for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2012 07:39:35 -0400 Received: from mail-yw0-f41.google.com ([209.85.213.41]:42901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SNN2n-0001Mh-Q4 for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2012 07:39:29 -0400 Received: by yhr47 with SMTP id 47so935973yhr.0 for ; Thu, 26 Apr 2012 04:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=94JfhGpIU1croDECgxy300PPmPD+U19/uMJSP1IImEY=; b=AUU7s1CYUtiak4uXsbNv6wrGBgbFNfmdzwptA7X6KAL/1jQi6QumZFv9lhlDVf76jI 1eK8lcwDx0pD+a2hcOFAafUQK6vfAZMKLEWq9exvV5pi+viVtSQqemAQdlq+aNE/JDYg OvkUI6mVZFvM8yqvyelHzb6RyRMMZHkbmxNCMQon6oCstCJHwkTlizX/2NUyZs3VOTyJ ENbGfS7/VesGWZMFO2YQQGCPZs7503Oj6OdiyCItGVm2tEL6DRv9rxi38ZsryoqIvzN8 Ito8FhlIm+pQcfu3C05pRwjWblSjMntvWeMEDX1UDJCIshEwcpP4HwUc2lJgRA0UZDiS M9NQ== MIME-Version: 1.0 Received: by 10.236.75.232 with SMTP id z68mr6509111yhd.6.1335440367251; Thu, 26 Apr 2012 04:39:27 -0700 (PDT) Received: by 10.101.113.14 with HTTP; Thu, 26 Apr 2012 04:39:27 -0700 (PDT) Date: Thu, 26 Apr 2012 13:39:27 +0200 Message-ID: From: Lars Petter Mostad Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Mailman-Approved-At: Thu, 26 Apr 2012 12:18:30 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) 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 =E5 p o r =20 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) From unknown Mon Aug 18 09:02:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11353: Suggested patch to whitespace.el References: In-Reply-To: Resent-From: Jeremy Moore Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 May 2013 14:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11353 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11353@debbugs.gnu.org Cc: viniciusjl@ig.com.br Received: via spool by 11353-submit@debbugs.gnu.org id=B11353.136871529527197 (code B ref 11353); Thu, 16 May 2013 14:42:02 +0000 Received: (at 11353) by debbugs.gnu.org; 16 May 2013 14:41:35 +0000 Received: from localhost ([127.0.0.1]:47503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UczN8-00074c-IQ for submit@debbugs.gnu.org; Thu, 16 May 2013 10:41:34 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:61968) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UczN5-00074N-0Y for 11353@debbugs.gnu.org; Thu, 16 May 2013 10:41:31 -0400 Received: by mail-wg0-f53.google.com with SMTP id y10so2802313wgg.20 for <11353@debbugs.gnu.org>; Thu, 16 May 2013 07:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:cc:content-type; bh=cFVoV1QMP95egrlEtjAOs2SXeaGqB6RUbS0a43X6h4s=; b=g+sWkqffxdw/yJM5xONHj4w5Ao/2OGdy3WNw/ygywwU8OGW280plJS/2HYtfBM9Eo8 BlXEjfm8ViNGQqC9Lx6btSd0V+bmpCXN7LHZuAEUlEf1WuBqJZh+JfE4o6bppRKY+Mm9 x+f/AcgDUsaREpDhO0HMafxY/nu/UBj3SQ/ltS/tJkfbmXdJcKkQLhbVJNO0Yuv4JRhL 1CWpfa73lXu75dfmyxUqUdW66E5rTMLZIyxvkZ5zSuw49wIqik/NM+UCQJcQLnDAuyOl d6mXifVgPfoyACJCxhP/Dix1Xcbrs1ZNwWIh3WEosnrySfeBttvfp0S3DWtT146IDijC HD1Q== MIME-Version: 1.0 X-Received: by 10.180.189.41 with SMTP id gf9mr24977685wic.32.1368715274295; Thu, 16 May 2013 07:41:14 -0700 (PDT) Received: by 10.180.105.199 with HTTP; Thu, 16 May 2013 07:41:14 -0700 (PDT) Date: Thu, 16 May 2013 15:41:14 +0100 X-Google-Sender-Auth: Z5mp8u6BRrMGfqiL_CWjZD7-Fi0 Message-ID: From: Jeremy Moore Content-Type: multipart/alternative; boundary=001a11c34830b91e9604dcd6dbd7 X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --001a11c34830b91e9604dcd6dbd7 Content-Type: text/plain; charset=ISO-8859-1 (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 --001a11c34830b91e9604dcd6dbd7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
(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-k= eywords still includes highlighting for white space characters.

How's this change?

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


= Regards,
Jeremy Moore
--001a11c34830b91e9604dcd6dbd7-- From unknown Mon Aug 18 09:02:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11353: 24.0.95; whitespace-mode Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Apr 2017 00:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11353 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Petter Mostad Cc: 11353@debbugs.gnu.org Received: via spool by 11353-submit@debbugs.gnu.org id=B11353.149109380820959 (code B ref 11353); Sun, 02 Apr 2017 00:44:01 +0000 Received: (at 11353) by debbugs.gnu.org; 2 Apr 2017 00:43:28 +0000 Received: from localhost ([127.0.0.1]:56158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuTc7-0005Rv-Nl for submit@debbugs.gnu.org; Sat, 01 Apr 2017 20:43:27 -0400 Received: from mail-it0-f45.google.com ([209.85.214.45]:36310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuTc5-0005Ra-OT; Sat, 01 Apr 2017 20:43:26 -0400 Received: by mail-it0-f45.google.com with SMTP id e75so30771530itd.1; Sat, 01 Apr 2017 17:43:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=dzYUbADVGR6XQEsF3ViRZXb87JqkWLYy94dw2PzYy/8=; b=G9aFvPoOxBez0iZQC9a/V2ERQ7vygo3aRALHdgQvI851LyPvAf67X2aZ6wRKvx1I6z clZX7FLDcnFF2deOSI59qUAMmwGyEeaL6uvthWZs6Qal9fPt7zzSuh0a0xwl/Zci2k+e /mAOLZOavr5vvdWIYBov6tW9ud8w/VkExyMq2TvyF0oC4iQQ2I0oGJs62qj0Y0BAYuDU OoPkLDSrVGiGt+0jMJk2ZfBSA5OggpYBQrP78AAuvRELMNprsavkgrpWGywZ3grHUK0H R3Hji1YUA4CZgJjHUgJZfCw+sG3ZWC6NVrBd8Nha73/H6tBsIqpfKKJeEUxwfu+Rnowp KTnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=dzYUbADVGR6XQEsF3ViRZXb87JqkWLYy94dw2PzYy/8=; b=e+PxalMpan7BEZmkMkb+s6LgC0zihPz3sauG5T+UDBof8aZr3NrIfCXNjrK6imE/Oq 7i+lgjomtiRcyjO5OQuLjA652MBxkDR3DJJsnEkjEgASCi1T7eZ/c2msbwLibO8e/CKR N7NlVK6VWLUJmjPMzOJBKiN6kFIYwdcxJeA607FI81IpzK7ao7080xOWoLYlVSkoRZBb dqeDhYjNOrMmAstUQEUXwr7cDoFPUapWERHDX4yV0Kee6xpHlU1ixGmtPM9kYzcWoYA+ 6f7HnnMIelRdskZDkmlDyaPzDl0IWw+Cojh/mXt91kNhtyiqFAgZVzmK5ezzy0bY/hLf I/9g== X-Gm-Message-State: AFeK/H1/Sk9iBkDtqQxctrfpXURzqEvz7Uv/qA0e7a0Dk3O0ac4uEQxf Mr2QLRYPvB9nHg== X-Received: by 10.36.252.65 with SMTP id b62mr4300415ith.38.1491093800278; Sat, 01 Apr 2017 17:43:20 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 202sm3649207ith.7.2017.04.01.17.43.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Apr 2017 17:43:19 -0700 (PDT) From: npostavs@users.sourceforge.net References: Date: Sat, 01 Apr 2017 20:44:43 -0400 In-Reply-To: (Lars Petter Mostad's message of "Thu, 26 Apr 2012 13:39:27 +0200") Message-ID: <87pogvzlhg.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) 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 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.