summaryrefslogtreecommitdiff
path: root/lisp/whitespace.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/whitespace.el')
-rw-r--r--lisp/whitespace.el20
1 files changed, 5 insertions, 15 deletions
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index d9aad2a2eea..3afa2246d45 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -136,18 +136,6 @@ visited by the buffers.")
"The variable to store the extent to highlight.")
(make-variable-buffer-local 'whitespace-highlighted-space)
-;; For flavors of Emacs which don't define `defgroup' and `defcustom'.
-(eval-when-compile
- (if (not (fboundp 'defgroup))
- (defmacro defgroup (sym memb doc &rest args)
- "Null macro for `defgroup' in all versions of Emacs that don't define it."
- t))
- (if (not (fboundp 'defcustom))
- (defmacro defcustom (sym val doc &rest args)
- "Macro to alias `defcustom' to `defvar' in all versions of Emacs that
-don't define it."
- `(defvar ,sym ,val ,doc))))
-
(defalias 'whitespace-make-overlay
(if (featurep 'xemacs) 'make-extent 'make-overlay))
(defalias 'whitespace-overlay-put
@@ -714,7 +702,9 @@ periodically for whitespace."
If timer is not set, then set it to scan the files in
`whitespace-all-buffer-files' periodically (defined by
`whitespace-rescan-timer-time') for whitespace creep."
- (if (and whitespace-rescan-timer-time (not whitespace-rescan-timer))
+ (if (and whitespace-rescan-timer-time
+ (/= whitespace-rescan-timer-time 0)
+ (not whitespace-rescan-timer))
(setq whitespace-rescan-timer
(add-timeout whitespace-rescan-timer-time
'whitespace-rescan-files-in-buffers nil
@@ -792,8 +782,8 @@ This is meant to be added buffer-locally to `write-file-functions'."
(whitespace-cleanup-internal)
(setq werr (whitespace-buffer)))
(if (and whitespace-abort-on-error werr)
- (error (concat "Abort write due to whitespaces in "
- buffer-file-name))))
+ (error "Abort write due to whitespaces in %s"
+ buffer-file-name)))
nil)
(defun whitespace-unload-function ()