annotate lisp/whitespace.el @ 112085:19ad0830069c

* src/.gdbinit (xgetptr): Fix the union+lsb case. (xbacktrace): Fix the union case.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 27 Dec 2010 10:27:52 -0500
parents 28ca316fcaea
children 376148b31b5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 106527
diff changeset
3 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
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
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
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
9 ;; Version: 13.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
bb784189a8b3 Doc fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94373
diff changeset
47 ;; The `whitespace-style' variable selects which way blanks are
bb784189a8b3 Doc fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94373
diff changeset
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 ;;
105447
257c9f6d8be8 Fix doc.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 105244
diff changeset
63 ;; The trailing spaces are not highlighted while point is at end of line.
257c9f6d8be8 Fix doc.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 105244
diff changeset
64 ;; Also the spaces at beginning of buffer are not highlighted while point is at
257c9f6d8be8 Fix doc.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 105244
diff changeset
65 ;; beginning of buffer; and the spaces at end of buffer are not highlighted
257c9f6d8be8 Fix doc.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 105244
diff changeset
66 ;; while point is at end of buffer.
257c9f6d8be8 Fix doc.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 105244
diff changeset
67 ;;
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
68 ;; 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
69 ;;
1662791e8fd8 Rename blank-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 ;; * 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
71 ;;
1662791e8fd8 Rename blank-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 ;; * 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
73 ;; 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
74 ;; 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
75 ;; `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
76 ;; 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
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 ;; 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
79 ;; 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
80 ;; 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
81 ;; 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
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 ;; 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
84 ;;
1662791e8fd8 Rename blank-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 ;; * 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
86 ;; 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
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 ;; * 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
89 ;; 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
90 ;;
1662791e8fd8 Rename blank-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 ;; 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
92 ;;
106526
9a6c9ef9321f Doc fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 105994
diff changeset
93 ;; (require 'whitespace)
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
94 ;;
1662791e8fd8 Rename blank-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 ;; 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
96 ;; `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
97 ;; `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
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 ;; (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
100 ;; "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
101 ;; (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
102 ;; "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
103 ;;
1662791e8fd8 Rename blank-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 ;; 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
105 ;;
1662791e8fd8 Rename blank-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 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
107 ;; 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
108 ;; (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
109 ;; 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
110 ;; `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
111 ;; `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
112 ;;
1662791e8fd8 Rename blank-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 ;; 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
114 ;; 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
115 ;; (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
116 ;;
1662791e8fd8 Rename blank-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 ;; 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
118 ;; 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
119 ;; (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
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 ;; 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
122 ;; 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
123 ;; (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
124 ;; 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
125 ;;
1662791e8fd8 Rename blank-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 ;; 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
128 ;; ----------------
1662791e8fd8 Rename blank-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 ;; 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
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 ;; * 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
133 ;; + 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
134 ;;
1662791e8fd8 Rename blank-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 ;; 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
136 ;;
1662791e8fd8 Rename blank-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 ;; + 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
138 ;;
1662791e8fd8 Rename blank-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 ;; 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
140 ;;
1662791e8fd8 Rename blank-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 ;; + 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
142 ;;
1662791e8fd8 Rename blank-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 ;; 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
144 ;;
1662791e8fd8 Rename blank-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 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
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 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
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 ;; * 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
150 ;; + 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
151 ;;
1662791e8fd8 Rename blank-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 ;; 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
153 ;;
1662791e8fd8 Rename blank-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 ;; + 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
155 ;;
1662791e8fd8 Rename blank-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 ;; 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
157 ;;
1662791e8fd8 Rename blank-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 ;; + 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
159 ;;
1662791e8fd8 Rename blank-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 ;; 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
161 ;;
1662791e8fd8 Rename blank-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 ;; + 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
163 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
164 ;; 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
165 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
166 ;; 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
167 ;;
96968
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
168 ;; `whitespace-newline-mode'
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
169 ;; Toggle NEWLINE minor mode visualization ("nl" on modeline).
96968
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
170 ;;
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
171 ;; `global-whitespace-newline-mode'
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
172 ;; Toggle NEWLINE global minor mode visualization ("NL" on modeline).
96968
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
173 ;;
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
174 ;; `whitespace-report'
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
175 ;; Report some blank problems in buffer.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
176 ;;
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
177 ;; `whitespace-report-region'
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
178 ;; Report some blank problems in a region.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
179 ;;
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
180 ;; `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
181 ;; 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
182 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
183 ;; `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
184 ;; 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
185 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
186 ;; 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
187 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
188 ;; 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
189 ;; 2. empty lines at end of buffer.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
190 ;; 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
191 ;; 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
192 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
193 ;; 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
194 ;; 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
195 ;; 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
196 ;; `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
197 ;; SPACEs.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
198 ;; If `whitespace-style' includes the value `indentation::tab',
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
199 ;; 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
200 ;; If `whitespace-style' includes the value `indentation::space',
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
201 ;; 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
202 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
203 ;; 4. SPACEs before TAB.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
204 ;; 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
205 ;; 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
206 ;; otherwise, replace TABs by SPACEs.
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
207 ;; 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
208 ;; `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
209 ;; 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
210 ;; `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
211 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
212 ;; 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
213 ;; 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
214 ;; 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
215 ;;
1662791e8fd8 Rename blank-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 ;; 6. 8 or more SPACEs after TAB.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
217 ;; 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
218 ;; 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
219 ;; otherwise, replace TABs by SPACEs.
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
220 ;; 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
221 ;; replace SPACEs by TABs.
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
222 ;; 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
223 ;; `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
224 ;;
1662791e8fd8 Rename blank-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 ;; 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
227 ;; -----
1662791e8fd8 Rename blank-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 ;; 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
230 ;;
1662791e8fd8 Rename blank-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 ;; `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
232 ;; 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
233 ;;
1662791e8fd8 Rename blank-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 ;; `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
235 ;; 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
236 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
237 ;; `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
238 ;; 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
239 ;;
1662791e8fd8 Rename blank-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 ;; 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
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 ;;
1662791e8fd8 Rename blank-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 ;; 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
245 ;; 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
246 ;;
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
247 ;; `whitespace-style' Specify which kind of blank is
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
248 ;; 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
249 ;;
1662791e8fd8 Rename blank-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 ;; `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
251 ;;
1662791e8fd8 Rename blank-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 ;; `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
253 ;;
1662791e8fd8 Rename blank-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 ;; `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
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-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
257 ;; 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
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-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
260 ;; 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
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-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
263 ;;
1662791e8fd8 Rename blank-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 ;; `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
265 ;; 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
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-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
268 ;; 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
269 ;;
1662791e8fd8 Rename blank-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 ;; `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
271 ;; 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
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-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
274 ;; 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
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-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
277 ;;
1662791e8fd8 Rename blank-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 ;; `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
279 ;;
1662791e8fd8 Rename blank-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 ;; `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
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-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
283 ;;
1662791e8fd8 Rename blank-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 ;; `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
285 ;; 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
286 ;;
1662791e8fd8 Rename blank-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 ;; `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
288 ;; 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
289 ;;
1662791e8fd8 Rename blank-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 ;; `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
291 ;; 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
292 ;;
1662791e8fd8 Rename blank-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 ;; `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
294 ;; 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
295 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
296 ;; `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
297 ;; 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
298 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
299 ;; `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
300 ;; 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
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 ;; `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
303 ;; 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
304 ;;
91377
510381911395 Use find-file-hook instead of find-file-hooks.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 88118
diff changeset
305 ;; `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
306 ;; `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
307 ;; 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
308 ;;
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
309 ;; `whitespace-action' Specify which action is taken when a
98454
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
310 ;; buffer is visited or written.
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 ;;
1662791e8fd8 Rename blank-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 ;; 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
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 ;;
97074
8b6a3348313d Doc fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97073
diff changeset
316 ;; Thanks to David Reitter <david.reitter@gmail.com> for suggesting a
8b6a3348313d Doc fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97073
diff changeset
317 ;; `whitespace-newline' initialization with low contrast relative to
8b6a3348313d Doc fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97073
diff changeset
318 ;; the background color.
8b6a3348313d Doc fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97073
diff changeset
319 ;;
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
320 ;; 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
321 ;; `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
322 ;;
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
323 ;; Thanks to Eric Cooper <ecc@cmu.edu> for the suggestion to have hook
98454
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
324 ;; actions when buffer is written as the original whitespace package
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
325 ;; had.
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
326 ;;
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
327 ;; 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
328 ;; 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
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 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
331 ;; * `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
332 ;; * `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
333 ;;
1662791e8fd8 Rename blank-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 ;; 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
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 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
337 ;; 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
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 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
340 ;; 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
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 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
343 ;; 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
344 ;;
1662791e8fd8 Rename blank-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 ;; 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
346 ;; "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
347 ;;
1662791e8fd8 Rename blank-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 ;; Thanks to Yanghui Bian <yanghuibian@gmail.com> for indicating a new
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
349 ;; NEWLINE character mapping.
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
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 ;; 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
352 ;; 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
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 ;; 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
355 ;; 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
356 ;;
1662791e8fd8 Rename blank-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 ;; 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
358 ;; 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
359 ;; 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
360 ;; 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
361 ;; 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
362 ;; 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
363 ;;
1662791e8fd8 Rename blank-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 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
365 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 ;;; 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
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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
370 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
371 ;;;; 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
372
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
373
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
374 ;;; 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
375
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
376
1662791e8fd8 Rename blank-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 (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
378 "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
379 :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
380 :version "23.1"
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
381 :group 'convenience)
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
382
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
383
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
384 (defcustom whitespace-style
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
385 '(face
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
386 tabs spaces trailing lines space-before-tab newline
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
387 indentation empty space-after-tab
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
388 space-mark tab-mark newline-mark)
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
389 "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
390
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
391 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
392
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
393 face enable all visualization via faces (see below).
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
394
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
395 trailing trailing blanks are visualized via faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
396 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
397 is 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
398
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
399 tabs TABs are visualized via faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
400 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
401 is 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
402
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
403 spaces SPACEs and HARD SPACEs are visualized via
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
404 faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
405 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
406 is 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
407
106895
181539c8b6a4 Fix typos in docstrings, error messages, etc.
Juanma Barranquero <lekktu@gmail.com>
parents: 106815
diff changeset
408 lines lines which have columns beyond
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
409 `whitespace-line-column' are highlighted via
106895
181539c8b6a4 Fix typos in docstrings, error messages, etc.
Juanma Barranquero <lekktu@gmail.com>
parents: 106815
diff changeset
410 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
411 Whole line is highlighted.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
412 It has precedence over `lines-tail' (see
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
413 below).
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
414 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
415 is 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
416
106895
181539c8b6a4 Fix typos in docstrings, error messages, etc.
Juanma Barranquero <lekktu@gmail.com>
parents: 106815
diff changeset
417 lines-tail lines which have columns beyond
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
418 `whitespace-line-column' are highlighted via
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
419 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
420 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
421 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
422 It has effect only if `lines' (see above)
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
423 is not present in `whitespace-style'
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
424 and if `face' (see above) is present in
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
425 `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
426
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
427 newline NEWLINEs are visualized via faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
428 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
429 is 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
430
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
431 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
432 are visualized via faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
433 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
434 is 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
435
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
436 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
437 visualized via faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
438 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
439 is present in `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
440
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
441 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
442 faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
443 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
444 is present in `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
445
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
446 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
447 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
448 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
449 line are visualized via faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
450 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
451 is present in `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
452
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
453 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
454 visualized via faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
455 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
456 is present in `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
457
104301
316b10a4c19e * whitespace.el (whitespace-style): Doc fix (Bug#3661).
Chong Yidong <cyd@stupidchicken.com>
parents: 100908
diff changeset
458 space-after-tab::space TABs are visualized when 8 or more
316b10a4c19e * whitespace.el (whitespace-style): Doc fix (Bug#3661).
Chong Yidong <cyd@stupidchicken.com>
parents: 100908
diff changeset
459 SPACEs occur after a TAB, via faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
460 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
461 is present in `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
462
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
463 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
464 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
465 (which see) is non-nil; otherwise,
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
466 the TABs are visualized via faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
467 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
468 is present in `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
469
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
470 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
471 faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
472 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
473 is present in `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
474
104301
316b10a4c19e * whitespace.el (whitespace-style): Doc fix (Bug#3661).
Chong Yidong <cyd@stupidchicken.com>
parents: 100908
diff changeset
475 space-before-tab::space TABs are visualized when SPACEs occur
316b10a4c19e * whitespace.el (whitespace-style): Doc fix (Bug#3661).
Chong Yidong <cyd@stupidchicken.com>
parents: 100908
diff changeset
476 before TAB, via faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
477 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
478 is present in `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
479
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
480 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
481 `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
482 non-nil; otherwise, the TABs are
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
483 visualized via faces.
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
484 It has effect only if `face' (see above)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
485 is present in `whitespace-style'.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
486
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
487 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
488 display table.
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
489
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
490 tab-mark TABs are visualized via display table.
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
491
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
492 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
493
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
494 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
495
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
496 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
497 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
498
106895
181539c8b6a4 Fix typos in docstrings, error messages, etc.
Juanma Barranquero <lekktu@gmail.com>
parents: 106815
diff changeset
499 There is an evaluation order for some values, if they are
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
500 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
501 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
502 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
503 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
504
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
505 * 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
506 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
507 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
508 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
509
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
510 * 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
511 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
512 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
513 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
514
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
515 * 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
516 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
517 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
518 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
519
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
520 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
521 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
522 evaluated instead of indentation::space value.
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
523
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
524 One reason for not visualize spaces via faces (if `face' is not
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
525 included in `whitespace-style') is to use exclusively for
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
526 cleanning up a buffer. See `whitespace-cleanup' and
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
527 `whitespace-cleanup-region' for documentation.
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
528
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
529 See also `whitespace-display-mappings' for documentation."
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
530 :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
531 (choice :tag "Kind of Blank Face"
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
532 (const :tag "(Face) Face visualization"
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
533 face)
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
534 (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
535 trailing)
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
536 (const :tag "(Face) SPACEs and HARD SPACEs"
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
537 spaces)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
538 (const :tag "(Face) TABs" tabs)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
539 (const :tag "(Face) Lines" lines)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
540 (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
541 space-before-tab)
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
542 (const :tag "(Face) NEWLINEs" newline)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
543 (const :tag "(Face) Indentation SPACEs"
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
544 indentation)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
545 (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
546 empty)
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
547 (const :tag "(Face) SPACEs after TAB"
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
548 space-after-tab)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
549 (const :tag "(Mark) SPACEs and HARD SPACEs"
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
550 space-mark)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
551 (const :tag "(Mark) TABs" tab-mark)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
552 (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
553 :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
554
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (defcustom whitespace-space 'whitespace-space
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
557 "Symbol face used to visualize 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
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 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
560 :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
561 :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
562
1662791e8fd8 Rename blank-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 (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
565 '((((class color) (background dark))
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
566 (:background "grey20" :foreground "darkgray"))
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
567 (((class color) (background light))
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
568 (:background "LightYellow" :foreground "lightgray"))
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
569 (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
570 "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
571 :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
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
1662791e8fd8 Rename blank-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 (defcustom whitespace-hspace 'whitespace-hspace
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
575 "Symbol face used to visualize HARD 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
576
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
577 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
578 :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
579 :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
580
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
583 '((((class color) (background dark))
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
584 (:background "grey24" :foreground "darkgray"))
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
585 (((class color) (background light))
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
586 (:background "LemonChiffon3" :foreground "lightgray"))
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
587 (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
588 "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
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-tab 'whitespace-tab
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
593 "Symbol face used to visualize 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
594
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
595 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
596 :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
597 :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
598
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
601 '((((class color) (background dark))
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
602 (:background "grey22" :foreground "darkgray"))
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
603 (((class color) (background light))
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
604 (:background "beige" :foreground "lightgray"))
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
605 (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
606 "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
607 :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
608
1662791e8fd8 Rename blank-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 (defcustom whitespace-newline 'whitespace-newline
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
611 "Symbol face used to visualize NEWLINE char mapping.
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
612
1662791e8fd8 Rename blank-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 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
614
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
615 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
616 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
617 :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
618 :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
619
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
622 '((((class color) (background dark))
97073
7159ef9ad909 whitespace-newline: change initilization to have a low contrast relative to the background color.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 96968
diff changeset
623 (:foreground "darkgray" :bold 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
624 (((class color) (background light))
97073
7159ef9ad909 whitespace-newline: change initilization to have a low contrast relative to the background color.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 96968
diff changeset
625 (:foreground "lightgray" :bold nil))
7159ef9ad909 whitespace-newline: change initilization to have a low contrast relative to the background color.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 96968
diff changeset
626 (t (:underline t :bold 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
627 "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
628
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
629 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
630 :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
631
1662791e8fd8 Rename blank-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 (defcustom whitespace-trailing 'whitespace-trailing
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
634 "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
635
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
636 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
637 :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
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 (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
642 '((((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
643 (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
644 "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
645 :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
646
1662791e8fd8 Rename blank-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 (defcustom whitespace-line 'whitespace-line
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
649 "Symbol face used to visualize \"long\" lines.
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
650
1662791e8fd8 Rename blank-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 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
652
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
653 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
654 :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
655 :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
656
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
659 '((((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
660 (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
661 "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
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 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
664 :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
665
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (defcustom whitespace-space-before-tab 'whitespace-space-before-tab
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
668 "Symbol face used to visualize 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
669
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
670 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
671 :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
672 :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
673
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
675 (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
676 '((((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
677 (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
678 "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
679 :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
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
1662791e8fd8 Rename blank-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 (defcustom whitespace-indentation 'whitespace-indentation
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
683 "Symbol face used to visualize 8 or more SPACEs at beginning 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
684
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
685 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
686 :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
687 :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
688
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
691 '((((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
692 (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
693 "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
694 :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
695
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (defcustom whitespace-empty 'whitespace-empty
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
698 "Symbol face used to visualize 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
699
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
700 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
701 :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
702 :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
703
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
706 '((((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
707 (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
708 "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
709 :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
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
1662791e8fd8 Rename blank-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 (defcustom whitespace-space-after-tab 'whitespace-space-after-tab
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
713 "Symbol face used to visualize 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
714
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
715 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
716 :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
717 :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
718
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
721 '((((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
722 (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
723 "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
724 :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
725
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
728 "\\(\\(\xA0\\|\x8A0\\|\x920\\|\xE20\\|\xF20\\)+\\)"
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
729 "Specify HARD SPACE characters 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
730
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
731 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
732
1662791e8fd8 Rename blank-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 \"\\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
734
1662791e8fd8 Rename blank-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 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
736
1662791e8fd8 Rename blank-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 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
738
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
739 \"\\\\(^\\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
740 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
741 \"\\\\(\\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
742 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
743 \"\\\\(^\\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
744 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
745 \"\\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
746 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
747
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
748 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
749 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
750
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
751 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
752 :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
753 :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
754
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
755
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
756 (defcustom whitespace-space-regexp "\\( +\\)"
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
757 "Specify SPACE characters 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
758
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
759 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
760 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
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 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
763
1662791e8fd8 Rename blank-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 \"\\\\(^ +\\\\)\" 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
765 \"\\\\( +$\\\\)\" 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
766 \"\\\\(^ +\\\\| +$\\\\)\" \
1662791e8fd8 Rename blank-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 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
768 \"\\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
769
1662791e8fd8 Rename blank-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 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
771 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
772
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
773 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
774 :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
775 :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
776
1662791e8fd8 Rename blank-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 (defcustom whitespace-tab-regexp "\\(\t+\\)"
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
779 "Specify TAB characters 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
780
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
781 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
782 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
783
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
784 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
785
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
786 \"\\\\(^\\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
787 \"\\\\(\\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
788 \"\\\\(^\\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
789 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
790 \" \\\\(\\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
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 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
793 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
794
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
795 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
796 :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
797 :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
798
1662791e8fd8 Rename blank-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 (defcustom whitespace-trailing-regexp
94400
049f194820fe whitespace-trailing-regexp option fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94374
diff changeset
801 "\\(\\(\t\\| \\|\xA0\\|\x8A0\\|\x920\\|\xE20\\|\xF20\\)+\\)$"
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
802 "Specify trailing characters 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
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
94440
e227f5ee58db whitespace-trailing-regexp docstring fix.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94431
diff changeset
811 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
812 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
813
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
814 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
815 :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
816 :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
817
1662791e8fd8 Rename blank-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
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
819 (defcustom whitespace-space-before-tab-regexp "\\( +\\)\\(\t+\\)"
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
820 "Specify SPACEs before TAB 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
821
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
822 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
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 \" \" \"\\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
825 \"\\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
826
1662791e8fd8 Rename blank-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 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
828
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
829 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
830 `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
831 :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
832 :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
833
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
836 '("^\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
837 . "^ *\\(\t+\\)[^\n]")
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
838 "Specify regexp for 8 or more SPACEs at beginning 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
839
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
840 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
841 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
842
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
843 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
844
1662791e8fd8 Rename blank-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 \" \" \"\\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
846 \"\\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
847
1662791e8fd8 Rename blank-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 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
849
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
850 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
851 `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
852 :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
853 (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
854 :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
855
1662791e8fd8 Rename blank-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
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
857 (defcustom whitespace-empty-at-bob-regexp "^\\(\\([ \t]*\n\\)+\\)"
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
858 "Specify regexp for empty lines at beginning 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
859
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
860 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
861
1662791e8fd8 Rename blank-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 \" \" \"\\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
863 \"\\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
864
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
865 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
866
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
867 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
868 :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
869 :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
870
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
871
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
872 (defcustom whitespace-empty-at-eob-regexp "^\\([ \t\n]+\\)"
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
873 "Specify regexp for empty lines at 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
874
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
875 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
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 \" \" \"\\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
878 \"\\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
879
1662791e8fd8 Rename blank-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 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
881
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
882 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
883 :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
884 :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
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
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
887 (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
888 '("\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
889 . "\\(\t+\\) +")
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
890 "Specify regexp for 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
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 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
893 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
894
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
895 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
896
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
897 \" \" \"\\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
898 \"\\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
899
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
900 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
901
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
902 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
903 `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
904 :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
905 :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
906
1662791e8fd8 Rename blank-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 (defcustom whitespace-line-column 80
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
909 "Specify column beyond which the line is highlighted.
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
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
911 It must be an integer or nil. If nil, the `fill-column' variable value is
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
912 used.
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
913
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
914 Used when `whitespace-style' includes `lines' or `lines-tail'."
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
915 :type '(choice :tag "Line Length Limit"
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
916 (integer :tag "Line Length")
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
917 (const :tag "Use fill-column" 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
918 :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
919
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 ;; 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
922 (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
923 '(
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
924 (space-mark ?\ [?\u00B7] [?.]) ; space - centered dot
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
925 (space-mark ?\xA0 [?\u00A4] [?_]) ; hard space - currency
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
926 (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
927 (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
928 (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
929 (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
930 ;; 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
931 (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
932 ;; (newline-mark ?\n [?\u21B5 ?\n] [?$ ?\n]) ; eol - downwards arrow
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
933 ;; (newline-mark ?\n [?\u00B6 ?\n] [?$ ?\n]) ; eol - pilcrow
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
934 ;; (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
935 ;; (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
936 ;; (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
937 ;;
1662791e8fd8 Rename blank-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 ;; 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
939 ;; 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
940 ;; 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
941 ;; 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
942 ;; If this is a problem for you, please, comment the line below.
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
943 (tab-mark ?\t [?\u00BB ?\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
944 )
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
945 "Specify an alist of mappings for displaying 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
946
1662791e8fd8 Rename blank-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 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
948
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
949 (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
950
1662791e8fd8 Rename blank-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 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
952
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
953 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
954 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
955
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
956 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
957
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
958 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
959
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
960 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
961
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
962 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
963
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
964 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
965 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
966 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
967 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
968
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
969 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
970 `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
971
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
972 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
973 `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
974 :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
975 (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
976 (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
977 (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
978 (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
979 (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
980 (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
981 (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
982 (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
983 (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
984 :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
985 (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
986 :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
987
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
988
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
989 (defcustom whitespace-global-modes t
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
990 "Modes for which global `whitespace-mode' is automagically 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
991
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
992 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
993 `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
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 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
996 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
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 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
999 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
1000
1662791e8fd8 Rename blank-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 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
1002 `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
1003 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
1004
1662791e8fd8 Rename blank-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 (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
1006
1662791e8fd8 Rename blank-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 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
1008 C++ modes only."
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1009 :type '(choice :tag "Global Modes"
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1010 (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
1011 (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
1012 (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
1013 :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
1014 (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
1015 (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
1016 (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
1017 :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
1018
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1019
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1020 (defcustom whitespace-action nil
100171
d42aff5ca541 * align.el:
Lute Kamstra <lute@gnu.org>
parents: 98826
diff changeset
1021 "Specify which action is taken when a buffer is visited or written.
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1022
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1023 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
1024
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1025 nil no action is taken.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1026
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1027 cleanup cleanup any bogus whitespace always when local
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1028 whitespace is turned on.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1029 See `whitespace-cleanup' and
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1030 `whitespace-cleanup-region'.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1031
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1032 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
1033 when local whitespace is turned on.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1034
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1035 auto-cleanup cleanup any bogus whitespace when buffer is
98454
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
1036 written.
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1037 See `whitespace-cleanup' and
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1038 `whitespace-cleanup-region'.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1039
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1040 abort-on-bogus abort if there is any bogus whitespace and the
98454
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
1041 buffer is written.
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1042
98454
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
1043 warn-if-read-only give a warning if `cleanup' or `auto-cleanup'
98008
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1044 is included in `whitespace-action' and the
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1045 buffer is read-only.
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1046
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1047 Any other value is treated as nil."
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1048 :type '(choice :tag "Actions"
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1049 (const :tag "None" nil)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1050 (repeat :tag "Action List"
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1051 (choice :tag "Action"
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1052 (const :tag "Cleanup When On" cleanup)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1053 (const :tag "Report On Bogus" report-on-bogus)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1054 (const :tag "Auto Cleanup" auto-cleanup)
98008
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1055 (const :tag "Abort On Bogus" abort-on-bogus)
98454
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
1056 (const :tag "Warn If Read-Only" warn-if-read-only))))
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1057 :group 'whitespace)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1058
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
1059
1662791e8fd8 Rename blank-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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-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 ;;;; 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
1062
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 ;;;###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
1065 (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
1066 "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
1067
1662791e8fd8 Rename blank-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 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
1069 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
1070 otherwise, turn off visualization.
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1071
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1072 See also `whitespace-style', `whitespace-newline' and
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1073 `whitespace-display-mappings'."
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
1074 :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
1075 :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
1076 :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
1077 :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
1078 (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
1079 (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
1080 (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
1081 (whitespace-mode ; whitespace-mode on
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1082 (whitespace-turn-on)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1083 (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
1084 (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
1085 (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
1086
96968
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1087
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1088 ;;;###autoload
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1089 (define-minor-mode whitespace-newline-mode
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1090 "Toggle NEWLINE minor mode visualization (\"nl\" on modeline).
96968
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1091
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1092 If ARG is null, toggle NEWLINE visualization.
96968
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1093 If ARG is a number greater than zero, turn on visualization;
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1094 otherwise, turn off visualization.
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1095
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1096 Use `whitespace-newline-mode' only for NEWLINE visualization
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1097 exclusively. For other visualizations, including NEWLINE
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1098 visualization together with (HARD) SPACEs and/or TABs, please,
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1099 use `whitespace-mode'.
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1100
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1101 See also `whitespace-newline' and `whitespace-display-mappings'."
96968
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1102 :lighter " nl"
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1103 :init-value nil
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1104 :global nil
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1105 :group 'whitespace
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1106 (let ((whitespace-style '(newline-mark newline)))
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1107 (whitespace-mode whitespace-newline-mode)
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1108 ;; sync states (running a batch job)
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1109 (setq whitespace-newline-mode whitespace-mode)))
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1110
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
1111
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1112 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1113 ;;;; 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
1114
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1115
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1116 ;;;###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
1117 (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
1118 "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
1119
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1120 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
1121 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
1122 otherwise, turn off visualization.
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1123
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1124 See also `whitespace-style', `whitespace-newline' and
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1125 `whitespace-display-mappings'."
88113
c80332ad12c1 (global-whitespace-mode): Fix modeline lighter.
Juanma Barranquero <lekktu@gmail.com>
parents: 88100
diff changeset
1126 :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
1127 :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
1128 :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
1129 :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
1130 (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
1131 (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
1132 (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
1133 (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
1134 (save-excursion
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1135 (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
1136 (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
1137 (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
1138 (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
1139 (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
1140 (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
1141 (save-excursion
91377
510381911395 Use find-file-hook instead of find-file-hooks.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 88118
diff changeset
1142 (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
1143 (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
1144 (set-buffer buffer)
91471
13eacee3408e (global-whitespace-mode): Revert last change.
Juanma Barranquero <lekktu@gmail.com>
parents: 91432
diff changeset
1145 (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
1146 (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
1147
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1148
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1149 (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
1150 (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
1151 ((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
1152 ((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
1153 (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
1154 (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
1155 (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
1156 (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
1157 (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
1158 ;; 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
1159 (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
1160 ;; ...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
1161 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
1162 ;; ...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
1163 (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
1164 ;; ...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
1165 (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
1166 ;; 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
1167 (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
1168 ;; 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
1169 (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
1170
96968
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1171
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1172 ;;;###autoload
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1173 (define-minor-mode global-whitespace-newline-mode
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1174 "Toggle NEWLINE global minor mode visualization (\"NL\" on modeline).
96968
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1175
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1176 If ARG is null, toggle NEWLINE visualization.
96968
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1177 If ARG is a number greater than zero, turn on visualization;
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1178 otherwise, turn off visualization.
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1179
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1180 Use `global-whitespace-newline-mode' only for NEWLINE
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1181 visualization exclusively. For other visualizations, including
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1182 NEWLINE visualization together with (HARD) SPACEs and/or TABs,
106895
181539c8b6a4 Fix typos in docstrings, error messages, etc.
Juanma Barranquero <lekktu@gmail.com>
parents: 106815
diff changeset
1183 please use `global-whitespace-mode'.
97311
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1184
2be7f5365285 Improve docstring.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97074
diff changeset
1185 See also `whitespace-newline' and `whitespace-display-mappings'."
96968
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1186 :lighter " NL"
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1187 :init-value nil
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1188 :global t
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1189 :group 'whitespace
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1190 (let ((whitespace-style '(newline-mark newline)))
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1191 (global-whitespace-mode global-whitespace-newline-mode)
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1192 ;; sync states (running a batch job)
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1193 (setq global-whitespace-newline-mode global-whitespace-mode)))
df4f1b00491d New newline minor mode visualization.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94678
diff changeset
1194
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
1195
1662791e8fd8 Rename blank-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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-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 ;;;; 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
1198
1662791e8fd8 Rename blank-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
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1200 (defconst whitespace-style-value-list
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1201 '(face
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1202 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
1203 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
1204 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
1205 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
1206 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
1207 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
1208 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
1209 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
1210 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
1211 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
1212 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
1213 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
1214 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
1215 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
1216 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
1217 space-before-tab::space
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1218 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
1219 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
1220 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
1221 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
1222 )
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1223 "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
1224
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (defconst whitespace-toggle-option-alist
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1227 '((?f . face)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1228 (?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
1229 (?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
1230 (?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
1231 (?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
1232 (?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
1233 (?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
1234 (?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
1235 (?\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
1236 (?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
1237 (?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
1238 (?\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
1239 (?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
1240 (?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
1241 (?\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
1242 (?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
1243 (?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
1244 (?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
1245 (?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
1246 (?N . newline-mark)
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1247 (?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
1248 )
1662791e8fd8 Rename blank-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 "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
1250
1662791e8fd8 Rename blank-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 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
1252
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1253 (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
1254
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1255 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
1256
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1257 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
1258
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1259 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
1260 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
1261
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1262
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1263 (defvar whitespace-active-style nil
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1264 "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
1265
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1266 (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
1267 "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
1268
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1269 (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
1270 "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
1271
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
1272 (defvar whitespace-point (point)
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
1273 "Used to save locally current point value.
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
1274 Used by `whitespace-trailing-regexp' function (which see).")
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
1275
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
1276 (defvar whitespace-font-lock-refontify nil
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
1277 "Used to save locally the font-lock refontify state.
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
1278 Used by `whitespace-post-command-hook' function (which see).")
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
1279
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1280 (defvar whitespace-bob-marker nil
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1281 "Used to save locally the bob marker value.
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1282 Used by `whitespace-post-command-hook' function (which see).")
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1283
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1284 (defvar whitespace-eob-marker nil
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1285 "Used to save locally the eob marker value.
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1286 Used by `whitespace-post-command-hook' function (which see).")
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1287
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1288 (defvar whitespace-buffer-changed nil
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1289 "Used to indicate locally if buffer changed.
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1290 Used by `whitespace-post-command-hook' and `whitespace-buffer-changed'
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1291 functions (which see).")
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1292
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
1293
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1294 ;;;###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
1295 (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
1296 "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
1297
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1298 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
1299 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
1300
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1301 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
1302 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
1303
1662791e8fd8 Rename blank-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 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
1305
1662791e8fd8 Rename blank-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 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
1307 (VIA FACES)
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1308 f toggle face 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
1309 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
1310 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
1311 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
1312 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
1313 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
1314 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
1315 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
1316 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
1317 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
1318 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
1319 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
1320 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
1321 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
1322 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
1323 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
1324 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
1325
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1326 (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
1327 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
1328 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
1329 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
1330
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1331 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
1332 ? 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
1333
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1334 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
1335 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
1336
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1337 face toggle face 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
1338 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
1339 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
1340 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
1341 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
1342 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
1343 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
1344 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
1345 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
1346 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
1347 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
1348 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
1349 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
1350 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
1351 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
1352 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
1353 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
1354
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1355 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
1356 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
1357 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
1358
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1359 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
1360
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1361 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
1362 (interactive (whitespace-interactive-char t))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1363 (let ((whitespace-style
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1364 (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
1365 (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
1366 (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
1367
1662791e8fd8 Rename blank-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
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1369 (defvar whitespace-toggle-style nil
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1370 "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
1371
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1372
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1373 ;;;###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
1374 (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
1375 "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
1376
1662791e8fd8 Rename blank-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 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
1378 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
1379
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1380 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
1381 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
1382
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
1383 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
1384
1662791e8fd8 Rename blank-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 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
1386 (VIA FACES)
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1387 f toggle face 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
1388 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
1389 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
1390 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
1391 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
1392 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
1393 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
1394 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
1395 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
1396 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
1397 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
1398 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
1399 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
1400 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
1401 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
1402 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
1403 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
1404
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1405 (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
1406 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
1407 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
1408 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
1409
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1410 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
1411 ? 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
1412
1662791e8fd8 Rename blank-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 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
1414 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
1415
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1416 face toggle face 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
1417 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
1418 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
1419 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
1420 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
1421 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
1422 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
1423 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
1424 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
1425 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
1426 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
1427 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
1428 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
1429 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
1430 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
1431 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
1432 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
1433
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 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
1435 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
1436 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
1437
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1438 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
1439
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1440 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
1441 (interactive (whitespace-interactive-char nil))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1442 (let ((whitespace-style
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1443 (whitespace-toggle-list nil arg whitespace-toggle-style)))
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1444 (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
1445 (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
1446 (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
1447
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1448
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1449 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1450 ;;;; 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
1451
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1452
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1453 ;;;###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
1454 (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
1455 "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
1456
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1457 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
1458 mode when the mark is active, it applies to the region. It also
98826
6bec458afb55 Fix typo.
Chong Yidong <cyd@stupidchicken.com>
parents: 98454
diff changeset
1459 applies to the region when it is not in transient 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
1460 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
1461 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
1462
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1463 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
1464
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
1465 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
1466
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1467 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
1468 2. empty lines at end of buffer.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1469 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
1470 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
1471
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1472 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
1473 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
1474 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
1475 `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
1476 SPACEs.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1477 If `whitespace-style' includes the value `indentation::tab',
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1478 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
1479 If `whitespace-style' includes the value `indentation::space',
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1480 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
1481
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1482 4. SPACEs before TAB.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1483 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
1484 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
1485 otherwise, replace TABs by SPACEs.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1486 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
1487 `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
1488 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
1489 `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
1490
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1491 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
1492 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
1493 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
1494
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1495 6. 8 or more SPACEs after TAB.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1496 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
1497 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
1498 otherwise, replace TABs by SPACEs.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1499 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
1500 `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
1501 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
1502 `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
1503
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1504 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
1505 documentation."
98008
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1506 (interactive "@")
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1507 (cond
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1508 ;; read-only buffer
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1509 (buffer-read-only
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1510 (whitespace-warn-read-only "cleanup"))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1511 ;; region active
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1512 ((and (or transient-mark-mode
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1513 current-prefix-arg)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1514 mark-active)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1515 ;; PROBLEMs 1 and 2 are not handled in region
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1516 ;; PROBLEM 3: 8 or more SPACEs at bol
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1517 ;; PROBLEM 4: SPACEs before TAB
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1518 ;; PROBLEM 5: SPACEs or TABs at eol
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1519 ;; PROBLEM 6: 8 or more SPACEs after TAB
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1520 (whitespace-cleanup-region (region-beginning) (region-end)))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1521 ;; whole buffer
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1522 (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
1523 (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
1524 (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
1525 ;; 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
1526 ;; 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
1527 ;; 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
1528 (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
1529 (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
1530 (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
1531 (when (re-search-forward
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1532 (concat "\\`" whitespace-empty-at-bob-regexp) nil 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
1533 (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
1534 (when (re-search-forward
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
1535 (concat whitespace-empty-at-eob-regexp "\\'") nil 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
1536 (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
1537 ;; 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
1538 ;; 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
1539 ;; 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
1540 ;; PROBLEM 6: 8 or more SPACEs after TAB
98008
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1541 (whitespace-cleanup-region (point-min) (point-max)))))
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
1542
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1543
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1544 ;;;###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
1545 (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
1546 "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
1547
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
1548 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
1549
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1550 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
1551 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
1552 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
1553 `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
1554 SPACEs.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1555 If `whitespace-style' includes the value `indentation::tab',
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1556 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
1557 If `whitespace-style' includes the value `indentation::space',
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1558 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
1559
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1560 2. SPACEs before TAB.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1561 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
1562 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
1563 otherwise, replace TABs by SPACEs.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1564 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
1565 `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
1566 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
1567 `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
1568
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1569 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
1570 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
1571 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
1572
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1573 4. 8 or more SPACEs after TAB.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1574 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
1575 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
1576 otherwise, replace TABs by SPACEs.
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1577 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
1578 `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
1579 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
1580 `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
1581
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1582 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
1583 documentation."
98008
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1584 (interactive "@r")
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1585 (if buffer-read-only
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1586 ;; read-only buffer
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1587 (whitespace-warn-read-only "cleanup region")
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1588 ;; non-read-only buffer
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1589 (let ((rstart (min start end))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1590 (rend (copy-marker (max start end)))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1591 (indent-tabs-mode whitespace-indent-tabs-mode)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1592 (tab-width whitespace-tab-width)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1593 overwrite-mode ; enforce no overwrite
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1594 tmp)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1595 (save-excursion
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1596 (save-match-data
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1597 ;; PROBLEM 1: 8 or more SPACEs at bol
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1598 (cond
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1599 ;; ACTION: replace 8 or more SPACEs at bol by TABs, if
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1600 ;; `indent-tabs-mode' is non-nil; otherwise, replace TABs
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1601 ;; by SPACEs.
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1602 ((memq 'indentation whitespace-style)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1603 (let ((regexp (whitespace-indentation-regexp)))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1604 (goto-char rstart)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1605 (while (re-search-forward regexp rend t)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1606 (setq tmp (current-indentation))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1607 (goto-char (match-beginning 0))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1608 (delete-horizontal-space)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1609 (unless (eolp)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1610 (indent-to tmp)))))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1611 ;; ACTION: replace 8 or more SPACEs at bol by TABs.
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1612 ((memq 'indentation::tab whitespace-style)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1613 (whitespace-replace-action
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1614 'tabify rstart rend
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1615 (whitespace-indentation-regexp 'tab) 0))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1616 ;; ACTION: replace TABs by SPACEs.
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1617 ((memq 'indentation::space whitespace-style)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1618 (whitespace-replace-action
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1619 'untabify rstart rend
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1620 (whitespace-indentation-regexp 'space) 0)))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1621 ;; PROBLEM 3: SPACEs or TABs at eol
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1622 ;; ACTION: remove all SPACEs or TABs at eol
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1623 (when (memq 'trailing whitespace-style)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1624 (whitespace-replace-action
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1625 'delete-region rstart rend
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1626 whitespace-trailing-regexp 1))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1627 ;; PROBLEM 4: 8 or more SPACEs after TAB
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1628 (cond
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1629 ;; ACTION: replace 8 or more SPACEs by TABs, if
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1630 ;; `indent-tabs-mode' is non-nil; otherwise, replace TABs
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1631 ;; by SPACEs.
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1632 ((memq 'space-after-tab whitespace-style)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1633 (whitespace-replace-action
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1634 (if whitespace-indent-tabs-mode 'tabify 'untabify)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1635 rstart rend (whitespace-space-after-tab-regexp) 1))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1636 ;; ACTION: replace 8 or more SPACEs by TABs.
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1637 ((memq 'space-after-tab::tab whitespace-style)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1638 (whitespace-replace-action
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1639 'tabify rstart rend
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1640 (whitespace-space-after-tab-regexp 'tab) 1))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1641 ;; ACTION: replace TABs by SPACEs.
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1642 ((memq 'space-after-tab::space whitespace-style)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1643 (whitespace-replace-action
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1644 'untabify rstart rend
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1645 (whitespace-space-after-tab-regexp 'space) 1)))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1646 ;; PROBLEM 2: SPACEs before TAB
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1647 (cond
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1648 ;; ACTION: replace SPACEs before TAB by TABs, if
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1649 ;; `indent-tabs-mode' is non-nil; otherwise, replace TABs
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1650 ;; by SPACEs.
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1651 ((memq 'space-before-tab whitespace-style)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1652 (whitespace-replace-action
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1653 (if whitespace-indent-tabs-mode 'tabify 'untabify)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1654 rstart rend whitespace-space-before-tab-regexp
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1655 (if whitespace-indent-tabs-mode 1 2)))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1656 ;; ACTION: replace SPACEs before TAB by TABs.
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1657 ((memq 'space-before-tab::tab whitespace-style)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1658 (whitespace-replace-action
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1659 'tabify rstart rend
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1660 whitespace-space-before-tab-regexp 1))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1661 ;; ACTION: replace TABs by SPACEs.
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1662 ((memq 'space-before-tab::space whitespace-style)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1663 (whitespace-replace-action
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1664 'untabify rstart rend
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1665 whitespace-space-before-tab-regexp 2)))))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
1666 (set-marker rend nil)))) ; point marker to nowhere
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
1662791e8fd8 Rename blank-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
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1669 (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
1670 "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
1671
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1672 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
1673
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1674 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
1675 (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
1676 (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
1677 (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
1678 (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
1679
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1680
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1681 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1682 ;;;; User command - report
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1683
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1684
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1685 (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
1686 "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
1687 (cond
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1688 ((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
1689 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
1690 (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
1691 ((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
1692 (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
1693 (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
1694
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1695
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1696 (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
1697 "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
1698 (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
1699
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1700
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1701 (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
1702 "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
1703 (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
1704
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1705
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1706 (defconst whitespace-report-list
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1707 (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
1708 (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
1709 (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
1710 (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
1711 (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
1712 (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
1713 (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
1714 (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
1715 (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
1716 (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
1717 (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
1718 (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
1719 (cons 'space-after-tab::space nil)
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1720 )
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1721 "List of whitespace bogus symbol and corresponding regexp.")
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1722
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1723
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1724 (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
1725 '( ;; `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
1726 "\
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1727 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
1728
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1729 Current Setting Whitespace Problem
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1730
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1731 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
1732 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
1733 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
1734 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
1735 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
1736 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
1737 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
1738 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
1739 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
1740 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
1741 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
1742 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
1743
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1744 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
1745 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
1746 . ;; `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
1747 "\
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 Report
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1749
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1750 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
1751
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1752 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
1753 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
1754 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
1755 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
1756 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
1757 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
1758 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
1759 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
1760 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
1761 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
1762 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
1763 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
1764
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1765 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
1766 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
1767 "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
1768
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1769 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
1770 `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
1771 `indent-tabs-mode' is nil.")
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1772
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1773
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1774 (defconst whitespace-report-buffer-name "*Whitespace Report*"
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1775 "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
1776
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1777
1662791e8fd8 Rename blank-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 ;;;###autoload
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1779 (defun whitespace-report (&optional force report-if-bogus)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1780 "Report some whitespace problems in buffer.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1781
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1782 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
1783 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
1784
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1785 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
1786 before calling `whitespace-report' interactively, it forces
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1787 `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
1788
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1789 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
1790 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
1791 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
1792 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
1793 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
1794
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1795 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
1796 whitespace problems in buffer.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1797
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1798 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
1799
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1800 * 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
1801 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
1802 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
1803 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
1804 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
1805 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
1806 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
1807
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1808 * 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
1809 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
1810 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
1811 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
1812 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
1813 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
1814 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
1815
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1816 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
1817 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
1818 cleaning up these problems."
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1819 (interactive (list current-prefix-arg))
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1820 (whitespace-report-region (point-min) (point-max)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1821 force report-if-bogus))
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1822
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1823
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1824 ;;;###autoload
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1825 (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
1826 "Report some whitespace problems in a region.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1827
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1828 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
1829 non-nil.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
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 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
1832 before calling `whitespace-report-region' interactively, it
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1833 forces `whitespace-style' to have:
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1834
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1835 empty
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1836 indentation
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1837 space-before-tab
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1838 trailing
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1839 space-after-tab
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1840
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1841 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
1842 whitespace problems in buffer.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1843
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1844 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
1845
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1846 * If `indent-tabs-mode' is non-nil:
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1847 empty 1. empty lines at beginning of buffer.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1848 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
1849 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
1850 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
1851 space-before-tab 5. SPACEs before TAB.
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1852 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
1853
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1854 * 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
1855 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
1856 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
1857 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
1858 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
1859 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
1860 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
1861
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1862 See `whitespace-style' for documentation.
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1863 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
1864 cleaning up these problems."
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1865 (interactive "r")
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1866 (setq force (or current-prefix-arg force))
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1867 (save-excursion
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1868 (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
1869 (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
1870 (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
1871 (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
1872 (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
1873 (mapcar
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1874 #'(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
1875 (when force
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1876 (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
1877 (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
1878 (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
1879 (cond
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1880 ((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
1881 (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
1882 ((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
1883 (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
1884 ((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
1885 (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
1886 ((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
1887 (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
1888 ((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
1889 (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
1890 ((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
1891 (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
1892 (t
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1893 (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
1894 (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
1895 (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
1896 whitespace-report-list)))
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1897 (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
1898 (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
1899 ;; `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
1900 ;; `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
1901 (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
1902 (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
1903 (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
1904 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
1905 (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
1906 (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
1907 (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
1908 (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
1909 (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
1910 (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
1911 (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
1912 (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
1913 (whitespace-mark-x
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1914 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
1915 (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
1916 (setq bogus-list (cdr bogus-list)))
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1917 (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
1918 (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
1919 (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
1920 (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
1921 (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
1922 (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
1923 " 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
1924 " 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
1925 " 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
1926 (whitespace-display-window (current-buffer)))))
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1927 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
1928
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1929
1662791e8fd8 Rename blank-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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-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 ;;;; 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
1932
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
1935 "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
1936
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1937 (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
1938 "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
1939
1662791e8fd8 Rename blank-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 (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
1941 "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
1942
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
1945 "\
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1946 Whitespace Toggle Options | scroll up : SPC or > |
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1947 | scroll down: M-SPC or < |
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1948 FACES \\__________________________/
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
1949 [] f - toggle face 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
1950 [] 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
1951 [] 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
1952 [] 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
1953 [] 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
1954 [] 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
1955 [] 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
1956 [] 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
1957 [] 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
1958 [] 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
1959 [] 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
1960 [] 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
1961 [] 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
1962 [] 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
1963 [] 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
1964 [] 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
1965 [] 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
1966
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1967 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
1968 [] 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
1969 [] 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
1970 [] 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
1971
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
1972 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
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 ? - 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
1975 "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
1976
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1977
1662791e8fd8 Rename blank-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 (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
1979 "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
1980
1662791e8fd8 Rename blank-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
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1982 (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
1983 "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
1984 (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
1985 (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
1986 (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
1987
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
1988
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1989 (defun whitespace-mark-x (nchars condition)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1990 "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
1991 (forward-char nchars)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1992 (insert (if condition "X" " ")))
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1993
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
1994
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
1995 (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
1996 "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
1997 (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
1998 (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
1999 (dolist (sym the-list)
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2000 (if (eq sym 'help-newline)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2001 (forward-line 2)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2002 (forward-line 1)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2003 (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
2004
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2005
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2006 (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
2007 "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
2008 (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
2009 (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
2010 (let ((buffer (get-buffer-create whitespace-help-buffer-name)))
105994
009383a57ce8 * x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105756
diff changeset
2011 (with-current-buffer 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
2012 (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
2013 (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
2014 (whitespace-insert-option-mark
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2015 whitespace-style-value-list style)
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2016 (whitespace-display-window buffer)))))
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2017
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2018
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2019 (defun whitespace-display-window (buffer)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2020 "Display BUFFER in a new window."
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2021 (goto-char (point-min))
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2022 (set-buffer-modified-p nil)
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2023 (when (< (window-height) (* 2 window-min-height))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2024 (kill-buffer buffer)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2025 (error "Window 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
2026 can't split window to display whitespace toggle options"))
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2027 (let ((win (split-window)))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2028 (set-window-buffer win buffer)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2029 (shrink-window-if-larger-than-buffer win)))
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
2030
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2031
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2032 (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
2033 "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
2034 (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
2035 (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
2036 (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
2037 (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
2038
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2039
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2040 (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
2041 "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
2042 (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
2043
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2044
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2045 (defun whitespace-help-scroll (&optional up)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2046 "Scroll help window, if it exists.
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2047
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2048 If UP is non-nil, scroll up; otherwise, scroll down."
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2049 (condition-case data-help
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2050 (let ((buffer (get-buffer whitespace-help-buffer-name)))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2051 (if buffer
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2052 (with-selected-window (get-buffer-window buffer)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2053 (if up
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2054 (scroll-up 3)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2055 (scroll-down 3)))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2056 (ding)))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2057 ;; handler
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2058 ((error)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2059 ;; just ignore error
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2060 )))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2061
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2062
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
2063 (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
2064 "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
2065
1662791e8fd8 Rename blank-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 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
2067 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
2068
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
2069 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
2070
1662791e8fd8 Rename blank-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 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
2072 (VIA FACES)
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2073 f toggle face 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
2074 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
2075 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
2076 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
2077 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
2078 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
2079 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
2080 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
2081 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
2082 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
2083 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
2084 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
2085 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
2086 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
2087 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
2088 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
2089 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
2090
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2091 (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
2092 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
2093 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
2094 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
2095
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2096 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
2097 ? 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
2098
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2099 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
2100 (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
2101 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
2102 global-whitespace-mode)))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2103 (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
2104 (local-p whitespace-active-style)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2105 (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
2106 (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
2107 (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
2108 (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
2109 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
2110 ;; 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
2111 (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
2112 (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
2113 (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
2114 (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
2115 ;; 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
2116 (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
2117 (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
2118 (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
2119 (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
2120 (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
2121 (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
2122 ;; while body
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2123 (cond
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2124 ((eq ch ?\?) (whitespace-help-on style))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2125 ((eq ch ?\ ) (whitespace-help-scroll t))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2126 ((eq ch ?\M- ) (whitespace-help-scroll))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2127 ((eq ch ?>) (whitespace-help-scroll t))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2128 ((eq ch ?<) (whitespace-help-scroll))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2129 (t (ding))))
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
2130 (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
2131 (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
2132 ;; 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
2133 ((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
2134 (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
2135 (error (error-message-string data)))))
106895
181539c8b6a4 Fix typos in docstrings, error messages, etc.
Juanma Barranquero <lekktu@gmail.com>
parents: 106815
diff changeset
2136 (list sym))) ; return the appropriate symbol
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
2137
1662791e8fd8 Rename blank-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
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2139 (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
2140 "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
2141
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2142 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
2143 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
2144
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2145 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
2146
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2147 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
2148 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
2149 (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
2150 (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
2151 (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
2152 (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
2153 (cond
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2154 ;; ignore help value
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2155 ((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
2156 ;; restore default values
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2157 ((eq sym 'whitespace-style)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2158 (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
2159 ;; toggle valid values
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2160 ((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
2161 (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
2162 (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
2163 (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
2164 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
2165
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2166
94226
8191f88f6fb9 (whitespace-display-table, whitespace-display-table-was-local):
Glenn Morris <rgm@gnu.org>
parents: 94142
diff changeset
2167 (defvar whitespace-display-table nil
8191f88f6fb9 (whitespace-display-table, whitespace-display-table-was-local):
Glenn Morris <rgm@gnu.org>
parents: 94142
diff changeset
2168 "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
2169
8191f88f6fb9 (whitespace-display-table, whitespace-display-table-was-local):
Glenn Morris <rgm@gnu.org>
parents: 94142
diff changeset
2170 (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
2171 "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
2172
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2173
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
2174 (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
2175 "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
2176 ;; prepare local hooks
98454
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
2177 (add-hook 'write-file-functions 'whitespace-write-file-hook nil 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
2178 ;; 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
2179 (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
2180 (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
2181 (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
2182 (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
2183 (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
2184 (set (make-local-variable 'whitespace-active-style)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2185 (if (listp whitespace-style)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2186 whitespace-style
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2187 (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
2188 (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
2189 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
2190 (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
2191 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
2192 ;; turn on whitespace
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2193 (when whitespace-active-style
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2194 (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
2195 (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
2196
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2197
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2198 (defun whitespace-turn-off ()
88118
959dc75df82e (whitespace): Set :version tag to 23.1.
Juanma Barranquero <lekktu@gmail.com>
parents: 88115
diff changeset
2199 "Turn off whitespace visualization."
98454
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
2200 (remove-hook 'write-file-functions 'whitespace-write-file-hook t)
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2201 (when whitespace-active-style
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2202 (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
2203 (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
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
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2206 (defun whitespace-style-face-p ()
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2207 "Return t if there is some visualization via face."
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2208 (and (memq 'face whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2209 (or (memq 'tabs whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2210 (memq 'spaces whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2211 (memq 'trailing whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2212 (memq 'lines whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2213 (memq 'lines-tail whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2214 (memq 'newline whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2215 (memq 'empty whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2216 (memq 'indentation whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2217 (memq 'indentation::tab whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2218 (memq 'indentation::space whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2219 (memq 'space-after-tab whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2220 (memq 'space-after-tab::tab whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2221 (memq 'space-after-tab::space whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2222 (memq 'space-before-tab whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2223 (memq 'space-before-tab::tab whitespace-active-style)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2224 (memq 'space-before-tab::space whitespace-active-style))))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2225
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2226
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
2227 (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
2228 "Turn on color visualization."
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2229 (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
2230 (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
2231 (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
2232 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
2233 (copy-sequence font-lock-keywords)))
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2234 ;; save current point and refontify when necessary
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2235 (set (make-local-variable 'whitespace-point)
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2236 (point))
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2237 (set (make-local-variable 'whitespace-font-lock-refontify)
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2238 0)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2239 (set (make-local-variable 'whitespace-bob-marker)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2240 (point-min-marker))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2241 (set (make-local-variable 'whitespace-eob-marker)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2242 (point-max-marker))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2243 (set (make-local-variable 'whitespace-buffer-changed)
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2244 nil)
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2245 (add-hook 'post-command-hook #'whitespace-post-command-hook nil t)
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2246 (add-hook 'before-change-functions #'whitespace-buffer-changed nil 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
2247 ;; 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
2248 (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
2249 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
2250 (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
2251 ;; add whitespace-mode color into font lock
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2252 (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
2253 (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
2254 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
2255 (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
2256 ;; Show SPACEs
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2257 (list whitespace-space-regexp 1 whitespace-space 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
2258 ;; 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
2259 (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
2260 t))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2261 (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
2262 (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
2263 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
2264 (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
2265 ;; Show TABs
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2266 (list whitespace-tab-regexp 1 whitespace-tab 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
2267 t))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2268 (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
2269 (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
2270 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
2271 (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
2272 ;; Show trailing blanks
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2273 (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
2274 t))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2275 (when (or (memq 'lines whitespace-active-style)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2276 (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
2277 (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
2278 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
2279 (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
2280 ;; 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
2281 (list
110234
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2282 (let ((line-column (or whitespace-line-column fill-column)))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2283 (format
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2284 "^\\([^\t\n]\\{%s\\}\\|[^\t\n]\\{0,%s\\}\t\\)\\{%d\\}%s\\(.+\\)$"
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2285 whitespace-tab-width
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2286 (1- whitespace-tab-width)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2287 (/ line-column whitespace-tab-width)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2288 (let ((rem (% line-column whitespace-tab-width)))
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2289 (if (zerop rem)
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2290 ""
28ca316fcaea Merge whitespace.el from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109946
diff changeset
2291 (format ".\\{%d\\}" rem)))))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2292 (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
2293 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
2294 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
2295 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
2296 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
2297 (cond
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2298 ((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
2299 (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
2300 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
2301 (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
2302 ;; 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
2303 (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
2304 (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
2305 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
2306 t))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2307 ((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
2308 (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
2309 nil
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2310 (list
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2311 ;; 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
2312 (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
2313 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
2314 t))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2315 ((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
2316 (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
2317 nil
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2318 (list
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2319 ;; 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
2320 (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
2321 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
2322 t)))
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2323 (cond
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2324 ((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
2325 (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
2326 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
2327 (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
2328 ;; 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
2329 (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
2330 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
2331 t))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2332 ((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
2333 (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
2334 nil
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2335 (list
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2336 ;; 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
2337 (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
2338 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
2339 t))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2340 ((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
2341 (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
2342 nil
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2343 (list
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2344 ;; 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
2345 (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
2346 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
2347 t)))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2348 (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
2349 (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
2350 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
2351 (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
2352 ;; Show empty lines at beginning of buffer
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2353 (list #'whitespace-empty-at-bob-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
2354 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
2355 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
2356 (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
2357 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
2358 (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
2359 ;; Show empty lines at end of buffer
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2360 (list #'whitespace-empty-at-eob-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
2361 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
2362 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
2363 (cond
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2364 ((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
2365 (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
2366 nil
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2367 (list
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2368 ;; 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
2369 (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
2370 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
2371 t))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2372 ((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
2373 (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
2374 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
2375 (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
2376 ;; 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
2377 (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
2378 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
2379 t))
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2380 ((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
2381 (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
2382 nil
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2383 (list
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2384 ;; 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
2385 (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
2386 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
2387 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
2388 ;; 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
2389 (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
2390
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2391
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2392 (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
2393 "Turn off color visualization."
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2394 ;; turn off font lock
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2395 (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
2396 (font-lock-mode 0)
109911
3ec7871b5633 * whitespace.el (whitespace-color-off): Remove post-command-hook locally.
Chong Yidong <cyd@stupidchicken.com>
parents: 106895
diff changeset
2397 (remove-hook 'post-command-hook #'whitespace-post-command-hook t)
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2398 (remove-hook 'before-change-functions #'whitespace-buffer-changed 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
2399 (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
2400 (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
2401 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
2402 ;; 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
2403 (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
2404
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2405
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2406 (defun whitespace-trailing-regexp (limit)
105244
1308a0fb85e9 Fix doc string.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 105190
diff changeset
2407 "Match trailing spaces which do not contain the point at end of line."
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2408 (let ((status t))
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2409 (while (if (re-search-forward whitespace-trailing-regexp limit t)
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2410 (save-match-data
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2411 (= whitespace-point (match-end 1))) ;; loop if point at eol
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2412 (setq status nil))) ;; end of buffer
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2413 status))
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2414
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2415
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2416 (defun whitespace-empty-at-bob-regexp (limit)
105244
1308a0fb85e9 Fix doc string.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 105190
diff changeset
2417 "Match spaces at beginning of buffer which do not contain the point at \
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2418 beginning of buffer."
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2419 (let ((b (point))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2420 r)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2421 (cond
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2422 ;; at bob
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2423 ((= b 1)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2424 (setq r (and (/= whitespace-point 1)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2425 (looking-at whitespace-empty-at-bob-regexp)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2426 (if r
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2427 (set-marker whitespace-bob-marker (match-end 1))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2428 (set-marker whitespace-bob-marker b)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2429 ;; inside bob empty region
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2430 ((<= limit whitespace-bob-marker)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2431 (setq r (looking-at whitespace-empty-at-bob-regexp))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2432 (if r
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2433 (when (< (match-end 1) limit)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2434 (set-marker whitespace-bob-marker (match-end 1)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2435 (set-marker whitespace-bob-marker b)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2436 ;; intersection with end of bob empty region
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2437 ((<= b whitespace-bob-marker)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2438 (setq r (looking-at whitespace-empty-at-bob-regexp))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2439 (if r
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2440 (set-marker whitespace-bob-marker (match-end 1))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2441 (set-marker whitespace-bob-marker b)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2442 ;; it is not inside bob empty region
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2443 (t
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2444 (setq r nil)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2445 ;; move to end of matching
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2446 (and r (goto-char (match-end 1)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2447 r))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2448
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2449
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2450 (defsubst whitespace-looking-back (regexp limit)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2451 (save-excursion
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2452 (when (/= 0 (skip-chars-backward " \t\n" limit))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2453 (unless (bolp)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2454 (forward-line 1))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2455 (looking-at regexp))))
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2456
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2457
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2458 (defun whitespace-empty-at-eob-regexp (limit)
105244
1308a0fb85e9 Fix doc string.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 105190
diff changeset
2459 "Match spaces at end of buffer which do not contain the point at end of \
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2460 buffer."
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2461 (let ((b (point))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2462 (e (1+ (buffer-size)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2463 r)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2464 (cond
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2465 ;; at eob
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2466 ((= limit e)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2467 (when (/= whitespace-point e)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2468 (goto-char limit)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2469 (setq r (whitespace-looking-back whitespace-empty-at-eob-regexp b)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2470 (if r
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2471 (set-marker whitespace-eob-marker (match-beginning 1))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2472 (set-marker whitespace-eob-marker limit)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2473 (goto-char b))) ; return back to initial position
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2474 ;; inside eob empty region
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2475 ((>= b whitespace-eob-marker)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2476 (goto-char limit)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2477 (setq r (whitespace-looking-back whitespace-empty-at-eob-regexp b))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2478 (if r
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2479 (when (> (match-beginning 1) b)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2480 (set-marker whitespace-eob-marker (match-beginning 1)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2481 (set-marker whitespace-eob-marker limit)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2482 (goto-char b))) ; return back to initial position
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2483 ;; intersection with beginning of eob empty region
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2484 ((>= limit whitespace-eob-marker)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2485 (goto-char limit)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2486 (setq r (whitespace-looking-back whitespace-empty-at-eob-regexp b))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2487 (if r
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2488 (set-marker whitespace-eob-marker (match-beginning 1))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2489 (set-marker whitespace-eob-marker limit)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2490 (goto-char b))) ; return back to initial position
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2491 ;; it is not inside eob empty region
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2492 (t
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2493 (setq r nil)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2494 r))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2495
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2496
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2497 (defun whitespace-buffer-changed (beg end)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2498 "Set `whitespace-buffer-changed' variable to t."
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2499 (setq whitespace-buffer-changed t))
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2500
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2501
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2502 (defun whitespace-post-command-hook ()
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2503 "Save current point into `whitespace-point' variable.
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2504 Also refontify when necessary."
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2505 (setq whitespace-point (point)) ; current point position
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2506 (let ((refontify
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2507 (or
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2508 ;; it is at end of line ...
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2509 (and (eolp)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2510 ;; ... with trailing SPACE or TAB
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2511 (or (= (preceding-char) ?\ )
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2512 (= (preceding-char) ?\t)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2513 ;; it is at beginning of buffer (bob)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2514 (= whitespace-point 1)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2515 ;; the buffer was modified and ...
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2516 (and whitespace-buffer-changed
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2517 (or
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2518 ;; ... or inside bob whitespace region
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2519 (<= whitespace-point whitespace-bob-marker)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2520 ;; ... or at bob whitespace region border
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2521 (and (= whitespace-point (1+ whitespace-bob-marker))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2522 (= (preceding-char) ?\n))))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2523 ;; it is at end of buffer (eob)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2524 (= whitespace-point (1+ (buffer-size)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2525 ;; the buffer was modified and ...
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2526 (and whitespace-buffer-changed
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2527 (or
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2528 ;; ... or inside eob whitespace region
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2529 (>= whitespace-point whitespace-eob-marker)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2530 ;; ... or at eob whitespace region border
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2531 (and (= whitespace-point (1- whitespace-eob-marker))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2532 (= (following-char) ?\n)))))))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2533 (when (or refontify (> whitespace-font-lock-refontify 0))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2534 (setq whitespace-buffer-changed nil)
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2535 ;; adjust refontify counter
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2536 (setq whitespace-font-lock-refontify
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2537 (if refontify
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2538 1
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2539 (1- whitespace-font-lock-refontify)))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2540 ;; refontify
105190
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2541 (jit-lock-refontify))))
a0ecdf08bbf5 New version 12. Bug#4177
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 104301
diff changeset
2542
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
2543
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2544 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2545 ;;;; 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
2546
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2547
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2548 (defun whitespace-style-mark-p ()
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2549 "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
2550 (or (memq 'tab-mark whitespace-active-style)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2551 (memq 'space-mark whitespace-active-style)
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2552 (memq 'newline-mark whitespace-active-style)))
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2553
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2554
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
2555 (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
2556 ;; 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
2557 (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
2558 (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
2559
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2560
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2561 (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
2562 "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
2563 (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
2564 (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
2565 (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
2566 (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
2567 (< 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
2568
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2569
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2570 (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
2571 "Turn on character display mapping."
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2572 (when (and whitespace-display-mappings
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2573 (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
2574 (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
2575 ;; 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
2576 (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
2577 (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
2578 whitespace-display-table
109946
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2579 (copy-sequence buffer-display-table))
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2580 ;; asure `buffer-display-table' is unique
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2581 ;; when two or more windows are visible.
fe84742c509a merge whitespace.el change from trunk
Chong Yidong <cyd@stupidchicken.com>
parents: 109911
diff changeset
2582 (setq buffer-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
2583 (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
2584 (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
2585 (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
2586 (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
2587 ;; 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
2588 (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
2589 ;; 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
2590 (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
2591 (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
2592 (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
2593 (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
2594 ;; 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
2595 (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
2596 (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
2597 ;; 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
2598 (when (and (eq (cadr entry) ?\n)
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2599 (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
2600 ;; 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
2601 ;; 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
2602 ;; 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
2603 (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
2604 (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
2605 (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
2606 (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
2607 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
2608 ;; 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
2609 (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
2610
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2611
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2612 (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
2613 "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
2614 (and whitespace-display-mappings
94373
f9bcef02655f New version 11.0.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 94226
diff changeset
2615 (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
2616 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
2617 (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
2618 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
2619
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2620
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2621 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2622 ;;;; Hook
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2623
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2624
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2625 (defun whitespace-action-when-on ()
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2626 "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
2627 (cond ((memq 'cleanup whitespace-action)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2628 (whitespace-cleanup))
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2629 ((memq 'report-on-bogus whitespace-action)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2630 (whitespace-report nil t))))
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2631
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2632
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2633 (defun whitespace-write-file-hook ()
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2634 "Action to be taken when buffer is written.
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2635 It should be added buffer-locally to `write-file-functions'."
98454
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
2636 (cond ((memq 'auto-cleanup whitespace-action)
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
2637 (whitespace-cleanup))
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
2638 ((memq 'abort-on-bogus whitespace-action)
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
2639 (when (whitespace-report nil t)
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
2640 (error "Abort write due to whitespace problems in %s"
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
2641 (buffer-name)))))
94112
7b3262e9986b Honor the indent-tabs-mode and tab-width setting from user.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 92372
diff changeset
2642 nil) ; continue hook processing
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2643
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2644
98008
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
2645 (defun whitespace-warn-read-only (msg)
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
2646 "Warn if buffer is read-only."
98454
431a14612b87 Eliminate whitespace-kill-buffer-hook functionality.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 98009
diff changeset
2647 (when (memq 'warn-if-read-only whitespace-action)
98008
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
2648 (message "Can't %s: %s is read-only" msg (buffer-name))))
4ec5decd0683 Fix bug#360.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 97311
diff changeset
2649
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2650
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2651 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
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
2652
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2653
88115
becc5f138486 (global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents: 88113
diff changeset
2654 (defun whitespace-unload-function ()
92372
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2655 "Unload the whitespace library."
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2656 (global-whitespace-mode -1)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2657 ;; 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
2658 (save-current-buffer
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2659 (dolist (buf (buffer-list))
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2660 (set-buffer buf)
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2661 (whitespace-mode -1)))
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2662 nil) ; continue standard unloading
0418e6ff8eb2 New version 9.3.
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents: 91471
diff changeset
2663
88115
becc5f138486 (global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents: 88113
diff changeset
2664
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
2665 (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
2666
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2667
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2668 (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
2669
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
2670
88100
9623247b8103 Re-use arch-tag from old blank-mode.el for lisp/whitespace.el
Miles Bader <miles@gnu.org>
parents: 88099
diff changeset
2671 ;; 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
2672 ;;; whitespace.el ends here