aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajesh Vaidheeswarran2003-06-11 03:50:45 +0000
committerRajesh Vaidheeswarran2003-06-11 03:50:45 +0000
commit37a23b5dfd37ab2cc3a508b5fe0ad9c45386e0d0 (patch)
tree7cae1290329bd70ba0ba21754988d65c6bc111d2
parentd391e05c14dded8641136ff33fb8a672b9e607a7 (diff)
downloademacs-37a23b5dfd37ab2cc3a508b5fe0ad9c45386e0d0.tar.gz
emacs-37a23b5dfd37ab2cc3a508b5fe0ad9c45386e0d0.zip
Update whitespace.el
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/whitespace.el37
2 files changed, 26 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 88cf2054284..867eb82045d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12003-06-10 Rajesh Vaidheeswarran <rv@gnu.org>
2
3 * whitespace.el (whitespace-version): bump to 3.3
4 * whitespace.el: Remove :tag in commentary :link. Remove empty
5 lines in comment, since commentary seems to have a problem with that.
6
7
12003-06-09 Luc Teirlinck <teirllm@mail.auburn.edu> 82003-06-09 Luc Teirlinck <teirllm@mail.auburn.edu>
2 9
3 * bindings.el (global-map): Bind `kill-whole-line' to 10 * bindings.el (global-map): Bind `kill-whole-line' to
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 85bd290efd9..7750c194f9a 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -5,7 +5,7 @@
5;; Author: Rajesh Vaidheeswarran <rv@gnu.org> 5;; Author: Rajesh Vaidheeswarran <rv@gnu.org>
6;; Keywords: convenience 6;; Keywords: convenience
7 7
8;; $Id: whitespace.el,v 1.22 2002/12/03 00:10:40 schwab Exp $ 8;; $Id: whitespace.el,v 1.23 2003/05/13 14:30:58 rv Exp $
9;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
10 10
11;; GNU Emacs is free software; you can redistribute it and/or modify 11;; GNU Emacs is free software; you can redistribute it and/or modify
@@ -24,42 +24,42 @@
24;; Boston, MA 02111-1307, USA. 24;; Boston, MA 02111-1307, USA.
25 25
26;;; Commentary: 26;;; Commentary:
27 27;;
28;; Whitespace.el URL: http://www.dsmit.com/lisp/ 28;; URL: http://www.dsmit.com/lisp/
29 29;;
30;; The whitespace library is intended to find and help fix five different types 30;; The whitespace library is intended to find and help fix five different types
31;; of whitespace problems that commonly exist in source code. 31;; of whitespace problems that commonly exist in source code.
32 32;;
33;; 1. Leading space (empty lines at the top of a file). 33;; 1. Leading space (empty lines at the top of a file).
34;; 2. Trailing space (empty lines at the end of a file). 34;; 2. Trailing space (empty lines at the end of a file).
35;; 3. Indentation space (8 or more spaces at beginning of line, that should be 35;; 3. Indentation space (8 or more spaces at beginning of line, that should be
36;; replaced with TABS). 36;; replaced with TABS).
37;; 4. Spaces followed by a TAB. (Almost always, we never want that). 37;; 4. Spaces followed by a TAB. (Almost always, we never want that).
38;; 5. Spaces or TABS at the end of a line. 38;; 5. Spaces or TABS at the end of a line.
39 39;;
40;; Whitespace errors are reported in a buffer, and on the modeline. 40;; Whitespace errors are reported in a buffer, and on the modeline.
41 41;;
42;; Modeline will show a W:<x>!<y> to denote a particular type of whitespace, 42;; Modeline will show a W:<x>!<y> to denote a particular type of whitespace,
43;; where `x' and `y' can be one (or more) of: 43;; where `x' and `y' can be one (or more) of:
44 44;;
45;; e - End-of-Line whitespace. 45;; e - End-of-Line whitespace.
46;; i - Indentation whitespace. 46;; i - Indentation whitespace.
47;; l - Leading whitespace. 47;; l - Leading whitespace.
48;; s - Space followed by Tab. 48;; s - Space followed by Tab.
49;; t - Trailing whitespace. 49;; t - Trailing whitespace.
50 50;;
51;; If any of the whitespace checks is turned off, the modeline will display a 51;; If any of the whitespace checks is turned off, the modeline will display a
52;; !<y>. 52;; !<y>.
53 53;;
54;; (since (3) is the most controversial one, here is the rationale: Most 54;; (since (3) is the most controversial one, here is the rationale: Most
55;; terminal drivers and printer drivers have TAB configured or even 55;; terminal drivers and printer drivers have TAB configured or even
56;; hardcoded to be 8 spaces. (Some of them allow configuration, but almost 56;; hardcoded to be 8 spaces. (Some of them allow configuration, but almost
57;; always they default to 8.) 57;; always they default to 8.)
58 58;;
59;; Changing `tab-width' to other than 8 and editing will cause your code to 59;; Changing `tab-width' to other than 8 and editing will cause your code to
60;; look different from within Emacs, and say, if you cat it or more it, or 60;; look different from within Emacs, and say, if you cat it or more it, or
61;; even print it. 61;; even print it.
62 62;;
63;; Almost all the popular programming modes let you define an offset (like 63;; Almost all the popular programming modes let you define an offset (like
64;; c-basic-offset or perl-indent-level) to configure the offset, so you 64;; c-basic-offset or perl-indent-level) to configure the offset, so you
65;; should never have to set your `tab-width' to be other than 8 in all 65;; should never have to set your `tab-width' to be other than 8 in all
@@ -68,16 +68,16 @@
68;; your office complain, tell them to use vim, which distinguishes between 68;; your office complain, tell them to use vim, which distinguishes between
69;; tabstop and shiftwidth (vi equivalent of our offsets), and also ask them 69;; tabstop and shiftwidth (vi equivalent of our offsets), and also ask them
70;; to set smarttab.) 70;; to set smarttab.)
71 71;;
72;; All the above have caused (and will cause) unwanted codeline integration and 72;; All the above have caused (and will cause) unwanted codeline integration and
73;; merge problems. 73;; merge problems.
74 74;;
75;; whitespace.el will complain if it detects whitespaces on opening a file, and 75;; whitespace.el will complain if it detects whitespaces on opening a file, and
76;; warn you on closing a file also (in case you had inserted any 76;; warn you on closing a file also (in case you had inserted any
77;; whitespaces during the process of your editing). 77;; whitespaces during the process of your editing).
78 78;;
79;; Exported functions: 79;; Exported functions:
80 80;;
81;; `whitespace-buffer' - To check the current buffer for whitespace problems. 81;; `whitespace-buffer' - To check the current buffer for whitespace problems.
82;; `whitespace-cleanup' - To cleanup all whitespaces in the current buffer. 82;; `whitespace-cleanup' - To cleanup all whitespaces in the current buffer.
83;; `whitespace-region' - To check between point and mark for whitespace 83;; `whitespace-region' - To check between point and mark for whitespace
@@ -87,7 +87,7 @@
87 87
88;;; Code: 88;;; Code:
89 89
90(defvar whitespace-version "3.2" "Version of the whitespace library.") 90(defvar whitespace-version "3.3" "Version of the whitespace library.")
91 91
92(defvar whitespace-all-buffer-files nil 92(defvar whitespace-all-buffer-files nil
93 "An associated list of buffers and files checked for whitespace cleanliness. 93 "An associated list of buffers and files checked for whitespace cleanliness.
@@ -172,10 +172,12 @@ don't define defcustom"
172 "Check for and fix five different types of whitespaces in source code." 172 "Check for and fix five different types of whitespaces in source code."
173 ;; Since XEmacs doesn't have a 'convenience group, use the next best group 173 ;; Since XEmacs doesn't have a 'convenience group, use the next best group
174 ;; which is 'editing? 174 ;; which is 'editing?
175 :link '(emacs-commentary-link "whitespace.el")
175 :group 'editing) 176 :group 'editing)
176(defgroup whitespace nil 177(defgroup whitespace nil
177 "Check for and fix five different types of whitespaces in source code." 178 "Check for and fix five different types of whitespaces in source code."
178 :version "21.1" 179 :version "21.1"
180 :link '(emacs-commentary-link "whitespace.el")
179 :group 'convenience)) 181 :group 'convenience))
180 182
181(defcustom whitespace-check-leading-whitespace t 183(defcustom whitespace-check-leading-whitespace t
@@ -818,7 +820,6 @@ With ARG, turn the mode on if and only iff ARG is positive.
818When this mode is active, `whitespace-buffer' is added to 820When this mode is active, `whitespace-buffer' is added to
819`find-file-hook' and `kill-buffer-hook'." 821`find-file-hook' and `kill-buffer-hook'."
820 :global t 822 :global t
821 :link '(emacs-commentary-link :tag "Commentary" "whitespace.el")
822 :group 'whitespace 823 :group 'whitespace
823 (if whitespace-global-mode 824 (if whitespace-global-mode
824 (progn 825 (progn