summaryrefslogtreecommitdiff
path: root/lisp/whitespace.el
diff options
context:
space:
mode:
authorRajesh Vaidheeswarran <rv@gnu.org>2003-09-29 18:05:31 +0000
committerRajesh Vaidheeswarran <rv@gnu.org>2003-09-29 18:05:31 +0000
commitc98ddbe5daa656e3cbd64c7132b01ba3206879b5 (patch)
tree7b596db54cfcbdb198aec0bfe61c46e5687f4e39 /lisp/whitespace.el
parenta1f3b57e951a07fc647e95c11a79734f3cb9786f (diff)
downloademacs-c98ddbe5daa656e3cbd64c7132b01ba3206879b5.tar.gz
whitespace.el now takes user customizable variable to display cleanliness of
files. ffap.el - bugfix.
Diffstat (limited to 'lisp/whitespace.el')
-rw-r--r--lisp/whitespace.el19
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 6ca1027710c..edff77211e0 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -5,7 +5,7 @@
;; Author: Rajesh Vaidheeswarran <rv@gnu.org>
;; Keywords: convenience
-;; $Id: whitespace.el,v 1.25 2003/06/11 04:00:33 rv Exp $
+;; $Id: whitespace.el,v 1.26 2003/09/01 15:45:18 miles Exp $
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
@@ -33,7 +33,7 @@
;; 1. Leading space (empty lines at the top of a file).
;; 2. Trailing space (empty lines at the end of a file).
;; 3. Indentation space (8 or more spaces at beginning of line, that should be
-;; replaced with TABS).
+;; replaced with TABS).
;; 4. Spaces followed by a TAB. (Almost always, we never want that).
;; 5. Spaces or TABS at the end of a line.
;;
@@ -87,7 +87,7 @@
;;; Code:
-(defvar whitespace-version "3.3" "Version of the whitespace library.")
+(defvar whitespace-version "3.4" "Version of the whitespace library.")
(defvar whitespace-all-buffer-files nil
"An associated list of buffers and files checked for whitespace cleanliness.
@@ -236,6 +236,12 @@ It can be overriden by setting a buffer local variable
:type 'string
:group 'whitespace)
+(defcustom whitespace-clean-msg "clean."
+ "If non-nil, this message will be displayed after a whitespace check
+determines a file to be clean."
+ :type 'string
+ :group 'whitespace)
+
(defcustom whitespace-abort-on-error nil
"While writing a file, abort if the file is unclean. If
`whitespace-auto-cleanup' is set, that takes precedence over this
@@ -503,8 +509,9 @@ and:
(concat "!" whitespace-unchecked)
""))
whitespace-filename)))
- (if (not quiet)
- (message "%s clean" whitespace-filename))))))))
+ (if (and (not quiet) (not (equal whitespace-clean-msg "")))
+ (message "%s %s" whitespace-filename
+ whitespace-clean-msg))))))))
(if whitespace-error
t
nil)))
@@ -816,7 +823,7 @@ If timer is not set, then set it to scan the files in
;;;###autoload
(define-minor-mode whitespace-global-mode
"Toggle using Whitespace mode in new buffers.
-With ARG, turn the mode on if and only iff ARG is positive.
+With ARG, turn the mode on iff ARG is positive.
When this mode is active, `whitespace-buffer' is added to
`find-file-hook' and `kill-buffer-hook'."