Mercurial > emacs
comparison lisp/whitespace.el @ 64286:f44bd79f483b
(whitespace-check-buffer-leading, whitespace-check-buffer-trailing,
whitespace-check-buffer-indent, whitespace-check-buffer-spacetab,
whitespace-check-buffer-ateol, whitespace-highlighted-space,
whitespace-check-leading-whitespace, whitespace-check-trailing-whitespace,
whitespace-check-spacetab-whitespace, whitespace-check-indent-whitespace,
whitespace-check-ateol-whitespace, whitespace-abort-on-error, whitespace-modes):
Fix typos in docstrings.
(defgroup, defcustom): Doc fix.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Wed, 13 Jul 2005 10:32:08 +0000 |
parents | 0b1f11faf0b2 |
children | 89982901a9ad fbb2bea03df9 |
comparison
equal
deleted
inserted
replaced
64285:dd6ca96701a9 | 64286:f44bd79f483b |
---|---|
107 "String to display in the mode line for Whitespace mode.") | 107 "String to display in the mode line for Whitespace mode.") |
108 (make-variable-buffer-local 'whitespace-mode-line) | 108 (make-variable-buffer-local 'whitespace-mode-line) |
109 (put 'whitespace-mode-line 'permanent-local nil) | 109 (put 'whitespace-mode-line 'permanent-local nil) |
110 | 110 |
111 (defvar whitespace-check-buffer-leading nil | 111 (defvar whitespace-check-buffer-leading nil |
112 "Test leading whitespace for file in current buffer if t") | 112 "Test leading whitespace for file in current buffer if t.") |
113 (make-variable-buffer-local 'whitespace-check-buffer-leading) | 113 (make-variable-buffer-local 'whitespace-check-buffer-leading) |
114 (put 'whitespace-check-buffer-leading 'permanent-local nil) | 114 (put 'whitespace-check-buffer-leading 'permanent-local nil) |
115 | 115 |
116 (defvar whitespace-check-buffer-trailing nil | 116 (defvar whitespace-check-buffer-trailing nil |
117 "Test trailing whitespace for file in current buffer if t") | 117 "Test trailing whitespace for file in current buffer if t.") |
118 (make-variable-buffer-local 'whitespace-check-buffer-trailing) | 118 (make-variable-buffer-local 'whitespace-check-buffer-trailing) |
119 (put 'whitespace-check-buffer-trailing 'permanent-local nil) | 119 (put 'whitespace-check-buffer-trailing 'permanent-local nil) |
120 | 120 |
121 (defvar whitespace-check-buffer-indent nil | 121 (defvar whitespace-check-buffer-indent nil |
122 "Test indentation whitespace for file in current buffer if t") | 122 "Test indentation whitespace for file in current buffer if t.") |
123 (make-variable-buffer-local 'whitespace-check-buffer-indent) | 123 (make-variable-buffer-local 'whitespace-check-buffer-indent) |
124 (put 'whitespace-check-buffer-indent 'permanent-local nil) | 124 (put 'whitespace-check-buffer-indent 'permanent-local nil) |
125 | 125 |
126 (defvar whitespace-check-buffer-spacetab nil | 126 (defvar whitespace-check-buffer-spacetab nil |
127 "Test Space-followed-by-TABS whitespace for file in current buffer if t") | 127 "Test Space-followed-by-TABS whitespace for file in current buffer if t.") |
128 (make-variable-buffer-local 'whitespace-check-buffer-spacetab) | 128 (make-variable-buffer-local 'whitespace-check-buffer-spacetab) |
129 (put 'whitespace-check-buffer-spacetab 'permanent-local nil) | 129 (put 'whitespace-check-buffer-spacetab 'permanent-local nil) |
130 | 130 |
131 (defvar whitespace-check-buffer-ateol nil | 131 (defvar whitespace-check-buffer-ateol nil |
132 "Test end-of-line whitespace for file in current buffer if t") | 132 "Test end-of-line whitespace for file in current buffer if t.") |
133 (make-variable-buffer-local 'whitespace-check-buffer-ateol) | 133 (make-variable-buffer-local 'whitespace-check-buffer-ateol) |
134 (put 'whitespace-check-buffer-ateol 'permanent-local nil) | 134 (put 'whitespace-check-buffer-ateol 'permanent-local nil) |
135 | 135 |
136 (defvar whitespace-highlighted-space nil | 136 (defvar whitespace-highlighted-space nil |
137 "The variable to store the extent to highlight") | 137 "The variable to store the extent to highlight.") |
138 (make-variable-buffer-local 'whitespace-highlighted-space) | 138 (make-variable-buffer-local 'whitespace-highlighted-space) |
139 (put 'whitespace-highlighted-space 'permanent-local nil) | 139 (put 'whitespace-highlighted-space 'permanent-local nil) |
140 | 140 |
141 ;; For flavors of Emacs which don't define `defgroup' and `defcustom'. | 141 ;; For flavors of Emacs which don't define `defgroup' and `defcustom'. |
142 (eval-when-compile | 142 (eval-when-compile |
143 (if (not (fboundp 'defgroup)) | 143 (if (not (fboundp 'defgroup)) |
144 (defmacro defgroup (sym memb doc &rest args) | 144 (defmacro defgroup (sym memb doc &rest args) |
145 "Null macro for defgroup in all versions of Emacs that don't define | 145 "Null macro for `defgroup' in all versions of Emacs that don't define it." |
146 defgroup" | |
147 t)) | 146 t)) |
148 (if (not (fboundp 'defcustom)) | 147 (if (not (fboundp 'defcustom)) |
149 (defmacro defcustom (sym val doc &rest args) | 148 (defmacro defcustom (sym val doc &rest args) |
150 "Macro to alias defcustom to defvar in all versions of Emacs that | 149 "Macro to alias `defcustom' to `defvar' in all versions of Emacs that |
151 don't define defcustom" | 150 don't define it." |
152 `(defvar ,sym ,val ,doc)))) | 151 `(defvar ,sym ,val ,doc)))) |
153 | 152 |
154 (if (fboundp 'make-overlay) | 153 (if (fboundp 'make-overlay) |
155 (progn | 154 (progn |
156 (defalias 'whitespace-make-overlay 'make-overlay) | 155 (defalias 'whitespace-make-overlay 'make-overlay) |
178 :version "21.1" | 177 :version "21.1" |
179 :link '(emacs-commentary-link "whitespace.el") | 178 :link '(emacs-commentary-link "whitespace.el") |
180 :group 'convenience)) | 179 :group 'convenience)) |
181 | 180 |
182 (defcustom whitespace-check-leading-whitespace t | 181 (defcustom whitespace-check-leading-whitespace t |
183 "Flag to check leading whitespace. This is the global for the system. | 182 "Flag to check leading whitespace. This is the global for the system. |
184 It can be overriden by setting a buffer local variable | 183 It can be overriden by setting a buffer local variable |
185 `whitespace-check-buffer-leading'" | 184 `whitespace-check-buffer-leading'." |
186 :type 'boolean | 185 :type 'boolean |
187 :group 'whitespace) | 186 :group 'whitespace) |
188 | 187 |
189 (defcustom whitespace-check-trailing-whitespace t | 188 (defcustom whitespace-check-trailing-whitespace t |
190 "Flag to check trailing whitespace. This is the global for the system. | 189 "Flag to check trailing whitespace. This is the global for the system. |
191 It can be overriden by setting a buffer local variable | 190 It can be overriden by setting a buffer local variable |
192 `whitespace-check-buffer-trailing'" | 191 `whitespace-check-buffer-trailing'." |
193 :type 'boolean | 192 :type 'boolean |
194 :group 'whitespace) | 193 :group 'whitespace) |
195 | 194 |
196 (defcustom whitespace-check-spacetab-whitespace t | 195 (defcustom whitespace-check-spacetab-whitespace t |
197 "Flag to check space followed by a TAB. This is the global for the system. | 196 "Flag to check space followed by a TAB. This is the global for the system. |
198 It can be overriden by setting a buffer local variable | 197 It can be overriden by setting a buffer local variable |
199 `whitespace-check-buffer-spacetab'" | 198 `whitespace-check-buffer-spacetab'." |
200 :type 'boolean | 199 :type 'boolean |
201 :group 'whitespace) | 200 :group 'whitespace) |
202 | 201 |
203 (defcustom whitespace-spacetab-regexp "[ ]+\t" | 202 (defcustom whitespace-spacetab-regexp "[ ]+\t" |
204 "Regexp to match a space followed by a TAB." | 203 "Regexp to match a space followed by a TAB." |
205 :type 'regexp | 204 :type 'regexp |
206 :group 'whitespace) | 205 :group 'whitespace) |
207 | 206 |
208 (defcustom whitespace-check-indent-whitespace indent-tabs-mode | 207 (defcustom whitespace-check-indent-whitespace indent-tabs-mode |
209 "Flag to check indentation whitespace. This is the global for the system. | 208 "Flag to check indentation whitespace. This is the global for the system. |
210 It can be overriden by setting a buffer local variable | 209 It can be overriden by setting a buffer local variable |
211 `whitespace-check-buffer-indent'" | 210 `whitespace-check-buffer-indent'." |
212 :type 'boolean | 211 :type 'boolean |
213 :group 'whitespace) | 212 :group 'whitespace) |
214 | 213 |
215 (defcustom whitespace-indent-regexp (concat "^\\(\t*\\) " " ") | 214 (defcustom whitespace-indent-regexp (concat "^\\(\t*\\) " " ") |
216 "Regexp to match (any TABS followed by) 8/more whitespaces at start of line." | 215 "Regexp to match (any TABS followed by) 8/more whitespaces at start of line." |
217 :type 'regexp | 216 :type 'regexp |
218 :group 'whitespace) | 217 :group 'whitespace) |
219 | 218 |
220 (defcustom whitespace-check-ateol-whitespace t | 219 (defcustom whitespace-check-ateol-whitespace t |
221 "Flag to check end-of-line whitespace. This is the global for the system. | 220 "Flag to check end-of-line whitespace. This is the global for the system. |
222 It can be overriden by setting a buffer local variable | 221 It can be overriden by setting a buffer local variable |
223 `whitespace-check-buffer-ateol'" | 222 `whitespace-check-buffer-ateol'." |
224 :type 'boolean | 223 :type 'boolean |
225 :group 'whitespace) | 224 :group 'whitespace) |
226 | 225 |
227 ;; (defcustom whitespace-ateol-regexp "[ \t]$" | 226 ;; (defcustom whitespace-ateol-regexp "[ \t]$" |
228 (defcustom whitespace-ateol-regexp "[ \t]+$" | 227 (defcustom whitespace-ateol-regexp "[ \t]+$" |
240 determines a file to be clean." | 239 determines a file to be clean." |
241 :type 'string | 240 :type 'string |
242 :group 'whitespace) | 241 :group 'whitespace) |
243 | 242 |
244 (defcustom whitespace-abort-on-error nil | 243 (defcustom whitespace-abort-on-error nil |
245 "While writing a file, abort if the file is unclean. If | 244 "While writing a file, abort if the file is unclean. |
246 `whitespace-auto-cleanup' is set, that takes precedence over this | 245 If `whitespace-auto-cleanup' is set, that takes precedence over |
247 variable." | 246 this variable." |
248 :type 'boolean | 247 :type 'boolean |
249 :group 'whitespace) | 248 :group 'whitespace) |
250 | 249 |
251 (defcustom whitespace-auto-cleanup nil | 250 (defcustom whitespace-auto-cleanup nil |
252 "Cleanup a buffer automatically on finding it whitespace unclean." | 251 "Cleanup a buffer automatically on finding it whitespace unclean." |
275 python-mode scheme-mode sgml-mode | 274 python-mode scheme-mode sgml-mode |
276 sh-mode shell-script-mode simula-mode | 275 sh-mode shell-script-mode simula-mode |
277 tcl-mode tex-mode texinfo-mode | 276 tcl-mode tex-mode texinfo-mode |
278 vrml-mode xml-mode) | 277 vrml-mode xml-mode) |
279 | 278 |
280 "Major Modes in which we turn on whitespace checking. | 279 "Major modes in which we turn on whitespace checking. |
281 | 280 |
282 These are mostly programming and documentation modes. But you may add other | 281 These are mostly programming and documentation modes. But you may add other |
283 modes that you want whitespaces checked in by adding something like the | 282 modes that you want whitespaces checked in by adding something like the |
284 following to your `.emacs': | 283 following to your `.emacs': |
285 | 284 |