Mercurial > emacs
annotate lisp/whitespace.el @ 95055:422c9dc4e561
(top-level): Revert previous change: require cl when compiling.
author | John Paul Wallington <jpw@pobox.com> |
---|---|
date | Fri, 16 May 2008 23:59:13 +0000 |
parents | ee5932bf781d |
children | df4f1b00491d |
rev | line source |
---|---|
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1 ;;; whitespace.el --- minor mode to visualize TAB, (HARD) SPACE, NEWLINE |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
3 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
4 ;; Free Software Foundation, Inc. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
5 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
6 ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
7 ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
8 ;; Keywords: data, wp |
94400
049f194820fe
whitespace-trailing-regexp option fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94374
diff
changeset
|
9 ;; Version: 11.1 |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
10 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
11 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
12 ;; This file is part of GNU Emacs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
13 |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94440
diff
changeset
|
14 ;; GNU Emacs is free software: you can redistribute it and/or modify |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94440
diff
changeset
|
15 ;; it under the terms of the GNU General Public License as published by |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94440
diff
changeset
|
16 ;; the Free Software Foundation, either version 3 of the License, or |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94440
diff
changeset
|
17 ;; (at your option) any later version. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
18 |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94440
diff
changeset
|
19 ;; GNU Emacs is distributed in the hope that it will be useful, |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94440
diff
changeset
|
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94440
diff
changeset
|
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94440
diff
changeset
|
22 ;; GNU General Public License for more details. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
23 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
24 ;; You should have received a copy of the GNU General Public License |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
94440
diff
changeset
|
25 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
26 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
27 ;;; Commentary: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
28 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
29 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
30 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
31 ;; Introduction |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
32 ;; ------------ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
33 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
34 ;; This package is a minor mode to visualize blanks (TAB, (HARD) SPACE |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
35 ;; and NEWLINE). |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
36 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
37 ;; whitespace uses two ways to visualize blanks: faces and display |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
38 ;; table. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
39 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
40 ;; * Faces are used to highlight the background with a color. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
41 ;; whitespace uses font-lock to highlight blank characters. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
42 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
43 ;; * Display table changes the way a character is displayed, that is, |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
44 ;; it provides a visual mark for characters, for example, at the end |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
45 ;; of line (?\xB6), at SPACEs (?\xB7) and at TABs (?\xBB). |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
46 ;; |
94374 | 47 ;; The `whitespace-style' variable selects which way blanks are |
48 ;; visualized. | |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
49 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
50 ;; Note that when whitespace is turned on, whitespace saves the |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
51 ;; font-lock state, that is, if font-lock is on or off. And |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
52 ;; whitespace restores the font-lock state when it is turned off. So, |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
53 ;; if whitespace is turned on and font-lock is off, whitespace also |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
54 ;; turns on the font-lock to highlight blanks, but the font-lock will |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
55 ;; be turned off when whitespace is turned off. Thus, turn on |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
56 ;; font-lock before whitespace is on, if you want that font-lock |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
57 ;; continues on after whitespace is turned off. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
58 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
59 ;; When whitespace is on, it takes care of highlighting some special |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
60 ;; characters over the default mechanism of `nobreak-char-display' |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
61 ;; (which see) and `show-trailing-whitespace' (which see). |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
62 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
63 ;; There are two ways of using whitespace: local and global. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
64 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
65 ;; * Local whitespace affects only the current buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
66 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
67 ;; * Global whitespace affects all current and future buffers. That |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
68 ;; is, if you turn on global whitespace and then create a new |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
69 ;; buffer, the new buffer will also have whitespace on. The |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
70 ;; `whitespace-global-modes' variable controls which major-mode will |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
71 ;; be automagically turned on. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
72 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
73 ;; You can mix the local and global usage without any conflict. But |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
74 ;; local whitespace has priority over global whitespace. Whitespace |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
75 ;; mode is active in a buffer if you have enabled it in that buffer or |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
76 ;; if you have enabled it globally. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
77 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
78 ;; When global and local whitespace are on: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
79 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
80 ;; * if local whitespace is turned off, whitespace is turned off for |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
81 ;; the current buffer only. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
82 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
83 ;; * if global whitespace is turned off, whitespace continues on only |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
84 ;; in the buffers in which local whitespace is on. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
85 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
86 ;; To use whitespace, insert in your ~/.emacs: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
87 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
88 ;; (require 'whitespace-mode) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
89 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
90 ;; Or autoload at least one of the commands`whitespace-mode', |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
91 ;; `whitespace-toggle-options', `global-whitespace-mode' or |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
92 ;; `global-whitespace-toggle-options'. For example: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
93 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
94 ;; (autoload 'whitespace-mode "whitespace" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
95 ;; "Toggle whitespace visualization." t) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
96 ;; (autoload 'whitespace-toggle-options "whitespace" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
97 ;; "Toggle local `whitespace-mode' options." t) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
98 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
99 ;; whitespace was inspired by: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
100 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
101 ;; whitespace.el Rajesh Vaidheeswarran <rv@gnu.org> |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
102 ;; Warn about and clean bogus whitespaces in the file |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
103 ;; (inspired the idea to warn and clean some blanks) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
104 ;; This was the original `whitespace.el' which was replaced by |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
105 ;; `blank-mode.el'. And later `blank-mode.el' was renamed to |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
106 ;; `whitespace.el'. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
107 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
108 ;; show-whitespace-mode.el Aurelien Tisne <aurelien.tisne@free.fr> |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
109 ;; Simple mode to highlight whitespaces |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
110 ;; (inspired the idea to use font-lock) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
111 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
112 ;; whitespace-mode.el Lawrence Mitchell <wence@gmx.li> |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
113 ;; Major mode for editing Whitespace |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
114 ;; (inspired the idea to use display table) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
115 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
116 ;; visws.el Miles Bader <miles@gnu.org> |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
117 ;; Make whitespace visible |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
118 ;; (handle display table, his code was modified, but the main |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
119 ;; idea was kept) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
120 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
121 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
122 ;; Using whitespace |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
123 ;; ---------------- |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
124 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
125 ;; There is no problem if you mix local and global minor mode usage. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
126 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
127 ;; * LOCAL whitespace: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
128 ;; + To toggle whitespace options locally, type: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
129 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
130 ;; M-x whitespace-toggle-options RET |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
131 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
132 ;; + To activate whitespace locally, type: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
133 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
134 ;; C-u 1 M-x whitespace-mode RET |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
135 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
136 ;; + To deactivate whitespace locally, type: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
137 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
138 ;; C-u 0 M-x whitespace-mode RET |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
139 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
140 ;; + To toggle whitespace locally, type: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
141 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
142 ;; M-x whitespace-mode RET |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
143 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
144 ;; * GLOBAL whitespace: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
145 ;; + To toggle whitespace options globally, type: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
146 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
147 ;; M-x global-whitespace-toggle-options RET |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
148 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
149 ;; + To activate whitespace globally, type: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
150 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
151 ;; C-u 1 M-x global-whitespace-mode RET |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
152 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
153 ;; + To deactivate whitespace globally, type: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
154 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
155 ;; C-u 0 M-x global-whitespace-mode RET |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
156 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
157 ;; + To toggle whitespace globally, type: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
158 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
159 ;; M-x global-whitespace-mode RET |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
160 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
161 ;; There are also the following useful commands: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
162 ;; |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
163 ;; `whitespace-report' |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
164 ;; Report some blank problems in buffer. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
165 ;; |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
166 ;; `whitespace-report-region' |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
167 ;; Report some blank problems in a region. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
168 ;; |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
169 ;; `whitespace-cleanup' |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
170 ;; Cleanup some blank problems in all buffer or at region. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
171 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
172 ;; `whitespace-cleanup-region' |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
173 ;; Cleanup some blank problems at region. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
174 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
175 ;; The problems, which are cleaned up, are: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
176 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
177 ;; 1. empty lines at beginning of buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
178 ;; 2. empty lines at end of buffer. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
179 ;; If `whitespace-style' includes the value `empty', remove all |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
180 ;; empty lines at beginning and/or end of buffer. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
181 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
182 ;; 3. 8 or more SPACEs at beginning of line. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
183 ;; If `whitespace-style' includes the value `indentation': |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
184 ;; replace 8 or more SPACEs at beginning of line by TABs, if |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
185 ;; `indent-tabs-mode' is non-nil; otherwise, replace TABs by |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
186 ;; SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
187 ;; If `whitespace-style' includes the value `indentation::tab', |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
188 ;; replace 8 or more SPACEs at beginning of line by TABs. |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
189 ;; If `whitespace-style' includes the value `indentation::space', |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
190 ;; replace TABs by SPACEs. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
191 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
192 ;; 4. SPACEs before TAB. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
193 ;; If `whitespace-style' includes the value `space-before-tab': |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
194 ;; replace SPACEs by TABs, if `indent-tabs-mode' is non-nil; |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
195 ;; otherwise, replace TABs by SPACEs. |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
196 ;; If `whitespace-style' includes the value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
197 ;; `space-before-tab::tab', replace SPACEs by TABs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
198 ;; If `whitespace-style' includes the value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
199 ;; `space-before-tab::space', replace TABs by SPACEs. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
200 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
201 ;; 5. SPACEs or TABs at end of line. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
202 ;; If `whitespace-style' includes the value `trailing', remove all |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
203 ;; SPACEs or TABs at end of line. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
204 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
205 ;; 6. 8 or more SPACEs after TAB. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
206 ;; If `whitespace-style' includes the value `space-after-tab': |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
207 ;; replace SPACEs by TABs, if `indent-tabs-mode' is non-nil; |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
208 ;; otherwise, replace TABs by SPACEs. |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
209 ;; If `whitespace-style' includes the value `space-after-tab::tab', |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
210 ;; replace SPACEs by TABs. |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
211 ;; If `whitespace-style' includes the value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
212 ;; `space-after-tab::space', replace TABs by SPACEs. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
213 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
214 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
215 ;; Hooks |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
216 ;; ----- |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
217 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
218 ;; whitespace has the following hook variables: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
219 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
220 ;; `whitespace-mode-hook' |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
221 ;; It is evaluated always when whitespace is turned on locally. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
222 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
223 ;; `global-whitespace-mode-hook' |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
224 ;; It is evaluated always when whitespace is turned on globally. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
225 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
226 ;; `whitespace-load-hook' |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
227 ;; It is evaluated after whitespace package is loaded. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
228 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
229 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
230 ;; Options |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
231 ;; ------- |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
232 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
233 ;; Below it's shown a brief description of whitespace options, please, |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
234 ;; see the options declaration in the code for a long documentation. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
235 ;; |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
236 ;; `whitespace-style' Specify which kind of blank is |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
237 ;; visualized. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
238 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
239 ;; `whitespace-space' Face used to visualize SPACE. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
240 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
241 ;; `whitespace-hspace' Face used to visualize HARD SPACE. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
242 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
243 ;; `whitespace-tab' Face used to visualize TAB. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
244 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
245 ;; `whitespace-newline' Face used to visualize NEWLINE char |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
246 ;; mapping. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
247 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
248 ;; `whitespace-trailing' Face used to visualize trailing |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
249 ;; blanks. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
250 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
251 ;; `whitespace-line' Face used to visualize "long" lines. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
252 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
253 ;; `whitespace-space-before-tab' Face used to visualize SPACEs |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
254 ;; before TAB. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
255 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
256 ;; `whitespace-indentation' Face used to visualize 8 or more |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
257 ;; SPACEs at beginning of line. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
258 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
259 ;; `whitespace-empty' Face used to visualize empty lines at |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
260 ;; beginning and/or end of buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
261 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
262 ;; `whitespace-space-after-tab' Face used to visualize 8 or more |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
263 ;; SPACEs after TAB. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
264 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
265 ;; `whitespace-space-regexp' Specify SPACE characters regexp. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
266 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
267 ;; `whitespace-hspace-regexp' Specify HARD SPACE characters regexp. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
268 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
269 ;; `whitespace-tab-regexp' Specify TAB characters regexp. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
270 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
271 ;; `whitespace-trailing-regexp' Specify trailing characters regexp. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
272 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
273 ;; `whitespace-space-before-tab-regexp' Specify SPACEs before TAB |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
274 ;; regexp. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
275 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
276 ;; `whitespace-indentation-regexp' Specify regexp for 8 or more |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
277 ;; SPACEs at beginning of line. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
278 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
279 ;; `whitespace-empty-at-bob-regexp' Specify regexp for empty lines |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
280 ;; at beginning of buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
281 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
282 ;; `whitespace-empty-at-eob-regexp' Specify regexp for empty lines |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
283 ;; at end of buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
284 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
285 ;; `whitespace-space-after-tab-regexp' Specify regexp for 8 or more |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
286 ;; SPACEs after TAB. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
287 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
288 ;; `whitespace-line-column' Specify column beyond which the line |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
289 ;; is highlighted. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
290 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
291 ;; `whitespace-display-mappings' Specify an alist of mappings |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
292 ;; for displaying characters. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
293 ;; |
91377
510381911395
Use find-file-hook instead of find-file-hooks.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
88118
diff
changeset
|
294 ;; `whitespace-global-modes' Modes for which global |
510381911395
Use find-file-hook instead of find-file-hooks.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
88118
diff
changeset
|
295 ;; `whitespace-mode' is automagically |
510381911395
Use find-file-hook instead of find-file-hooks.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
88118
diff
changeset
|
296 ;; turned on. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
297 ;; |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
298 ;; `whitespace-action' Specify which action is taken when a |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
299 ;; buffer is visited, killed or written. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
300 ;; |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
301 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
302 ;; Acknowledgements |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
303 ;; ---------------- |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
304 ;; |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
305 ;; Thanks to Stephen Deasey <sdeasey@gmail.com> for the |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
306 ;; `indent-tabs-mode' usage suggestion. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
307 ;; |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
308 ;; Thanks to Eric Cooper <ecc@cmu.edu> for the suggestion to have hook |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
309 ;; actions when buffer is written or killed as the original whitespace |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
310 ;; package had. |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
311 ;; |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
312 ;; Thanks to nschum (EmacsWiki) for the idea about highlight "long" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
313 ;; lines tail. See EightyColumnRule (EmacsWiki). |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
314 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
315 ;; Thanks to Juri Linkov <juri@jurta.org> for suggesting: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
316 ;; * `define-minor-mode'. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
317 ;; * `global-whitespace-*' name for global commands. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
318 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
319 ;; Thanks to Robert J. Chassell <bob@gnu.org> for doc fix and testing. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
320 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
321 ;; Thanks to Drew Adams <drew.adams@oracle.com> for toggle commands |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
322 ;; suggestion. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
323 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
324 ;; Thanks to Antti Kaihola <antti.kaihola@linux-aktivaattori.org> for |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
325 ;; helping to fix `find-file-hooks' reference. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
326 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
327 ;; Thanks to Andreas Roehler <andreas.roehler@easy-emacs.de> for |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
328 ;; indicating defface byte-compilation warnings. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
329 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
330 ;; Thanks to TimOCallaghan (EmacsWiki) for the idea about highlight |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
331 ;; "long" lines. See EightyColumnRule (EmacsWiki). |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
332 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
333 ;; Thanks to Yanghui Bian <yanghuibian@gmail.com> for indicating a new |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
334 ;; newline character mapping. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
335 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
336 ;; Thanks to Pete Forman <pete.forman@westgeo.com> for indicating |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
337 ;; whitespace-mode.el on XEmacs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
338 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
339 ;; Thanks to Miles Bader <miles@gnu.org> for handling display table via |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
340 ;; visws.el (his code was modified, but the main idea was kept). |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
341 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
342 ;; Thanks to: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
343 ;; Rajesh Vaidheeswarran <rv@gnu.org> (original) whitespace.el |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
344 ;; Aurelien Tisne <aurelien.tisne@free.fr> show-whitespace-mode.el |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
345 ;; Lawrence Mitchell <wence@gmx.li> whitespace-mode.el |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
346 ;; Miles Bader <miles@gnu.org> visws.el |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
347 ;; And to all people who contributed with them. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
348 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
349 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
350 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
351 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
352 ;;; code: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
353 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
354 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
355 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
356 ;;;; User Variables: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
357 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
358 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
359 ;;; Interface to the command system |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
360 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
361 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
362 (defgroup whitespace nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
363 "Visualize blanks (TAB, (HARD) SPACE and NEWLINE)." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
364 :link '(emacs-library-link :tag "Source Lisp File" "whitespace.el") |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
365 :version "23.1" |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
366 :group 'wp |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
367 :group 'data) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
368 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
369 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
370 (defcustom whitespace-style |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
371 '(tabs spaces trailing lines space-before-tab newline |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
372 indentation empty space-after-tab |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
373 space-mark tab-mark newline-mark) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
374 "*Specify which kind of blank is visualized. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
375 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
376 It's a list containing some or all of the following values: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
377 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
378 trailing trailing blanks are visualized via faces. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
379 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
380 tabs TABs are visualized via faces. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
381 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
382 spaces SPACEs and HARD SPACEs are visualized via |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
383 faces. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
384 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
385 lines lines whose have columns beyond |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
386 `whitespace-line-column' are highlighted via |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
387 faces . |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
388 Whole line is highlighted. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
389 It has precedence over `lines-tail' (see |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
390 below). |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
391 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
392 lines-tail lines whose have columns beyond |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
393 `whitespace-line-column' are highlighted via |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
394 faces. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
395 But only the part of line which goes |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
396 beyond `whitespace-line-column' column. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
397 It has effect only if `lines' (see above) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
398 is not present in `whitespace-style'. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
399 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
400 newline NEWLINEs are visualized via faces. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
401 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
402 empty empty lines at beginning and/or end of buffer |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
403 are visualized via faces. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
404 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
405 indentation::tab 8 or more SPACEs at beginning of line are |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
406 visualized via faces. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
407 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
408 indentation::space TABs at beginning of line are visualized via |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
409 faces. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
410 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
411 indentation 8 or more SPACEs at beginning of line are |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
412 visualized, if `indent-tabs-mode' (which see) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
413 is non-nil; otherwise, TABs at beginning of |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
414 line are visualized via faces. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
415 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
416 space-after-tab::tab 8 or more SPACEs after a TAB are |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
417 visualized via faces. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
418 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
419 space-after-tab::space TABs are visualized when occurs 8 or |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
420 more SPACEs after a TAB via faces. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
421 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
422 space-after-tab 8 or more SPACEs after a TAB are |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
423 visualized, if `indent-tabs-mode' |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
424 (which see) is non-nil; otherwise, |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
425 the TABs are visualized via faces. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
426 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
427 space-before-tab::tab SPACEs before TAB are visualized via |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
428 faces. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
429 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
430 space-before-tab::space TABs are visualized when occurs SPACEs |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
431 before TAB via faces. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
432 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
433 space-before-tab SPACEs before TAB are visualized, if |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
434 `indent-tabs-mode' (which see) is |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
435 non-nil; otherwise, the TABs are |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
436 visualized via faces. |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
437 |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
438 space-mark SPACEs and HARD SPACEs are visualized via |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
439 display table. |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
440 |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
441 tab-mark TABs are visualized via display table. |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
442 |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
443 newline-mark NEWLINEs are visualized via display table. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
444 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
445 Any other value is ignored. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
446 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
447 If nil, don't visualize TABs, (HARD) SPACEs and NEWLINEs via faces and |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
448 via display table. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
449 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
450 There is an evaluation order for some values, if some values are |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
451 included in `whitespace-style' list. For example, if |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
452 indentation, indentation::tab and/or indentation::space are |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
453 included in `whitespace-style' list. The evaluation order for |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
454 these values is: |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
455 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
456 * For indentation: |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
457 1. indentation |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
458 2. indentation::tab |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
459 3. indentation::space |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
460 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
461 * For SPACEs after TABs: |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
462 1. space-after-tab |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
463 2. space-after-tab::tab |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
464 3. space-after-tab::space |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
465 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
466 * For SPACEs before TABs: |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
467 1. space-before-tab |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
468 2. space-before-tab::tab |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
469 3. space-before-tab::space |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
470 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
471 So, for example, if indentation and indentation::space are |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
472 included in `whitespace-style' list, the indentation value is |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
473 evaluated instead of indentation::space value. |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
474 |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
475 See also `whitespace-display-mappings' for documentation." |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
476 :type '(repeat :tag "Kind of Blank" |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
477 (choice :tag "Kind of Blank Face" |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
478 (const :tag "(Face) Trailing TABs, SPACEs and HARD SPACEs" |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
479 trailing) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
480 (const :tag "(Face) SPACEs and HARD SPACEs" |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
481 spaces) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
482 (const :tag "(Face) TABs" tabs) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
483 (const :tag "(Face) Lines" lines) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
484 (const :tag "(Face) SPACEs before TAB" |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
485 space-before-tab) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
486 (const :tag "(Face) NEWLINEs" newline) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
487 (const :tag "(Face) Indentation SPACEs" |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
488 indentation) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
489 (const :tag "(Face) Empty Lines At BOB And/Or EOB" |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
490 empty) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
491 (const :tag "(Face) SPACEs after TAB" |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
492 space-after-tab) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
493 (const :tag "(Mark) SPACEs and HARD SPACEs" |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
494 space-mark) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
495 (const :tag "(Mark) TABs" tab-mark) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
496 (const :tag "(Mark) NEWLINEs" newline-mark))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
497 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
498 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
499 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
500 (defcustom whitespace-space 'whitespace-space |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
501 "*Symbol face used to visualize SPACE. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
502 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
503 Used when `whitespace-style' includes the value `spaces'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
504 :type 'face |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
505 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
506 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
507 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
508 (defface whitespace-space |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
509 '((((class color) (background dark)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
510 (:background "grey20" :foreground "aquamarine3")) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
511 (((class color) (background light)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
512 (:background "LightYellow" :foreground "aquamarine3")) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
513 (t (:inverse-video t))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
514 "Face used to visualize SPACE." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
515 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
516 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
517 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
518 (defcustom whitespace-hspace 'whitespace-hspace |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
519 "*Symbol face used to visualize HARD SPACE. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
520 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
521 Used when `whitespace-style' includes the value `spaces'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
522 :type 'face |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
523 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
524 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
525 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
526 (defface whitespace-hspace ; 'nobreak-space |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
527 '((((class color) (background dark)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
528 (:background "grey24" :foreground "aquamarine3")) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
529 (((class color) (background light)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
530 (:background "LemonChiffon3" :foreground "aquamarine3")) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
531 (t (:inverse-video t))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
532 "Face used to visualize HARD SPACE." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
533 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
534 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
535 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
536 (defcustom whitespace-tab 'whitespace-tab |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
537 "*Symbol face used to visualize TAB. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
538 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
539 Used when `whitespace-style' includes the value `tabs'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
540 :type 'face |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
541 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
542 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
543 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
544 (defface whitespace-tab |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
545 '((((class color) (background dark)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
546 (:background "grey22" :foreground "aquamarine3")) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
547 (((class color) (background light)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
548 (:background "beige" :foreground "aquamarine3")) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
549 (t (:inverse-video t))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
550 "Face used to visualize TAB." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
551 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
552 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
553 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
554 (defcustom whitespace-newline 'whitespace-newline |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
555 "*Symbol face used to visualize NEWLINE char mapping. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
556 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
557 See `whitespace-display-mappings'. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
558 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
559 Used when `whitespace-style' includes the values `newline-mark' |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
560 and `newline'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
561 :type 'face |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
562 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
563 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
564 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
565 (defface whitespace-newline |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
566 '((((class color) (background dark)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
567 (:background "grey26" :foreground "aquamarine3" :bold t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
568 (((class color) (background light)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
569 (:background "linen" :foreground "aquamarine3" :bold t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
570 (t (:bold t :underline t))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
571 "Face used to visualize NEWLINE char mapping. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
572 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
573 See `whitespace-display-mappings'." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
574 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
575 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
576 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
577 (defcustom whitespace-trailing 'whitespace-trailing |
94431
00021417bce1
* whitespace.el (whitespace-trailing): Fix typo.
Bastien Guerry <bzg@altern.org>
parents:
94400
diff
changeset
|
578 "*Symbol face used to visualize trailing blanks. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
579 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
580 Used when `whitespace-style' includes the value `trailing'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
581 :type 'face |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
582 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
583 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
584 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
585 (defface whitespace-trailing ; 'trailing-whitespace |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
586 '((((class mono)) (:inverse-video t :bold t :underline t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
587 (t (:background "red1" :foreground "yellow" :bold t))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
588 "Face used to visualize trailing blanks." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
589 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
590 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
591 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
592 (defcustom whitespace-line 'whitespace-line |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
593 "*Symbol face used to visualize \"long\" lines. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
594 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
595 See `whitespace-line-column'. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
596 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
597 Used when `whitespace-style' includes the value `line'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
598 :type 'face |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
599 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
600 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
601 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
602 (defface whitespace-line |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
603 '((((class mono)) (:inverse-video t :bold t :underline t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
604 (t (:background "gray20" :foreground "violet"))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
605 "Face used to visualize \"long\" lines. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
606 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
607 See `whitespace-line-column'." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
608 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
609 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
610 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
611 (defcustom whitespace-space-before-tab 'whitespace-space-before-tab |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
612 "*Symbol face used to visualize SPACEs before TAB. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
613 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
614 Used when `whitespace-style' includes the value `space-before-tab'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
615 :type 'face |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
616 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
617 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
618 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
619 (defface whitespace-space-before-tab |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
620 '((((class mono)) (:inverse-video t :bold t :underline t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
621 (t (:background "DarkOrange" :foreground "firebrick"))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
622 "Face used to visualize SPACEs before TAB." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
623 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
624 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
625 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
626 (defcustom whitespace-indentation 'whitespace-indentation |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
627 "*Symbol face used to visualize 8 or more SPACEs at beginning of line. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
628 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
629 Used when `whitespace-style' includes the value `indentation'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
630 :type 'face |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
631 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
632 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
633 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
634 (defface whitespace-indentation |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
635 '((((class mono)) (:inverse-video t :bold t :underline t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
636 (t (:background "yellow" :foreground "firebrick"))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
637 "Face used to visualize 8 or more SPACEs at beginning of line." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
638 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
639 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
640 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
641 (defcustom whitespace-empty 'whitespace-empty |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
642 "*Symbol face used to visualize empty lines at beginning and/or end of buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
643 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
644 Used when `whitespace-style' includes the value `empty'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
645 :type 'face |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
646 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
647 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
648 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
649 (defface whitespace-empty |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
650 '((((class mono)) (:inverse-video t :bold t :underline t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
651 (t (:background "yellow" :foreground "firebrick"))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
652 "Face used to visualize empty lines at beginning and/or end of buffer." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
653 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
654 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
655 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
656 (defcustom whitespace-space-after-tab 'whitespace-space-after-tab |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
657 "*Symbol face used to visualize 8 or more SPACEs after TAB. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
658 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
659 Used when `whitespace-style' includes the value `space-after-tab'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
660 :type 'face |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
661 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
662 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
663 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
664 (defface whitespace-space-after-tab |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
665 '((((class mono)) (:inverse-video t :bold t :underline t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
666 (t (:background "yellow" :foreground "firebrick"))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
667 "Face used to visualize 8 or more SPACEs after TAB." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
668 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
669 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
670 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
671 (defcustom whitespace-hspace-regexp |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
672 "\\(\\(\xA0\\|\x8A0\\|\x920\\|\xE20\\|\xF20\\)+\\)" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
673 "*Specify HARD SPACE characters regexp. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
674 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
675 If you're using `mule' package, there may be other characters besides: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
676 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
677 \"\\xA0\" \"\\x8A0\" \"\\x920\" \"\\xE20\" \"\\xF20\" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
678 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
679 that should be considered HARD SPACE. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
680 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
681 Here are some examples: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
682 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
683 \"\\\\(^\\xA0+\\\\)\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
684 visualize only leading HARD SPACEs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
685 \"\\\\(\\xA0+$\\\\)\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
686 visualize only trailing HARD SPACEs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
687 \"\\\\(^\\xA0+\\\\|\\xA0+$\\\\)\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
688 visualize leading and/or trailing HARD SPACEs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
689 \"\\t\\\\(\\xA0+\\\\)\\t\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
690 visualize only HARD SPACEs between TABs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
691 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
692 NOTE: Enclose always by \\\\( and \\\\) the elements to highlight. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
693 Use exactly one pair of enclosing \\\\( and \\\\). |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
694 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
695 Used when `whitespace-style' includes `spaces'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
696 :type '(regexp :tag "HARD SPACE Chars") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
697 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
698 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
699 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
700 (defcustom whitespace-space-regexp "\\( +\\)" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
701 "*Specify SPACE characters regexp. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
702 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
703 If you're using `mule' package, there may be other characters |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
704 besides \" \" that should be considered SPACE. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
705 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
706 Here are some examples: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
707 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
708 \"\\\\(^ +\\\\)\" visualize only leading SPACEs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
709 \"\\\\( +$\\\\)\" visualize only trailing SPACEs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
710 \"\\\\(^ +\\\\| +$\\\\)\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
711 visualize leading and/or trailing SPACEs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
712 \"\\t\\\\( +\\\\)\\t\" visualize only SPACEs between TABs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
713 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
714 NOTE: Enclose always by \\\\( and \\\\) the elements to highlight. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
715 Use exactly one pair of enclosing \\\\( and \\\\). |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
716 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
717 Used when `whitespace-style' includes `spaces'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
718 :type '(regexp :tag "SPACE Chars") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
719 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
720 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
721 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
722 (defcustom whitespace-tab-regexp "\\(\t+\\)" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
723 "*Specify TAB characters regexp. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
724 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
725 If you're using `mule' package, there may be other characters |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
726 besides \"\\t\" that should be considered TAB. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
727 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
728 Here are some examples: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
729 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
730 \"\\\\(^\\t+\\\\)\" visualize only leading TABs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
731 \"\\\\(\\t+$\\\\)\" visualize only trailing TABs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
732 \"\\\\(^\\t+\\\\|\\t+$\\\\)\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
733 visualize leading and/or trailing TABs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
734 \" \\\\(\\t+\\\\) \" visualize only TABs between SPACEs. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
735 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
736 NOTE: Enclose always by \\\\( and \\\\) the elements to highlight. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
737 Use exactly one pair of enclosing \\\\( and \\\\). |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
738 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
739 Used when `whitespace-style' includes `tabs'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
740 :type '(regexp :tag "TAB Chars") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
741 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
742 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
743 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
744 (defcustom whitespace-trailing-regexp |
94400
049f194820fe
whitespace-trailing-regexp option fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94374
diff
changeset
|
745 "\\(\\(\t\\| \\|\xA0\\|\x8A0\\|\x920\\|\xE20\\|\xF20\\)+\\)$" |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
746 "*Specify trailing characters regexp. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
747 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
748 If you're using `mule' package, there may be other characters besides: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
749 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
750 \" \" \"\\t\" \"\\xA0\" \"\\x8A0\" \"\\x920\" \"\\xE20\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
751 \"\\xF20\" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
752 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
753 that should be considered blank. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
754 |
94440
e227f5ee58db
whitespace-trailing-regexp docstring fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94431
diff
changeset
|
755 NOTE: Enclose always by \"\\\\(\" and \"\\\\)$\" the elements to highlight. |
94400
049f194820fe
whitespace-trailing-regexp option fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94374
diff
changeset
|
756 Use exactly one pair of enclosing elements above. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
757 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
758 Used when `whitespace-style' includes `trailing'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
759 :type '(regexp :tag "Trailing Chars") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
760 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
761 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
762 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
763 (defcustom whitespace-space-before-tab-regexp "\\( +\\)\\(\t+\\)" |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
764 "*Specify SPACEs before TAB regexp. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
765 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
766 If you're using `mule' package, there may be other characters besides: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
767 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
768 \" \" \"\\t\" \"\\xA0\" \"\\x8A0\" \"\\x920\" \"\\xE20\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
769 \"\\xF20\" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
770 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
771 that should be considered blank. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
772 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
773 Used when `whitespace-style' includes `space-before-tab', |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
774 `space-before-tab::tab' or `space-before-tab::space'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
775 :type '(regexp :tag "SPACEs Before TAB") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
776 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
777 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
778 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
779 (defcustom whitespace-indentation-regexp |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
780 '("^\t*\\(\\( \\{%d\\}\\)+\\)[^\n\t]" |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
781 . "^ *\\(\t+\\)[^\n]") |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
782 "*Specify regexp for 8 or more SPACEs at beginning of line. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
783 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
784 It is a cons where the cons car is used for SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
785 and the cons cdr is used for TABs visualization. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
786 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
787 If you're using `mule' package, there may be other characters besides: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
788 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
789 \" \" \"\\t\" \"\\xA0\" \"\\x8A0\" \"\\x920\" \"\\xE20\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
790 \"\\xF20\" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
791 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
792 that should be considered blank. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
793 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
794 Used when `whitespace-style' includes `indentation', |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
795 `indentation::tab' or `indentation::space'." |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
796 :type '(cons (regexp :tag "Indentation SPACEs") |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
797 (regexp :tag "Indentation TABs")) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
798 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
799 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
800 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
801 (defcustom whitespace-empty-at-bob-regexp "\\`\\(\\([ \t]*\n\\)+\\)" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
802 "*Specify regexp for empty lines at beginning of buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
803 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
804 If you're using `mule' package, there may be other characters besides: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
805 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
806 \" \" \"\\t\" \"\\xA0\" \"\\x8A0\" \"\\x920\" \"\\xE20\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
807 \"\\xF20\" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
808 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
809 that should be considered blank. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
810 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
811 Used when `whitespace-style' includes `empty'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
812 :type '(regexp :tag "Empty Lines At Beginning Of Buffer") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
813 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
814 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
815 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
816 (defcustom whitespace-empty-at-eob-regexp "^\\([ \t\n]+\\)\\'" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
817 "*Specify regexp for empty lines at end of buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
818 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
819 If you're using `mule' package, there may be other characters besides: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
820 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
821 \" \" \"\\t\" \"\\xA0\" \"\\x8A0\" \"\\x920\" \"\\xE20\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
822 \"\\xF20\" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
823 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
824 that should be considered blank. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
825 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
826 Used when `whitespace-style' includes `empty'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
827 :type '(regexp :tag "Empty Lines At End Of Buffer") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
828 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
829 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
830 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
831 (defcustom whitespace-space-after-tab-regexp |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
832 '("\t+\\(\\( \\{%d\\}\\)+\\)" |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
833 . "\\(\t+\\) +") |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
834 "*Specify regexp for 8 or more SPACEs after TAB. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
835 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
836 It is a cons where the cons car is used for SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
837 and the cons cdr is used for TABs visualization. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
838 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
839 If you're using `mule' package, there may be other characters besides: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
840 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
841 \" \" \"\\t\" \"\\xA0\" \"\\x8A0\" \"\\x920\" \"\\xE20\" \ |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
842 \"\\xF20\" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
843 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
844 that should be considered blank. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
845 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
846 Used when `whitespace-style' includes `space-after-tab', |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
847 `space-after-tab::tab' or `space-after-tab::space'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
848 :type '(regexp :tag "SPACEs After TAB") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
849 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
850 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
851 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
852 (defcustom whitespace-line-column 80 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
853 "*Specify column beyond which the line is highlighted. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
854 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
855 Used when `whitespace-style' includes `lines' or `lines-tail'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
856 :type '(integer :tag "Line Length") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
857 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
858 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
859 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
860 ;; Hacked from `visible-whitespace-mappings' in visws.el |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
861 (defcustom whitespace-display-mappings |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
862 '( |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
863 (space-mark ?\ [?\xB7] [?.]) ; space - centered dot |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
864 (space-mark ?\xA0 [?\xA4] [?_]) ; hard space - currency |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
865 (space-mark ?\x8A0 [?\x8A4] [?_]) ; hard space - currency |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
866 (space-mark ?\x920 [?\x924] [?_]) ; hard space - currency |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
867 (space-mark ?\xE20 [?\xE24] [?_]) ; hard space - currency |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
868 (space-mark ?\xF20 [?\xF24] [?_]) ; hard space - currency |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
869 ;; NEWLINE is displayed using the face `whitespace-newline' |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
870 (newline-mark ?\n [?$ ?\n]) ; eol - dollar sign |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
871 ;; (newline-mark ?\n [?\u21B5 ?\n] [?$ ?\n]) ; eol - downwards arrow |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
872 ;; (newline-mark ?\n [?\xB6 ?\n] [?$ ?\n]) ; eol - pilcrow |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
873 ;; (newline-mark ?\n [?\x8AF ?\n] [?$ ?\n]) ; eol - overscore |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
874 ;; (newline-mark ?\n [?\x8AC ?\n] [?$ ?\n]) ; eol - negation |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
875 ;; (newline-mark ?\n [?\x8B0 ?\n] [?$ ?\n]) ; eol - grade |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
876 ;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
877 ;; WARNING: the mapping below has a problem. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
878 ;; When a TAB occupies exactly one column, it will display the |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
879 ;; character ?\xBB at that column followed by a TAB which goes to |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
880 ;; the next TAB column. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
881 ;; If this is a problem for you, please, comment the line below. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
882 (tab-mark ?\t [?\xBB ?\t] [?\\ ?\t]) ; tab - left quote mark |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
883 ) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
884 "*Specify an alist of mappings for displaying characters. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
885 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
886 Each element has the following form: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
887 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
888 (KIND CHAR VECTOR...) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
889 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
890 Where: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
891 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
892 KIND is the kind of character. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
893 It can be one of the following symbols: |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
894 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
895 tab-mark for TAB character |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
896 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
897 space-mark for SPACE or HARD SPACE character |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
898 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
899 newline-mark for NEWLINE character |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
900 |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
901 CHAR is the character to be mapped. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
902 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
903 VECTOR is a vector of characters to be displayed in place of CHAR. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
904 The first display vector that can be displayed is used; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
905 if no display vector for a mapping can be displayed, then |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
906 that character is displayed unmodified. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
907 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
908 The NEWLINE character is displayed using the face given by |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
909 `whitespace-newline' variable. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
910 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
911 Used when `whitespace-style' includes `tab-mark', `space-mark' or |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
912 `newline-mark'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
913 :type '(repeat |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
914 (list :tag "Character Mapping" |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
915 (choice :tag "Char Kind" |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
916 (const :tag "Tab" tab-mark) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
917 (const :tag "Space" space-mark) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
918 (const :tag "Newline" newline-mark)) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
919 (character :tag "Char") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
920 (repeat :inline t :tag "Vector List" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
921 (vector :tag "" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
922 (repeat :inline t |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
923 :tag "Vector Characters" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
924 (character :tag "Char")))))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
925 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
926 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
927 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
928 (defcustom whitespace-global-modes t |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
929 "*Modes for which global `whitespace-mode' is automagically turned on. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
930 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
931 Global `whitespace-mode' is controlled by the command |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
932 `global-whitespace-mode'. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
933 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
934 If nil, means no modes have `whitespace-mode' automatically |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
935 turned on. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
936 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
937 If t, all modes that support `whitespace-mode' have it |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
938 automatically turned on. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
939 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
940 Else it should be a list of `major-mode' symbol names for which |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
941 `whitespace-mode' should be automatically turned on. The sense |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
942 of the list is negated if it begins with `not'. For example: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
943 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
944 (c-mode c++-mode) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
945 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
946 means that `whitespace-mode' is turned on for buffers in C and |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
947 C++ modes only." |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
948 :type '(choice :tag "Global Modes" |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
949 (const :tag "None" nil) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
950 (const :tag "All" t) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
951 (set :menu-tag "Mode Specific" :tag "Modes" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
952 :value (not) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
953 (const :tag "Except" not) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
954 (repeat :inline t |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
955 (symbol :tag "Mode")))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
956 :group 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
957 |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
958 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
959 (defcustom whitespace-action nil |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
960 "*Specify which action is taken when a buffer is visited, killed or written. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
961 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
962 It's a list containing some or all of the following values: |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
963 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
964 nil no action is taken. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
965 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
966 cleanup cleanup any bogus whitespace always when local |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
967 whitespace is turned on. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
968 See `whitespace-cleanup' and |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
969 `whitespace-cleanup-region'. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
970 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
971 report-on-bogus report if there is any bogus whitespace always |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
972 when local whitespace is turned on. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
973 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
974 auto-cleanup cleanup any bogus whitespace when buffer is |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
975 written or killed. |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
976 See `whitespace-cleanup' and |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
977 `whitespace-cleanup-region'. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
978 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
979 abort-on-bogus abort if there is any bogus whitespace and the |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
980 buffer is written or killed. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
981 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
982 Any other value is treated as nil." |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
983 :type '(choice :tag "Actions" |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
984 (const :tag "None" nil) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
985 (repeat :tag "Action List" |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
986 (choice :tag "Action" |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
987 (const :tag "Cleanup When On" cleanup) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
988 (const :tag "Report On Bogus" report-on-bogus) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
989 (const :tag "Auto Cleanup" auto-cleanup) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
990 (const :tag "Abort On Bogus" abort-on-bogus)))) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
991 :group 'whitespace) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
992 |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
993 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
994 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
995 ;;;; User commands - Local mode |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
996 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
997 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
998 ;;;###autoload |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
999 (define-minor-mode whitespace-mode |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1000 "Toggle whitespace minor mode visualization (\"ws\" on modeline). |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1001 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1002 If ARG is null, toggle whitespace visualization. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1003 If ARG is a number greater than zero, turn on visualization; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1004 otherwise, turn off visualization. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1005 Only useful with a windowing system." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1006 :lighter " ws" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1007 :init-value nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1008 :global nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1009 :group 'whitespace |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1010 (cond |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1011 (noninteractive ; running a batch job |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1012 (setq whitespace-mode nil)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1013 (whitespace-mode ; whitespace-mode on |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1014 (whitespace-turn-on) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1015 (whitespace-action-when-on)) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1016 (t ; whitespace-mode off |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1017 (whitespace-turn-off)))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1018 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1019 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1020 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1021 ;;;; User commands - Global mode |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1022 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1023 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1024 ;;;###autoload |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1025 (define-minor-mode global-whitespace-mode |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1026 "Toggle whitespace global minor mode visualization (\"WS\" on modeline). |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1027 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1028 If ARG is null, toggle whitespace visualization. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1029 If ARG is a number greater than zero, turn on visualization; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1030 otherwise, turn off visualization. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1031 Only useful with a windowing system." |
88113
c80332ad12c1
(global-whitespace-mode): Fix modeline lighter.
Juanma Barranquero <lekktu@gmail.com>
parents:
88100
diff
changeset
|
1032 :lighter " WS" |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1033 :init-value nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1034 :global t |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1035 :group 'whitespace |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1036 (cond |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1037 (noninteractive ; running a batch job |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1038 (setq global-whitespace-mode nil)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1039 (global-whitespace-mode ; global-whitespace-mode on |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1040 (save-excursion |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1041 (add-hook 'find-file-hook 'whitespace-turn-on-if-enabled) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1042 (dolist (buffer (buffer-list)) ; adjust all local mode |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1043 (set-buffer buffer) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1044 (unless whitespace-mode |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1045 (whitespace-turn-on-if-enabled))))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1046 (t ; global-whitespace-mode off |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1047 (save-excursion |
91377
510381911395
Use find-file-hook instead of find-file-hooks.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
88118
diff
changeset
|
1048 (remove-hook 'find-file-hook 'whitespace-turn-on-if-enabled) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1049 (dolist (buffer (buffer-list)) ; adjust all local mode |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1050 (set-buffer buffer) |
91471
13eacee3408e
(global-whitespace-mode): Revert last change.
Juanma Barranquero <lekktu@gmail.com>
parents:
91432
diff
changeset
|
1051 (unless whitespace-mode |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1052 (whitespace-turn-off))))))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1053 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1054 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1055 (defun whitespace-turn-on-if-enabled () |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1056 (when (cond |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1057 ((eq whitespace-global-modes t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1058 ((listp whitespace-global-modes) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1059 (if (eq (car-safe whitespace-global-modes) 'not) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1060 (not (memq major-mode (cdr whitespace-global-modes))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1061 (memq major-mode whitespace-global-modes))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1062 (t nil)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1063 (let (inhibit-quit) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1064 ;; Don't turn on whitespace mode if... |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1065 (or |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1066 ;; ...we don't have a display (we're running a batch job) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1067 noninteractive |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1068 ;; ...or if the buffer is invisible (name starts with a space) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1069 (eq (aref (buffer-name) 0) ?\ ) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1070 ;; ...or if the buffer is temporary (name starts with *) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1071 (and (eq (aref (buffer-name) 0) ?*) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1072 ;; except the scratch buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1073 (not (string= (buffer-name) "*scratch*"))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1074 ;; Otherwise, turn on whitespace mode. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1075 (whitespace-turn-on))))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1076 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1077 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1078 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1079 ;;;; User commands - Toggle |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1080 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1081 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1082 (defconst whitespace-style-value-list |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1083 '(tabs |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1084 spaces |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1085 trailing |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1086 lines |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1087 lines-tail |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1088 newline |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1089 empty |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1090 indentation |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1091 indentation::tab |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1092 indentation::space |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1093 space-after-tab |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1094 space-after-tab::tab |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1095 space-after-tab::space |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1096 space-before-tab |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1097 space-before-tab::tab |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1098 space-before-tab::space |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1099 help-newline ; value used by `whitespace-insert-option-mark' |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1100 tab-mark |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1101 space-mark |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1102 newline-mark |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1103 ) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1104 "List of valid `whitespace-style' values.") |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1105 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1106 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1107 (defconst whitespace-toggle-option-alist |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1108 '((?t . tabs) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1109 (?s . spaces) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1110 (?r . trailing) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1111 (?l . lines) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1112 (?L . lines-tail) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1113 (?n . newline) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1114 (?e . empty) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1115 (?\C-i . indentation) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1116 (?I . indentation::tab) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1117 (?i . indentation::space) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1118 (?\C-a . space-after-tab) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1119 (?A . space-after-tab::tab) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1120 (?a . space-after-tab::space) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1121 (?\C-b . space-before-tab) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1122 (?B . space-before-tab::tab) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1123 (?b . space-before-tab::space) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1124 (?T . tab-mark) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1125 (?S . space-mark) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1126 (?N . newline-mark) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1127 (?x . whitespace-style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1128 ) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1129 "Alist of toggle options. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1130 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1131 Each element has the form: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1132 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1133 (CHAR . SYMBOL) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1134 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1135 Where: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1136 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1137 CHAR is a char which the user will have to type. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1138 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1139 SYMBOL is a valid symbol associated with CHAR. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1140 See `whitespace-style-value-list'.") |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1141 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1142 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1143 (defvar whitespace-active-style nil |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1144 "Used to save locally `whitespace-style' value.") |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1145 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1146 (defvar whitespace-indent-tabs-mode indent-tabs-mode |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1147 "Used to save locally `indent-tabs-mode' value.") |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1148 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1149 (defvar whitespace-tab-width tab-width |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1150 "Used to save locally `tab-width' value.") |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1151 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1152 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1153 ;;;###autoload |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1154 (defun whitespace-toggle-options (arg) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1155 "Toggle local `whitespace-mode' options. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1156 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1157 If local whitespace-mode is off, toggle the option given by ARG |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1158 and turn on local whitespace-mode. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1159 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1160 If local whitespace-mode is on, toggle the option given by ARG |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1161 and restart local whitespace-mode. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1162 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1163 Interactively, it reads one of the following chars: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1164 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1165 CHAR MEANING |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1166 (VIA FACES) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1167 t toggle TAB visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1168 s toggle SPACE and HARD SPACE visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1169 r toggle trailing blanks visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1170 l toggle \"long lines\" visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1171 L toggle \"long lines\" tail visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1172 n toggle NEWLINE visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1173 e toggle empty line at bob and/or eob visualization |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1174 C-i toggle indentation SPACEs visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1175 I toggle indentation SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1176 i toggle indentation TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1177 C-a toggle SPACEs after TAB visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1178 A toggle SPACEs after TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1179 a toggle SPACEs after TAB: TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1180 C-b toggle SPACEs before TAB visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1181 B toggle SPACEs before TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1182 b toggle SPACEs before TAB: TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1183 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1184 (VIA DISPLAY TABLE) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1185 T toggle TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1186 S toggle SPACEs before TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1187 N toggle NEWLINE visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1188 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1189 x restore `whitespace-style' value |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1190 ? display brief help |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1191 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1192 Non-interactively, ARG should be a symbol or a list of symbols. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1193 The valid symbols are: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1194 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1195 tabs toggle TAB visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1196 spaces toggle SPACE and HARD SPACE visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1197 trailing toggle trailing blanks visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1198 lines toggle \"long lines\" visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1199 lines-tail toggle \"long lines\" tail visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1200 newline toggle NEWLINE visualization |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1201 empty toggle empty line at bob and/or eob visualization |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1202 indentation toggle indentation SPACEs visualization |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1203 indentation::tab toggle indentation SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1204 indentation::space toggle indentation TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1205 space-after-tab toggle SPACEs after TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1206 space-after-tab::tab toggle SPACEs after TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1207 space-after-tab::space toggle SPACEs after TAB: TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1208 space-before-tab toggle SPACEs before TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1209 space-before-tab::tab toggle SPACEs before TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1210 space-before-tab::space toggle SPACEs before TAB: TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1211 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1212 tab-mark toggle TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1213 space-mark toggle SPACEs before TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1214 newline-mark toggle NEWLINE visualization |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1215 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1216 whitespace-style restore `whitespace-style' value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1217 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1218 Only useful with a windowing system. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1219 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1220 See `whitespace-style' and `indent-tabs-mode' for documentation." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1221 (interactive (whitespace-interactive-char t)) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1222 (let ((whitespace-style |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1223 (whitespace-toggle-list t arg whitespace-active-style))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1224 (whitespace-mode 0) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1225 (whitespace-mode 1))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1226 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1227 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1228 (defvar whitespace-toggle-style nil |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1229 "Used to toggle the global `whitespace-style' value.") |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1230 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1231 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1232 ;;;###autoload |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1233 (defun global-whitespace-toggle-options (arg) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1234 "Toggle global `whitespace-mode' options. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1235 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1236 If global whitespace-mode is off, toggle the option given by ARG |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1237 and turn on global whitespace-mode. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1238 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1239 If global whitespace-mode is on, toggle the option given by ARG |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1240 and restart global whitespace-mode. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1241 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
1242 Interactively, it accepts one of the following chars: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1243 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1244 CHAR MEANING |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1245 (VIA FACES) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1246 t toggle TAB visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1247 s toggle SPACE and HARD SPACE visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1248 r toggle trailing blanks visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1249 l toggle \"long lines\" visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1250 L toggle \"long lines\" tail visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1251 n toggle NEWLINE visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1252 e toggle empty line at bob and/or eob visualization |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1253 C-i toggle indentation SPACEs visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1254 I toggle indentation SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1255 i toggle indentation TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1256 C-a toggle SPACEs after TAB visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1257 A toggle SPACEs after TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1258 a toggle SPACEs after TAB: TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1259 C-b toggle SPACEs before TAB visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1260 B toggle SPACEs before TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1261 b toggle SPACEs before TAB: TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1262 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1263 (VIA DISPLAY TABLE) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1264 T toggle TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1265 S toggle SPACEs before TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1266 N toggle NEWLINE visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1267 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1268 x restore `whitespace-style' value |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1269 ? display brief help |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1270 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1271 Non-interactively, ARG should be a symbol or a list of symbols. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1272 The valid symbols are: |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1273 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1274 tabs toggle TAB visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1275 spaces toggle SPACE and HARD SPACE visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1276 trailing toggle trailing blanks visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1277 lines toggle \"long lines\" visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1278 lines-tail toggle \"long lines\" tail visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1279 newline toggle NEWLINE visualization |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1280 empty toggle empty line at bob and/or eob visualization |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1281 indentation toggle indentation SPACEs visualization |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1282 indentation::tab toggle indentation SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1283 indentation::space toggle indentation TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1284 space-after-tab toggle SPACEs after TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1285 space-after-tab::tab toggle SPACEs after TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1286 space-after-tab::space toggle SPACEs after TAB: TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1287 space-before-tab toggle SPACEs before TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1288 space-before-tab::tab toggle SPACEs before TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1289 space-before-tab::space toggle SPACEs before TAB: TABs visualization |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1290 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1291 tab-mark toggle TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1292 space-mark toggle SPACEs before TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1293 newline-mark toggle NEWLINE visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1294 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1295 whitespace-style restore `whitespace-style' value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1296 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1297 Only useful with a windowing system. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1298 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1299 See `whitespace-style' and `indent-tabs-mode' for documentation." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1300 (interactive (whitespace-interactive-char nil)) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1301 (let ((whitespace-style |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1302 (whitespace-toggle-list nil arg whitespace-toggle-style))) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1303 (setq whitespace-toggle-style whitespace-style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1304 (global-whitespace-mode 0) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1305 (global-whitespace-mode 1))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1306 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1307 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1308 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1309 ;;;; User commands - Cleanup |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1310 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1311 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1312 ;;;###autoload |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1313 (defun whitespace-cleanup () |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1314 "Cleanup some blank problems in all buffer or at region. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1315 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1316 It usually applies to the whole buffer, but in transient mark |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1317 mode when the mark is active, it applies to the region. It also |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1318 applies to the region when it is not in transiente mark mode, the |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1319 mark is active and \\[universal-argument] was pressed just before |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1320 calling `whitespace-cleanup' interactively. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1321 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1322 See also `whitespace-cleanup-region'. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1323 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
1324 The problems cleaned up are: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1325 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1326 1. empty lines at beginning of buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1327 2. empty lines at end of buffer. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1328 If `whitespace-style' includes the value `empty', remove all |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1329 empty lines at beginning and/or end of buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1330 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1331 3. 8 or more SPACEs at beginning of line. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1332 If `whitespace-style' includes the value `indentation': |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1333 replace 8 or more SPACEs at beginning of line by TABs, if |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1334 `indent-tabs-mode' is non-nil; otherwise, replace TABs by |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1335 SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1336 If `whitespace-style' includes the value `indentation::tab', |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1337 replace 8 or more SPACEs at beginning of line by TABs. |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1338 If `whitespace-style' includes the value `indentation::space', |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1339 replace TABs by SPACEs. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1340 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1341 4. SPACEs before TAB. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1342 If `whitespace-style' includes the value `space-before-tab': |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1343 replace SPACEs by TABs, if `indent-tabs-mode' is non-nil; |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1344 otherwise, replace TABs by SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1345 If `whitespace-style' includes the value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1346 `space-before-tab::tab', replace SPACEs by TABs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1347 If `whitespace-style' includes the value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1348 `space-before-tab::space', replace TABs by SPACEs. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1349 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1350 5. SPACEs or TABs at end of line. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1351 If `whitespace-style' includes the value `trailing', remove |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1352 all SPACEs or TABs at end of line. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1353 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1354 6. 8 or more SPACEs after TAB. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1355 If `whitespace-style' includes the value `space-after-tab': |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1356 replace SPACEs by TABs, if `indent-tabs-mode' is non-nil; |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1357 otherwise, replace TABs by SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1358 If `whitespace-style' includes the value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1359 `space-after-tab::tab', replace SPACEs by TABs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1360 If `whitespace-style' includes the value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1361 `space-after-tab::space', replace TABs by SPACEs. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1362 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1363 See `whitespace-style', `indent-tabs-mode' and `tab-width' for |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1364 documentation." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1365 (interactive "@*") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1366 (if (and (or transient-mark-mode |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1367 current-prefix-arg) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1368 mark-active) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1369 ;; region active |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1370 ;; PROBLEMs 1 and 2 are not handled in region |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1371 ;; PROBLEM 3: 8 or more SPACEs at bol |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1372 ;; PROBLEM 4: SPACEs before TAB |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1373 ;; PROBLEM 5: SPACEs or TABs at eol |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1374 ;; PROBLEM 6: 8 or more SPACEs after TAB |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1375 (whitespace-cleanup-region (region-beginning) (region-end)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1376 ;; whole buffer |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1377 (save-excursion |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1378 (save-match-data |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1379 ;; PROBLEM 1: empty lines at bob |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1380 ;; PROBLEM 2: empty lines at eob |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1381 ;; ACTION: remove all empty lines at bob and/or eob |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1382 (when (memq 'empty whitespace-style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1383 (let (overwrite-mode) ; enforce no overwrite |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1384 (goto-char (point-min)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1385 (when (re-search-forward |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1386 whitespace-empty-at-bob-regexp nil t) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1387 (delete-region (match-beginning 1) (match-end 1))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1388 (when (re-search-forward |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1389 whitespace-empty-at-eob-regexp nil t) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1390 (delete-region (match-beginning 1) (match-end 1))))))) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1391 ;; PROBLEM 3: 8 or more SPACEs at bol |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1392 ;; PROBLEM 4: SPACEs before TAB |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1393 ;; PROBLEM 5: SPACEs or TABs at eol |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1394 ;; PROBLEM 6: 8 or more SPACEs after TAB |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1395 (whitespace-cleanup-region (point-min) (point-max)))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1396 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1397 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1398 ;;;###autoload |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1399 (defun whitespace-cleanup-region (start end) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1400 "Cleanup some blank problems at region. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1401 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
1402 The problems cleaned up are: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1403 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1404 1. 8 or more SPACEs at beginning of line. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1405 If `whitespace-style' includes the value `indentation': |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1406 replace 8 or more SPACEs at beginning of line by TABs, if |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1407 `indent-tabs-mode' is non-nil; otherwise, replace TABs by |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1408 SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1409 If `whitespace-style' includes the value `indentation::tab', |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1410 replace 8 or more SPACEs at beginning of line by TABs. |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1411 If `whitespace-style' includes the value `indentation::space', |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1412 replace TABs by SPACEs. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1413 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1414 2. SPACEs before TAB. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1415 If `whitespace-style' includes the value `space-before-tab': |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1416 replace SPACEs by TABs, if `indent-tabs-mode' is non-nil; |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1417 otherwise, replace TABs by SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1418 If `whitespace-style' includes the value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1419 `space-before-tab::tab', replace SPACEs by TABs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1420 If `whitespace-style' includes the value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1421 `space-before-tab::space', replace TABs by SPACEs. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1422 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1423 3. SPACEs or TABs at end of line. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1424 If `whitespace-style' includes the value `trailing', remove |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1425 all SPACEs or TABs at end of line. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1426 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1427 4. 8 or more SPACEs after TAB. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1428 If `whitespace-style' includes the value `space-after-tab': |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1429 replace SPACEs by TABs, if `indent-tabs-mode' is non-nil; |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1430 otherwise, replace TABs by SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1431 If `whitespace-style' includes the value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1432 `space-after-tab::tab', replace SPACEs by TABs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1433 If `whitespace-style' includes the value |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1434 `space-after-tab::space', replace TABs by SPACEs. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1435 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1436 See `whitespace-style', `indent-tabs-mode' and `tab-width' for |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1437 documentation." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1438 (interactive "@*r") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1439 (let ((rstart (min start end)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1440 (rend (copy-marker (max start end))) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1441 (indent-tabs-mode whitespace-indent-tabs-mode) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1442 (tab-width whitespace-tab-width) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1443 overwrite-mode ; enforce no overwrite |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1444 tmp) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1445 (save-excursion |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1446 (save-match-data |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1447 ;; PROBLEM 1: 8 or more SPACEs at bol |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1448 (cond |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1449 ;; ACTION: replace 8 or more SPACEs at bol by TABs, if |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1450 ;; `indent-tabs-mode' is non-nil; otherwise, replace TABs by |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1451 ;; SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1452 ((memq 'indentation whitespace-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1453 (let ((regexp (whitespace-indentation-regexp))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1454 (goto-char rstart) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1455 (while (re-search-forward regexp rend t) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1456 (setq tmp (current-indentation)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1457 (goto-char (match-beginning 0)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1458 (delete-horizontal-space) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1459 (unless (eolp) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1460 (indent-to tmp))))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1461 ;; ACTION: replace 8 or more SPACEs at bol by TABs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1462 ((memq 'indentation::tab whitespace-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1463 (whitespace-replace-action |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1464 'tabify rstart rend |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1465 (whitespace-indentation-regexp 'tab) 0)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1466 ;; ACTION: replace TABs by SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1467 ((memq 'indentation::space whitespace-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1468 (whitespace-replace-action |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1469 'untabify rstart rend |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1470 (whitespace-indentation-regexp 'space) 0))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1471 ;; PROBLEM 3: SPACEs or TABs at eol |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1472 ;; ACTION: remove all SPACEs or TABs at eol |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1473 (when (memq 'trailing whitespace-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1474 (whitespace-replace-action |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1475 'delete-region rstart rend |
94400
049f194820fe
whitespace-trailing-regexp option fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94374
diff
changeset
|
1476 whitespace-trailing-regexp 1)) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1477 ;; PROBLEM 4: 8 or more SPACEs after TAB |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1478 (cond |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1479 ;; ACTION: replace 8 or more SPACEs by TABs, if |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1480 ;; `indent-tabs-mode' is non-nil; otherwise, replace TABs by |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1481 ;; SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1482 ((memq 'space-after-tab whitespace-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1483 (whitespace-replace-action |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1484 (if whitespace-indent-tabs-mode 'tabify 'untabify) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1485 rstart rend (whitespace-space-after-tab-regexp) 1)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1486 ;; ACTION: replace 8 or more SPACEs by TABs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1487 ((memq 'space-after-tab::tab whitespace-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1488 (whitespace-replace-action |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1489 'tabify rstart rend |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1490 (whitespace-space-after-tab-regexp 'tab) 1)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1491 ;; ACTION: replace TABs by SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1492 ((memq 'space-after-tab::space whitespace-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1493 (whitespace-replace-action |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1494 'untabify rstart rend |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1495 (whitespace-space-after-tab-regexp 'space) 1))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1496 ;; PROBLEM 2: SPACEs before TAB |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1497 (cond |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1498 ;; ACTION: replace SPACEs before TAB by TABs, if |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1499 ;; `indent-tabs-mode' is non-nil; otherwise, replace TABs by |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1500 ;; SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1501 ((memq 'space-before-tab whitespace-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1502 (whitespace-replace-action |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1503 (if whitespace-indent-tabs-mode 'tabify 'untabify) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1504 rstart rend whitespace-space-before-tab-regexp |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1505 (if whitespace-indent-tabs-mode 1 2))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1506 ;; ACTION: replace SPACEs before TAB by TABs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1507 ((memq 'space-before-tab::tab whitespace-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1508 (whitespace-replace-action |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1509 'tabify rstart rend |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1510 whitespace-space-before-tab-regexp 1)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1511 ;; ACTION: replace TABs by SPACEs. |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1512 ((memq 'space-before-tab::space whitespace-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1513 (whitespace-replace-action |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1514 'untabify rstart rend |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1515 whitespace-space-before-tab-regexp 2))))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1516 (set-marker rend nil))) ; point marker to nowhere |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1517 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1518 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1519 (defun whitespace-replace-action (action rstart rend regexp index) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1520 "Do ACTION in the string matched by REGEXP between RSTART and REND. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1521 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1522 INDEX is the level group matched by REGEXP and used by ACTION. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1523 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1524 See also `tab-width'." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1525 (goto-char rstart) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1526 (while (re-search-forward regexp rend t) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1527 (goto-char (match-end index)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1528 (funcall action (match-beginning index) (match-end index)))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1529 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1530 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1531 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1532 ;;;; User command - report |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1533 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1534 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1535 (defun whitespace-regexp (regexp &optional kind) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1536 "Return REGEXP depending on `whitespace-indent-tabs-mode'." |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1537 (cond |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1538 ((or (eq kind 'tab) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1539 whitespace-indent-tabs-mode) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1540 (format (car regexp) whitespace-tab-width)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1541 ((or (eq kind 'space) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1542 (not whitespace-indent-tabs-mode)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1543 (cdr regexp)))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1544 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1545 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1546 (defun whitespace-indentation-regexp (&optional kind) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1547 "Return the indentation regexp depending on `whitespace-indent-tabs-mode'." |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1548 (whitespace-regexp whitespace-indentation-regexp kind)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1549 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1550 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1551 (defun whitespace-space-after-tab-regexp (&optional kind) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1552 "Return the space-after-tab regexp depending on `whitespace-indent-tabs-mode'." |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1553 (whitespace-regexp whitespace-space-after-tab-regexp kind)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1554 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1555 |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1556 (defconst whitespace-report-list |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1557 (list |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1558 (cons 'empty whitespace-empty-at-bob-regexp) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1559 (cons 'empty whitespace-empty-at-eob-regexp) |
94400
049f194820fe
whitespace-trailing-regexp option fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94374
diff
changeset
|
1560 (cons 'trailing whitespace-trailing-regexp) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1561 (cons 'indentation nil) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1562 (cons 'indentation::tab nil) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1563 (cons 'indentation::space nil) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1564 (cons 'space-before-tab whitespace-space-before-tab-regexp) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1565 (cons 'space-before-tab::tab whitespace-space-before-tab-regexp) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1566 (cons 'space-before-tab::space whitespace-space-before-tab-regexp) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1567 (cons 'space-after-tab nil) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1568 (cons 'space-after-tab::tab nil) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1569 (cons 'space-after-tab::space nil) |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1570 ) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1571 "List of whitespace bogus symbol and corresponding regexp.") |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1572 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1573 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1574 (defconst whitespace-report-text |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1575 '( ;; `indent-tabs-mode' has non-nil value |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1576 "\ |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1577 Whitespace Report |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1578 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1579 Current Setting Whitespace Problem |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1580 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1581 empty [] [] empty lines at beginning of buffer |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1582 empty [] [] empty lines at end of buffer |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1583 trailing [] [] SPACEs or TABs at end of line |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1584 indentation [] [] 8 or more SPACEs at beginning of line |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1585 indentation::tab [] [] 8 or more SPACEs at beginning of line |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1586 indentation::space [] [] TABs at beginning of line |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1587 space-before-tab [] [] SPACEs before TAB |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1588 space-before-tab::tab [] [] SPACEs before TAB: SPACEs |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1589 space-before-tab::space [] [] SPACEs before TAB: TABs |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1590 space-after-tab [] [] 8 or more SPACEs after TAB |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1591 space-after-tab::tab [] [] 8 or more SPACEs after TAB: SPACEs |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1592 space-after-tab::space [] [] 8 or more SPACEs after TAB: TABs |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1593 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1594 indent-tabs-mode = |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1595 tab-width = \n\n" |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1596 . ;; `indent-tabs-mode' has nil value |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1597 "\ |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1598 Whitespace Report |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1599 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1600 Current Setting Whitespace Problem |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1601 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1602 empty [] [] empty lines at beginning of buffer |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1603 empty [] [] empty lines at end of buffer |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1604 trailing [] [] SPACEs or TABs at end of line |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1605 indentation [] [] TABs at beginning of line |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1606 indentation::tab [] [] 8 or more SPACEs at beginning of line |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1607 indentation::space [] [] TABs at beginning of line |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1608 space-before-tab [] [] SPACEs before TAB |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1609 space-before-tab::tab [] [] SPACEs before TAB: SPACEs |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1610 space-before-tab::space [] [] SPACEs before TAB: TABs |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1611 space-after-tab [] [] 8 or more SPACEs after TAB |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1612 space-after-tab::tab [] [] 8 or more SPACEs after TAB: SPACEs |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1613 space-after-tab::space [] [] 8 or more SPACEs after TAB: TABs |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1614 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1615 indent-tabs-mode = |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1616 tab-width = \n\n") |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1617 "Text for whitespace bogus report. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1618 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1619 It is a cons of strings, where the car part is used when |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1620 `indent-tabs-mode' is non-nil, and the cdr part is used when |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1621 `indent-tabs-mode' is nil.") |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1622 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1623 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1624 (defconst whitespace-report-buffer-name "*Whitespace Report*" |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1625 "The buffer name for whitespace bogus report.") |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1626 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1627 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1628 ;;;###autoload |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1629 (defun whitespace-report (&optional force report-if-bogus) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1630 "Report some whitespace problems in buffer. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1631 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1632 Return nil if there is no whitespace problem; otherwise, return |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1633 non-nil. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1634 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1635 If FORCE is non-nil or \\[universal-argument] was pressed just |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1636 before calling `whitespace-report' interactively, it forces |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1637 `whitespace-style' to have: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1638 |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1639 empty |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1640 trailing |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1641 indentation |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1642 space-before-tab |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1643 space-after-tab |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1644 |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1645 If REPORT-IF-BOGUS is non-nil, it reports only when there are any |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1646 whitespace problems in buffer. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1647 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1648 Report if some of the following whitespace problems exist: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1649 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1650 * If `indent-tabs-mode' is non-nil: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1651 empty 1. empty lines at beginning of buffer. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1652 empty 2. empty lines at end of buffer. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1653 trailing 3. SPACEs or TABs at end of line. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1654 indentation 4. 8 or more SPACEs at beginning of line. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1655 space-before-tab 5. SPACEs before TAB. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1656 space-after-tab 6. 8 or more SPACEs after TAB. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1657 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1658 * If `indent-tabs-mode' is nil: |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1659 empty 1. empty lines at beginning of buffer. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1660 empty 2. empty lines at end of buffer. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1661 trailing 3. SPACEs or TABs at end of line. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1662 indentation 4. TABS at beginning of line. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1663 space-before-tab 5. SPACEs before TAB. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1664 space-after-tab 6. 8 or more SPACEs after TAB. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1665 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1666 See `whitespace-style' for documentation. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1667 See also `whitespace-cleanup' and `whitespace-cleanup-region' for |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1668 cleaning up these problems." |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1669 (interactive (list current-prefix-arg)) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1670 (whitespace-report-region (point-min) (point-max) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1671 force report-if-bogus)) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1672 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1673 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1674 ;;;###autoload |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1675 (defun whitespace-report-region (start end &optional force report-if-bogus) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1676 "Report some whitespace problems in a region. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1677 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1678 Return nil if there is no whitespace problem; otherwise, return |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1679 non-nil. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1680 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1681 If FORCE is non-nil or \\[universal-argument] was pressed just |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1682 before calling `whitespace-report-region' interactively, it |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1683 forces `whitespace-style' to have: |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1684 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1685 empty |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1686 indentation |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1687 space-before-tab |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1688 trailing |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1689 space-after-tab |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1690 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1691 If REPORT-IF-BOGUS is non-nil, it reports only when there are any |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1692 whitespace problems in buffer. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1693 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1694 Report if some of the following whitespace problems exist: |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1695 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1696 * If `indent-tabs-mode' is non-nil: |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1697 empty 1. empty lines at beginning of buffer. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1698 empty 2. empty lines at end of buffer. |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1699 trailing 3. SPACEs or TABs at end of line. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1700 indentation 4. 8 or more SPACEs at beginning of line. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1701 space-before-tab 5. SPACEs before TAB. |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1702 space-after-tab 6. 8 or more SPACEs after TAB. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1703 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1704 * If `indent-tabs-mode' is nil: |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1705 empty 1. empty lines at beginning of buffer. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1706 empty 2. empty lines at end of buffer. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1707 trailing 3. SPACEs or TABs at end of line. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1708 indentation 4. TABS at beginning of line. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1709 space-before-tab 5. SPACEs before TAB. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1710 space-after-tab 6. 8 or more SPACEs after TAB. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1711 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1712 See `whitespace-style' for documentation. |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1713 See also `whitespace-cleanup' and `whitespace-cleanup-region' for |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1714 cleaning up these problems." |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1715 (interactive "r") |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1716 (setq force (or current-prefix-arg force)) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1717 (save-excursion |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1718 (save-match-data |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1719 (let* ((has-bogus nil) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1720 (rstart (min start end)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1721 (rend (max start end)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1722 (bogus-list |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1723 (mapcar |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1724 #'(lambda (option) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1725 (when force |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1726 (add-to-list 'whitespace-style (car option))) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1727 (goto-char rstart) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1728 (let ((regexp |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1729 (cond |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1730 ((eq (car option) 'indentation) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1731 (whitespace-indentation-regexp)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1732 ((eq (car option) 'indentation::tab) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1733 (whitespace-indentation-regexp 'tab)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1734 ((eq (car option) 'indentation::space) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1735 (whitespace-indentation-regexp 'space)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1736 ((eq (car option) 'space-after-tab) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1737 (whitespace-space-after-tab-regexp)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1738 ((eq (car option) 'space-after-tab::tab) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1739 (whitespace-space-after-tab-regexp 'tab)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1740 ((eq (car option) 'space-after-tab::space) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1741 (whitespace-space-after-tab-regexp 'space)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1742 (t |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1743 (cdr option))))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1744 (and (re-search-forward regexp rend t) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1745 (setq has-bogus t)))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1746 whitespace-report-list))) |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1747 (when (if report-if-bogus has-bogus t) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1748 (whitespace-kill-buffer whitespace-report-buffer-name) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1749 ;; `whitespace-indent-tabs-mode' is local to current buffer |
94142
14cbf4c7b904
Handle whitespace-tab-width properly.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94112
diff
changeset
|
1750 ;; `whitespace-tab-width' is local to current buffer |
14cbf4c7b904
Handle whitespace-tab-width properly.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94112
diff
changeset
|
1751 (let ((ws-indent-tabs-mode whitespace-indent-tabs-mode) |
14cbf4c7b904
Handle whitespace-tab-width properly.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94112
diff
changeset
|
1752 (ws-tab-width whitespace-tab-width)) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1753 (with-current-buffer (get-buffer-create |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1754 whitespace-report-buffer-name) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1755 (erase-buffer) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1756 (insert (if ws-indent-tabs-mode |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1757 (car whitespace-report-text) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1758 (cdr whitespace-report-text))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1759 (goto-char (point-min)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1760 (forward-line 3) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1761 (dolist (option whitespace-report-list) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1762 (forward-line 1) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1763 (whitespace-mark-x |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1764 27 (memq (car option) whitespace-style)) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1765 (whitespace-mark-x 7 (car bogus-list)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1766 (setq bogus-list (cdr bogus-list))) |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1767 (forward-line 1) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1768 (whitespace-insert-value ws-indent-tabs-mode) |
94142
14cbf4c7b904
Handle whitespace-tab-width properly.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94112
diff
changeset
|
1769 (whitespace-insert-value ws-tab-width) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1770 (when has-bogus |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1771 (goto-char (point-max)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1772 (insert " Type `M-x whitespace-cleanup'" |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1773 " to cleanup the buffer.\n\n" |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1774 " Type `M-x whitespace-cleanup-region'" |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1775 " to cleanup a region.\n\n")) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1776 (whitespace-display-window (current-buffer))))) |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1777 has-bogus)))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1778 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1779 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1780 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1781 ;;;; Internal functions |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1782 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1783 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1784 (defvar whitespace-font-lock-mode nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1785 "Used to remember whether a buffer had font lock mode on or not.") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1786 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1787 (defvar whitespace-font-lock nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1788 "Used to remember whether a buffer initially had font lock on or not.") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1789 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1790 (defvar whitespace-font-lock-keywords nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1791 "Used to save locally `font-lock-keywords' value.") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1792 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1793 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1794 (defconst whitespace-help-text |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1795 "\ |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1796 Whitespace Toggle Options |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1797 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1798 FACES |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1799 [] t - toggle TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1800 [] s - toggle SPACE and HARD SPACE visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1801 [] r - toggle trailing blanks visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1802 [] l - toggle \"long lines\" visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1803 [] L - toggle \"long lines\" tail visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1804 [] n - toggle NEWLINE visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1805 [] e - toggle empty line at bob and/or eob visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1806 [] C-i - toggle indentation SPACEs visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1807 [] I - toggle indentation SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1808 [] i - toggle indentation TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1809 [] C-a - toggle SPACEs after TAB visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1810 [] A - toggle SPACEs after TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1811 [] a - toggle SPACEs after TAB: TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1812 [] C-b - toggle SPACEs before TAB visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1813 [] B - toggle SPACEs before TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1814 [] b - toggle SPACEs before TAB: TABs visualization |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1815 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1816 DISPLAY TABLE |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1817 [] T - toggle TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1818 [] S - toggle SPACE and HARD SPACE visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1819 [] N - toggle NEWLINE visualization |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1820 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1821 x - restore `whitespace-style' value |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1822 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1823 ? - display this text\n\n" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1824 "Text for whitespace toggle options.") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1825 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1826 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1827 (defconst whitespace-help-buffer-name "*Whitespace Toggle Options*" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1828 "The buffer name for whitespace toggle options.") |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1829 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1830 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1831 (defun whitespace-insert-value (value) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1832 "Insert VALUE at column 20 of next line." |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1833 (forward-line 1) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1834 (move-to-column 20 t) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1835 (insert (format "%s" value))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1836 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1837 |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1838 (defun whitespace-mark-x (nchars condition) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1839 "Insert the mark ('X' or ' ') after NCHARS depending on CONDITION." |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1840 (forward-char nchars) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1841 (insert (if condition "X" " "))) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1842 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1843 |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1844 (defun whitespace-insert-option-mark (the-list the-value) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1845 "Insert the option mark ('X' or ' ') in toggle options buffer." |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1846 (goto-char (point-min)) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1847 (forward-line 2) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1848 (dolist (sym the-list) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1849 (if (eq sym 'help-newline) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1850 (forward-line 2) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1851 (forward-line 1) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1852 (whitespace-mark-x 2 (memq sym the-value))))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1853 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1854 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1855 (defun whitespace-help-on (style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1856 "Display the whitespace toggle options." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1857 (unless (get-buffer whitespace-help-buffer-name) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1858 (delete-other-windows) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1859 (let ((buffer (get-buffer-create whitespace-help-buffer-name))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1860 (save-excursion |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1861 (set-buffer buffer) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1862 (erase-buffer) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1863 (insert whitespace-help-text) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1864 (whitespace-insert-option-mark |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1865 whitespace-style-value-list style) |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1866 (whitespace-display-window buffer))))) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1867 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1868 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1869 (defun whitespace-display-window (buffer) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1870 "Display BUFFER in a new window." |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1871 (goto-char (point-min)) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1872 (set-buffer-modified-p nil) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1873 (let ((size (- (window-height) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1874 (max window-min-height |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1875 (1+ (count-lines (point-min) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1876 (point-max))))))) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1877 (when (<= size 0) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1878 (kill-buffer buffer) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1879 (error "Frame height is too small; \ |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1880 can't split window to display whitespace toggle options")) |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
1881 (set-window-buffer (split-window nil size) buffer))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1882 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1883 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1884 (defun whitespace-kill-buffer (buffer-name) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1885 "Kill buffer BUFFER-NAME and windows related with it." |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1886 (let ((buffer (get-buffer buffer-name))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1887 (when buffer |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1888 (delete-windows-on buffer) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1889 (kill-buffer buffer)))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1890 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1891 |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1892 (defun whitespace-help-off () |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1893 "Remove the buffer and window of the whitespace toggle options." |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1894 (whitespace-kill-buffer whitespace-help-buffer-name)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1895 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1896 |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1897 (defun whitespace-interactive-char (local-p) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1898 "Interactive function to read a char and return a symbol. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1899 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1900 If LOCAL-P is non-nil, it uses a local context; otherwise, it |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1901 uses a global context. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1902 |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
1903 It accepts one of the following chars: |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1904 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1905 CHAR MEANING |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1906 (VIA FACES) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1907 t toggle TAB visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1908 s toggle SPACE and HARD SPACE visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1909 r toggle trailing blanks visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1910 l toggle \"long lines\" visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1911 L toggle \"long lines\" tail visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1912 n toggle NEWLINE visualization |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1913 e toggle empty line at bob and/or eob visualization |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1914 C-i toggle indentation SPACEs visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1915 I toggle indentation SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1916 i toggle indentation TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1917 C-a toggle SPACEs after TAB visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1918 A toggle SPACEs after TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1919 a toggle SPACEs after TAB: TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1920 C-b toggle SPACEs before TAB visualization (via `indent-tabs-mode') |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1921 B toggle SPACEs before TAB: SPACEs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1922 b toggle SPACEs before TAB: TABs visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1923 |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1924 (VIA DISPLAY TABLE) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1925 T toggle TAB visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1926 S toggle SPACE and HARD SPACE visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1927 N toggle NEWLINE visualization |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
1928 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1929 x restore `whitespace-style' value |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1930 ? display brief help |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1931 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1932 See also `whitespace-toggle-option-alist'." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1933 (let* ((is-off (not (if local-p |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1934 whitespace-mode |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1935 global-whitespace-mode))) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1936 (style (cond (is-off whitespace-style) ; use default value |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1937 (local-p whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1938 (t whitespace-toggle-style))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1939 (prompt |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1940 (format "Whitespace Toggle %s (type ? for further options)-" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1941 (if local-p "Local" "Global"))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1942 ch sym) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1943 ;; read a valid option and get the corresponding symbol |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1944 (save-window-excursion |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1945 (condition-case data |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1946 (progn |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1947 (while |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1948 ;; while condition |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1949 (progn |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1950 (setq ch (read-char prompt)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1951 (not |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1952 (setq sym |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1953 (cdr |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1954 (assq ch whitespace-toggle-option-alist))))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1955 ;; while body |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1956 (if (eq ch ?\?) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1957 (whitespace-help-on style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1958 (ding))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1959 (whitespace-help-off) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1960 (message " ")) ; clean echo area |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1961 ;; handler |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1962 ((quit error) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1963 (whitespace-help-off) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1964 (error (error-message-string data))))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1965 (list sym))) ; return the apropriate symbol |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1966 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1967 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1968 (defun whitespace-toggle-list (local-p arg the-list) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1969 "Toggle options in THE-LIST based on list ARG. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1970 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1971 If LOCAL-P is non-nil, it uses a local context; otherwise, it |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1972 uses a global context. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1973 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1974 ARG is a list of options to be toggled. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1975 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1976 THE-LIST is a list of options. This list will be toggled and the |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1977 resultant list will be returned." |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1978 (unless (if local-p whitespace-mode global-whitespace-mode) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1979 (setq the-list whitespace-style)) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1980 (setq the-list (copy-sequence the-list)) ; keep original list |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1981 (dolist (sym (if (listp arg) arg (list arg))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1982 (cond |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1983 ;; ignore help value |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1984 ((eq sym 'help-newline)) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1985 ;; restore default values |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1986 ((eq sym 'whitespace-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1987 (setq the-list whitespace-style)) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1988 ;; toggle valid values |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1989 ((memq sym whitespace-style-value-list) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1990 (setq the-list (if (memq sym the-list) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1991 (delq sym the-list) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1992 (cons sym the-list)))))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1993 the-list) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
1994 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
1995 |
94226
8191f88f6fb9
(whitespace-display-table, whitespace-display-table-was-local):
Glenn Morris <rgm@gnu.org>
parents:
94142
diff
changeset
|
1996 (defvar whitespace-display-table nil |
8191f88f6fb9
(whitespace-display-table, whitespace-display-table-was-local):
Glenn Morris <rgm@gnu.org>
parents:
94142
diff
changeset
|
1997 "Used to save a local display table.") |
8191f88f6fb9
(whitespace-display-table, whitespace-display-table-was-local):
Glenn Morris <rgm@gnu.org>
parents:
94142
diff
changeset
|
1998 |
8191f88f6fb9
(whitespace-display-table, whitespace-display-table-was-local):
Glenn Morris <rgm@gnu.org>
parents:
94142
diff
changeset
|
1999 (defvar whitespace-display-table-was-local nil |
8191f88f6fb9
(whitespace-display-table, whitespace-display-table-was-local):
Glenn Morris <rgm@gnu.org>
parents:
94142
diff
changeset
|
2000 "Used to remember whether a buffer initially had a local display table.") |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2001 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2002 |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2003 (defun whitespace-turn-on () |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2004 "Turn on whitespace visualization." |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2005 ;; prepare local hooks |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2006 (whitespace-add-local-hook) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2007 ;; create whitespace local buffer environment |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2008 (set (make-local-variable 'whitespace-font-lock-mode) nil) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2009 (set (make-local-variable 'whitespace-font-lock) nil) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2010 (set (make-local-variable 'whitespace-font-lock-keywords) nil) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2011 (set (make-local-variable 'whitespace-display-table) nil) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2012 (set (make-local-variable 'whitespace-display-table-was-local) nil) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2013 (set (make-local-variable 'whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2014 (if (listp whitespace-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2015 whitespace-style |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2016 (list whitespace-style))) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2017 (set (make-local-variable 'whitespace-indent-tabs-mode) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2018 indent-tabs-mode) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2019 (set (make-local-variable 'whitespace-tab-width) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2020 tab-width) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2021 ;; turn on whitespace |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2022 (when whitespace-active-style |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2023 (whitespace-color-on) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2024 (whitespace-display-char-on))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2025 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2026 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2027 (defun whitespace-turn-off () |
88118
959dc75df82e
(whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents:
88115
diff
changeset
|
2028 "Turn off whitespace visualization." |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2029 (whitespace-remove-local-hook) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2030 (when whitespace-active-style |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2031 (whitespace-color-off) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2032 (whitespace-display-char-off))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2033 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2034 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2035 (defun whitespace-style-face-p () |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2036 "Return t if there is some visualization via face." |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2037 (or (memq 'tabs whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2038 (memq 'spaces whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2039 (memq 'trailing whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2040 (memq 'lines whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2041 (memq 'lines-tail whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2042 (memq 'newline whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2043 (memq 'empty whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2044 (memq 'indentation whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2045 (memq 'indentation::tab whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2046 (memq 'indentation::space whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2047 (memq 'space-after-tab whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2048 (memq 'space-after-tab::tab whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2049 (memq 'space-after-tab::space whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2050 (memq 'space-before-tab whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2051 (memq 'space-before-tab::tab whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2052 (memq 'space-before-tab::space whitespace-active-style))) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2053 |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2054 |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2055 (defun whitespace-color-on () |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2056 "Turn on color visualization." |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2057 (when (whitespace-style-face-p) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2058 (unless whitespace-font-lock |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2059 (setq whitespace-font-lock t |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2060 whitespace-font-lock-keywords |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2061 (copy-sequence font-lock-keywords))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2062 ;; turn off font lock |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2063 (set (make-local-variable 'whitespace-font-lock-mode) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2064 font-lock-mode) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2065 (font-lock-mode 0) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2066 ;; add whitespace-mode color into font lock |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2067 (when (memq 'spaces whitespace-active-style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2068 (font-lock-add-keywords |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2069 nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2070 (list |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2071 ;; Show SPACEs |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2072 (list whitespace-space-regexp 1 whitespace-space t) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2073 ;; Show HARD SPACEs |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2074 (list whitespace-hspace-regexp 1 whitespace-hspace t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2075 t)) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2076 (when (memq 'tabs whitespace-active-style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2077 (font-lock-add-keywords |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2078 nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2079 (list |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2080 ;; Show TABs |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2081 (list whitespace-tab-regexp 1 whitespace-tab t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2082 t)) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2083 (when (memq 'trailing whitespace-active-style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2084 (font-lock-add-keywords |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2085 nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2086 (list |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2087 ;; Show trailing blanks |
94400
049f194820fe
whitespace-trailing-regexp option fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94374
diff
changeset
|
2088 (list whitespace-trailing-regexp 1 whitespace-trailing t)) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2089 t)) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2090 (when (or (memq 'lines whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2091 (memq 'lines-tail whitespace-active-style)) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2092 (font-lock-add-keywords |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2093 nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2094 (list |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2095 ;; Show "long" lines |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2096 (list |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2097 (format |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2098 "^\\([^\t\n]\\{%s\\}\\|[^\t\n]\\{0,%s\\}\t\\)\\{%d\\}%s\\(.+\\)$" |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2099 whitespace-tab-width (1- whitespace-tab-width) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2100 (/ whitespace-line-column tab-width) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2101 (let ((rem (% whitespace-line-column whitespace-tab-width))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2102 (if (zerop rem) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2103 "" |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2104 (format ".\\{%d\\}" rem)))) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2105 (if (memq 'lines whitespace-active-style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2106 0 ; whole line |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2107 2) ; line tail |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2108 whitespace-line t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2109 t)) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2110 (cond |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2111 ((memq 'space-before-tab whitespace-active-style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2112 (font-lock-add-keywords |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2113 nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2114 (list |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2115 ;; Show SPACEs before TAB (indent-tabs-mode) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2116 (list whitespace-space-before-tab-regexp |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2117 (if whitespace-indent-tabs-mode 1 2) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2118 whitespace-space-before-tab t)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2119 t)) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2120 ((memq 'space-before-tab::tab whitespace-active-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2121 (font-lock-add-keywords |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2122 nil |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2123 (list |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2124 ;; Show SPACEs before TAB (SPACEs) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2125 (list whitespace-space-before-tab-regexp |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2126 1 whitespace-space-before-tab t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2127 t)) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2128 ((memq 'space-before-tab::space whitespace-active-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2129 (font-lock-add-keywords |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2130 nil |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2131 (list |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2132 ;; Show SPACEs before TAB (TABs) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2133 (list whitespace-space-before-tab-regexp |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2134 2 whitespace-space-before-tab t)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2135 t))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2136 (cond |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2137 ((memq 'indentation whitespace-active-style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2138 (font-lock-add-keywords |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2139 nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2140 (list |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2141 ;; Show indentation SPACEs (indent-tabs-mode) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2142 (list (whitespace-indentation-regexp) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2143 1 whitespace-indentation t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2144 t)) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2145 ((memq 'indentation::tab whitespace-active-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2146 (font-lock-add-keywords |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2147 nil |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2148 (list |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2149 ;; Show indentation SPACEs (SPACEs) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2150 (list (whitespace-indentation-regexp 'tab) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2151 1 whitespace-indentation t)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2152 t)) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2153 ((memq 'indentation::space whitespace-active-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2154 (font-lock-add-keywords |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2155 nil |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2156 (list |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2157 ;; Show indentation SPACEs (TABs) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2158 (list (whitespace-indentation-regexp 'space) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2159 1 whitespace-indentation t)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2160 t))) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2161 (when (memq 'empty whitespace-active-style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2162 (font-lock-add-keywords |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2163 nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2164 (list |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2165 ;; Show empty lines at beginning of buffer |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2166 (list whitespace-empty-at-bob-regexp |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2167 1 whitespace-empty t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2168 t) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2169 (font-lock-add-keywords |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2170 nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2171 (list |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2172 ;; Show empty lines at end of buffer |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2173 (list whitespace-empty-at-eob-regexp |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2174 1 whitespace-empty t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2175 t)) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2176 (cond |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2177 ((memq 'space-after-tab whitespace-active-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2178 (font-lock-add-keywords |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2179 nil |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2180 (list |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2181 ;; Show SPACEs after TAB (indent-tabs-mode) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2182 (list (whitespace-space-after-tab-regexp) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2183 1 whitespace-space-after-tab t)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2184 t)) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2185 ((memq 'space-after-tab::tab whitespace-active-style) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2186 (font-lock-add-keywords |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2187 nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2188 (list |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2189 ;; Show SPACEs after TAB (SPACEs) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2190 (list (whitespace-space-after-tab-regexp 'tab) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2191 1 whitespace-space-after-tab t)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2192 t)) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2193 ((memq 'space-after-tab::space whitespace-active-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2194 (font-lock-add-keywords |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2195 nil |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2196 (list |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2197 ;; Show SPACEs after TAB (TABs) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2198 (list (whitespace-space-after-tab-regexp 'space) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2199 1 whitespace-space-after-tab t)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2200 t))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2201 ;; now turn on font lock and highlight blanks |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2202 (font-lock-mode 1))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2203 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2204 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2205 (defun whitespace-color-off () |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2206 "Turn off color visualization." |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2207 ;; turn off font lock |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2208 (when (whitespace-style-face-p) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2209 (font-lock-mode 0) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2210 (when whitespace-font-lock |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2211 (setq whitespace-font-lock nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2212 font-lock-keywords whitespace-font-lock-keywords)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2213 ;; restore original font lock state |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2214 (font-lock-mode whitespace-font-lock-mode))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2215 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2216 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2217 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2218 ;;;; Hacked from visws.el (Miles Bader <miles@gnu.org>) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2219 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2220 |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2221 (defun whitespace-style-mark-p () |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2222 "Return t if there is some visualization via display table." |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2223 (or (memq 'tab-mark whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2224 (memq 'space-mark whitespace-active-style) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2225 (memq 'newline-mark whitespace-active-style))) |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2226 |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2227 |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2228 (defsubst whitespace-char-valid-p (char) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2229 ;; This check should be improved!!! |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2230 (or (< char 256) |
91432
649ddfa757be
(whitespace-char-valid-p): Use characterp rather than char-valid-p.
Glenn Morris <rgm@gnu.org>
parents:
91377
diff
changeset
|
2231 (characterp char))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2232 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2233 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2234 (defun whitespace-display-vector-p (vec) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2235 "Return true if every character in vector VEC can be displayed." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2236 (let ((i (length vec))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2237 (when (> i 0) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2238 (while (and (>= (setq i (1- i)) 0) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2239 (whitespace-char-valid-p (aref vec i)))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2240 (< i 0)))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2241 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2242 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2243 (defun whitespace-display-char-on () |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2244 "Turn on character display mapping." |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2245 (when (and whitespace-display-mappings |
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2246 (whitespace-style-mark-p)) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2247 (let (vecs vec) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2248 ;; Remember whether a buffer has a local display table. |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2249 (unless whitespace-display-table-was-local |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2250 (setq whitespace-display-table-was-local t |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2251 whitespace-display-table |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2252 (copy-sequence buffer-display-table))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2253 (unless buffer-display-table |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2254 (setq buffer-display-table (make-display-table))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2255 (dolist (entry whitespace-display-mappings) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2256 ;; check if it is to display this mark |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2257 (when (memq (car entry) whitespace-style) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2258 ;; Get a displayable mapping. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2259 (setq vecs (cddr entry)) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2260 (while (and vecs |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2261 (not (whitespace-display-vector-p (car vecs)))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2262 (setq vecs (cdr vecs))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2263 ;; Display a valid mapping. |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2264 (when vecs |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2265 (setq vec (copy-sequence (car vecs))) |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2266 ;; NEWLINE char |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2267 (when (and (eq (cadr entry) ?\n) |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2268 (memq 'newline whitespace-active-style)) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2269 ;; Only insert face bits on NEWLINE char mapping to avoid |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2270 ;; obstruction of other faces like TABs and (HARD) SPACEs |
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2271 ;; faces, font-lock faces, etc. |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2272 (dotimes (i (length vec)) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2273 (or (eq (aref vec i) ?\n) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2274 (aset vec i |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2275 (make-glyph-code (aref vec i) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2276 whitespace-newline))))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2277 ;; Display mapping |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2278 (aset buffer-display-table (cadr entry) vec))))))) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2279 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2280 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2281 (defun whitespace-display-char-off () |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2282 "Turn off character display mapping." |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2283 (and whitespace-display-mappings |
94373
f9bcef02655f
New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
94226
diff
changeset
|
2284 (whitespace-style-mark-p) |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2285 whitespace-display-table-was-local |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2286 (setq whitespace-display-table-was-local nil |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2287 buffer-display-table whitespace-display-table))) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2288 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2289 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2290 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2291 ;;;; Hook |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2292 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2293 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2294 (defun whitespace-action-when-on () |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2295 "Action to be taken always when local whitespace is turned on." |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2296 (cond ((memq 'cleanup whitespace-action) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2297 (whitespace-cleanup)) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2298 ((memq 'report-on-bogus whitespace-action) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2299 (whitespace-report nil t)))) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2300 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2301 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2302 (defun whitespace-add-local-hook () |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2303 "Add some whitespace hooks locally." |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2304 (add-hook 'write-file-functions 'whitespace-write-file-hook nil t) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2305 (add-hook 'kill-buffer-hook 'whitespace-kill-buffer-hook nil t)) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2306 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2307 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2308 (defun whitespace-remove-local-hook () |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2309 "Remove some whitespace hooks locally." |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2310 (remove-hook 'write-file-functions 'whitespace-write-file-hook t) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2311 (remove-hook 'kill-buffer-hook 'whitespace-kill-buffer-hook t)) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2312 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2313 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2314 (defun whitespace-write-file-hook () |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2315 "Action to be taken when buffer is written. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2316 It should be added buffer-locally to `write-file-functions'." |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2317 (when (whitespace-action) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2318 (error "Abort write due to whitespace problems in %s" |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2319 (buffer-name))) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2320 nil) ; continue hook processing |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2321 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2322 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2323 (defun whitespace-kill-buffer-hook () |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2324 "Action to be taken when buffer is killed. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2325 It should be added buffer-locally to `kill-buffer-hook'." |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2326 (whitespace-action) |
94112
7b3262e9986b
Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
92372
diff
changeset
|
2327 nil) ; continue hook processing |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2328 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2329 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2330 (defun whitespace-action () |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2331 "Action to be taken when buffer is killed or written. |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2332 Return t when the action should be aborted." |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2333 (cond ((memq 'auto-cleanup whitespace-action) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2334 (whitespace-cleanup) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2335 nil) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2336 ((memq 'abort-on-bogus whitespace-action) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2337 (whitespace-report nil t)) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2338 (t |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2339 nil))) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2340 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2341 |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2342 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2343 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2344 |
88115
becc5f138486
(global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents:
88113
diff
changeset
|
2345 (defun whitespace-unload-function () |
92372
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2346 "Unload the whitespace library." |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2347 (global-whitespace-mode -1) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2348 ;; be sure all local whitespace mode is turned off |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2349 (save-current-buffer |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2350 (dolist (buf (buffer-list)) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2351 (set-buffer buf) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2352 (whitespace-mode -1))) |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2353 nil) ; continue standard unloading |
0418e6ff8eb2
New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
91471
diff
changeset
|
2354 |
88115
becc5f138486
(global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents:
88113
diff
changeset
|
2355 |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2356 (provide 'whitespace) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2357 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2358 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2359 (run-hooks 'whitespace-load-hook) |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2360 |
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2361 |
88100
9623247b8103
Re-use arch-tag from old blank-mode.el for lisp/whitespace.el
Miles Bader <miles@gnu.org>
parents:
88099
diff
changeset
|
2362 ;; arch-tag: 1b1e2500-dbd4-4a26-8f7a-5a5edfd3c97e |
88097
1662791e8fd8
Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff
changeset
|
2363 ;;; whitespace.el ends here |