unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] whitespace.el leaves a spurious entry in post-command-hook
@ 2010-08-08 22:35 Geoff Gole
  2010-08-09  2:23 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Geoff Gole @ 2010-08-08 22:35 UTC (permalink / raw)
  To: Emacs development discussions

Start an emacs -Q and do M-x whitespace-mode twice. There will be a
local entry left in post-command-hook.

The cause is that an appropriate call to remove-hook exists, but lacks
the `local' argument. The fix is to add it:

*** /usr/local/share/emacs/24.0.50/lisp/whitespace.el.gz
--- /tmp/buffer-content-4209UhA
***************
*** 2296,2302 ****
    ;; turn off font lock
    (when (whitespace-style-face-p)
      (font-lock-mode 0)
!     (remove-hook 'post-command-hook #'whitespace-post-command-hook)
      (when whitespace-font-lock
        (setq whitespace-font-lock nil
  	    font-lock-keywords   whitespace-font-lock-keywords))
--- 2296,2302 ----
    ;; turn off font lock
    (when (whitespace-style-face-p)
      (font-lock-mode 0)
!     (remove-hook 'post-command-hook #'whitespace-post-command-hook t)
      (when whitespace-font-lock
        (setq whitespace-font-lock nil
  	    font-lock-keywords   whitespace-font-lock-keywords))



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] whitespace.el leaves a spurious entry in post-command-hook
  2010-08-08 22:35 [PATCH] whitespace.el leaves a spurious entry in post-command-hook Geoff Gole
@ 2010-08-09  2:23 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2010-08-09  2:23 UTC (permalink / raw)
  To: Geoff Gole; +Cc: Emacs development discussions

Geoff Gole <geoffgole@gmail.com> writes:

> Start an emacs -Q and do M-x whitespace-mode twice. There will be a
> local entry left in post-command-hook.
>
> The cause is that an appropriate call to remove-hook exists, but lacks
> the `local' argument. The fix is to add it:

Thanks.  I've checked your fix into the emacs-23 branch.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-09  2:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-08 22:35 [PATCH] whitespace.el leaves a spurious entry in post-command-hook Geoff Gole
2010-08-09  2:23 ` Chong Yidong

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).