comparison lisp/whitespace.el @ 109911:3ec7871b5633

* whitespace.el (whitespace-color-off): Remove post-command-hook locally.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 08 Aug 2010 22:23:35 -0400
parents 181539c8b6a4
children fe84742c509a
comparison
equal deleted inserted replaced
109715:843bffdd92eb 109911:3ec7871b5633
2295 (defun whitespace-color-off () 2295 (defun whitespace-color-off ()
2296 "Turn off color visualization." 2296 "Turn off color visualization."
2297 ;; turn off font lock 2297 ;; turn off font lock
2298 (when (whitespace-style-face-p) 2298 (when (whitespace-style-face-p)
2299 (font-lock-mode 0) 2299 (font-lock-mode 0)
2300 (remove-hook 'post-command-hook #'whitespace-post-command-hook) 2300 (remove-hook 'post-command-hook #'whitespace-post-command-hook t)
2301 (when whitespace-font-lock 2301 (when whitespace-font-lock
2302 (setq whitespace-font-lock nil 2302 (setq whitespace-font-lock nil
2303 font-lock-keywords whitespace-font-lock-keywords)) 2303 font-lock-keywords whitespace-font-lock-keywords))
2304 ;; restore original font lock state 2304 ;; restore original font lock state
2305 (font-lock-mode whitespace-font-lock-mode))) 2305 (font-lock-mode whitespace-font-lock-mode)))