emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] whitespace.el leaves a spurious entry in post-command-hook


From: Geoff Gole
Subject: [PATCH] whitespace.el leaves a spurious entry in post-command-hook
Date: Mon, 9 Aug 2010 06:35:26 +0800

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]