Mercurial > emacs
changeset 91377:510381911395
Use find-file-hook instead of find-file-hooks.
author | Vinicius Jose Latorre <viniciusjl@ig.com.br> |
---|---|
date | Fri, 01 Feb 2008 18:52:51 +0000 |
parents | 0e2ade584fbb |
children | 8d3c0976b01f |
files | lisp/ChangeLog lisp/whitespace.el |
diffstat | 2 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Feb 01 16:05:01 2008 +0000 +++ b/lisp/ChangeLog Fri Feb 01 18:52:51 2008 +0000 @@ -3374,6 +3374,12 @@ utf-8.el, and utf-8-subst.el as they can't be bytecompiled currently. This is just a temporary workaround. +2008-02-01 Vinicius Jose Latorre <viniciusjl@ig.com.br> + + * whitespace.el (global-whitespace-mode): Use `find-file-hook' instead + of `find-file-hooks'. + (global-whitespace-toggle-options): Doc fix. + 2008-02-01 Juanma Barranquero <lekktu@gmail.com> * whitespace.el (whitespace): Set :version tag to 23.1.
--- a/lisp/whitespace.el Fri Feb 01 16:05:01 2008 +0000 +++ b/lisp/whitespace.el Fri Feb 01 18:52:51 2008 +0000 @@ -179,8 +179,8 @@ ;; empty lines at beginning and/or end of buffer. ;; ;; 3. 8 or more SPACEs at beginning of line. -;; If `whitespace-chars' includes the value `indentation', replace 8 -;; or more SPACEs at beginning of line by TABs. +;; If `whitespace-chars' includes the value `indentation', replace +;; 8 or more SPACEs at beginning of line by TABs. ;; ;; 4. SPACEs before TAB. ;; If `whitespace-chars' includes the value `space-before-tab', @@ -276,8 +276,9 @@ ;; `whitespace-display-mappings' Specify an alist of mappings ;; for displaying characters. ;; -;; `whitespace-global-modes' Modes for which global `whitespace-mode' is -;; automagically turned on. +;; `whitespace-global-modes' Modes for which global +;; `whitespace-mode' is automagically +;; turned on. ;; ;; ;; Acknowledgements @@ -917,18 +918,14 @@ (setq global-whitespace-mode nil)) (global-whitespace-mode ; global-whitespace-mode on (save-excursion - (if (boundp 'find-file-hook) - (add-hook 'find-file-hook 'whitespace-turn-on-if-enabled t) - (add-hook 'find-file-hooks 'whitespace-turn-on-if-enabled t)) + (add-hook 'find-file-hook 'whitespace-turn-on-if-enabled t) (dolist (buffer (buffer-list)) ; adjust all local mode (set-buffer buffer) (unless whitespace-mode (whitespace-turn-on-if-enabled))))) (t ; global-whitespace-mode off (save-excursion - (if (boundp 'find-file-hook) - (remove-hook 'find-file-hook 'whitespace-turn-on-if-enabled) - (remove-hook 'find-file-hooks 'whitespace-turn-on-if-enabled)) + (remove-hook 'find-file-hook 'whitespace-turn-on-if-enabled) (dolist (buffer (buffer-list)) ; adjust all local mode (set-buffer buffer) (when (or (not whitespace-mode) @@ -1137,8 +1134,8 @@ space-after-tab toggle SPACEs after TAB visualization color toggle color faces mark toggle visual mark - whitespace-chars restore `whitespace-chars' value - whitespace-style restore `whitespace-style' value + whitespace-chars restore `whitespace-chars' value + whitespace-style restore `whitespace-style' value Only useful with a windowing system." (interactive (whitespace-interactive-char nil))