[Top][All Lists]
[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))
- [PATCH] whitespace.el leaves a spurious entry in post-command-hook,
Geoff Gole <=