From: Jeremy Moore <jmoore@ieee.org>
To: 11353@debbugs.gnu.org
Cc: viniciusjl@ig.com.br
Subject: bug#11353: Suggested patch to whitespace.el
Date: Thu, 16 May 2013 15:41:14 +0100 [thread overview]
Message-ID: <CAAGDvYKwJxtonXaavJd4ggS4ANrO3KGPqwU6WakB=Vyz2-TtoA@mail.gmail.com> (raw)
In-Reply-To: <CAC-Dm27Cti02SKyhJfvmraYj9+6izv1VJMM9gV80Xf3yqGf-Tw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]
(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
[-- Attachment #2: Type: text/html, Size: 1807 bytes --]
next prev parent reply other threads:[~2013-05-16 14:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 11:39 bug#11353: 24.0.95; whitespace-mode Lars Petter Mostad
2013-05-16 14:41 ` Jeremy Moore [this message]
2017-04-02 0:44 ` npostavs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAGDvYKwJxtonXaavJd4ggS4ANrO3KGPqwU6WakB=Vyz2-TtoA@mail.gmail.com' \
--to=jmoore@ieee.org \
--cc=11353@debbugs.gnu.org \
--cc=viniciusjl@ig.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.