annotate lisp/whitespace.el @ 88117:376d8dccd05c

*** empty log message ***
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 01 Feb 2008 11:25:16 +0000
parents becc5f138486
children 959dc75df82e
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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
3 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
4 ;; Free Software Foundation, Inc.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
5
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
6 ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
7 ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
8 ;; Keywords: data, wp
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
9 ;; Version: 9.2
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
14 ;; GNU Emacs is free software; you can redistribute it and/or modify
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
15 ;; it under the terms of the GNU General Public License as published
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
16 ;; by the Free Software Foundation; either version 3, or (at your
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
17 ;; option) any later version.
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
19 ;; GNU Emacs is distributed in the hope that it will be useful, 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
20 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
22 ;; General Public License for more details.
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
25 ;; along with GNU Emacs; see the file COPYING. If not, write to 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
26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
1662791e8fd8 Rename blank-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 ;; Boston, MA 02110-1301, USA.
1662791e8fd8 Rename blank-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 ;;; 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
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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-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 ;; 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
34 ;; ------------
1662791e8fd8 Rename blank-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 ;;
1662791e8fd8 Rename blank-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 ;; 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
37 ;; 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
38 ;;
1662791e8fd8 Rename blank-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 ;; 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
40 ;; 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
41 ;;
1662791e8fd8 Rename blank-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 ;; * 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
43 ;; 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
44 ;;
1662791e8fd8 Rename blank-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 ;; * 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
46 ;; 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
47 ;; 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
48 ;;
1662791e8fd8 Rename blank-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 ;; The `whitespace-style' and `whitespace-chars' variables are used 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
50 ;; select which way should be used to visualize 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
51 ;;
1662791e8fd8 Rename blank-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 ;; 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
53 ;; 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
54 ;; 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
55 ;; 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
56 ;; 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
57 ;; 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
58 ;; 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
59 ;; 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
60 ;;
1662791e8fd8 Rename blank-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 ;; 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
62 ;; 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
63 ;; (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
64 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
65 ;; 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
66 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
67 ;; * 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
68 ;;
1662791e8fd8 Rename blank-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 ;; * 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
70 ;; 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
71 ;; 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
72 ;; `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
73 ;; 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
74 ;;
1662791e8fd8 Rename blank-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 ;; 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
76 ;; 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
77 ;; 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
78 ;; 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
79 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
80 ;; 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
81 ;;
1662791e8fd8 Rename blank-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 ;; * 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
83 ;; 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
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 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
86 ;; 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
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 ;; 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
89 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
90 ;; (require 'whitespace-mode)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
91 ;;
1662791e8fd8 Rename blank-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 ;; 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
93 ;; `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
94 ;; `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
95 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
96 ;; (autoload 'whitespace-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
97 ;; "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
98 ;; (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
99 ;; "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
100 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
101 ;; whitespace 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
102 ;;
1662791e8fd8 Rename blank-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 ;; 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
104 ;; 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
105 ;; (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
106 ;; 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
107 ;; `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
108 ;; `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
109 ;;
1662791e8fd8 Rename blank-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 ;; 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
111 ;; 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
112 ;; (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
113 ;;
1662791e8fd8 Rename blank-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 ;; 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
115 ;; 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
116 ;; (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
117 ;;
1662791e8fd8 Rename blank-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 ;; 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
119 ;; 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
120 ;; (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
121 ;; 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
122 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
123 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
124 ;; 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
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 ;; 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
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 ;; * 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
130 ;; + 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
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 ;; 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
133 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
134 ;; + 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
135 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
136 ;; 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
137 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
138 ;; + 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
139 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
140 ;; 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
141 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
142 ;; + 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
143 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
144 ;; 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
145 ;;
1662791e8fd8 Rename blank-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 ;; * 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
147 ;; + 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
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 ;; 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
150 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
151 ;; + 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
152 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
153 ;; 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
154 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
155 ;; + 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
156 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
157 ;; 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
158 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
159 ;; + 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
160 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
161 ;; 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
162 ;;
1662791e8fd8 Rename blank-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 ;; 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
164 ;;
1662791e8fd8 Rename blank-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 ;; `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
166 ;; 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
167 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
168 ;; `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
169 ;; 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
170 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
171 ;; `whitespace-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
172 ;; Turn on `whitespace-mode' forcing some settings.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
173 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
174 ;; 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
175 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
176 ;; 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
177 ;; 2. 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
178 ;; If `whitespace-chars' has `empty' as an element, remove all
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
179 ;; 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
180 ;;
1662791e8fd8 Rename blank-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 ;; 3. 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
182 ;; If `whitespace-chars' has `indentation' as an element, replace 8
1662791e8fd8 Rename blank-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 ;; or more SPACEs at beginning of line by 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
184 ;;
1662791e8fd8 Rename blank-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 ;; 4. 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
186 ;; If `whitespace-chars' has `space-before-tab' as an element,
1662791e8fd8 Rename blank-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 ;; replace SPACEs by 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
188 ;;
1662791e8fd8 Rename blank-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 ;; 5. SPACEs or TABs at end 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
190 ;; If `whitespace-chars' has `trailing' as an element, remove all
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
191 ;; SPACEs or TABs at end 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
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 ;; 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
194 ;; If `whitespace-chars' has `space-after-tab' as an element,
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
195 ;; replace SPACEs by 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
196 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
197 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
198 ;; 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
199 ;; -----
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
200 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
201 ;; 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
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 ;; `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
204 ;; 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
205 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
206 ;; `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
207 ;; 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
208 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
209 ;; `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
210 ;; 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
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 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
213 ;; 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
214 ;; -------
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
215 ;;
1662791e8fd8 Rename blank-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 ;; 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
217 ;; 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
218 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
219 ;; `whitespace-style' Specify the visualization style.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
220 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
221 ;; `whitespace-chars' Specify which kind of blank 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
222 ;; visualized.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
223 ;;
1662791e8fd8 Rename blank-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 ;; `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
225 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
226 ;; `whitespace-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
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 ;; `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
229 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
230 ;; `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
231 ;; 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
232 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
233 ;; `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
234 ;; 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
235 ;;
1662791e8fd8 Rename blank-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 ;; `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
237 ;;
1662791e8fd8 Rename blank-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 ;; `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
239 ;; 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
240 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
241 ;; `whitespace-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
242 ;; 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
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 ;; `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
245 ;; 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
246 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
247 ;; `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
248 ;; 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
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-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
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-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
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-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
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-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
257 ;;
1662791e8fd8 Rename blank-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 ;; `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
259 ;; 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
260 ;;
1662791e8fd8 Rename blank-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 ;; `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
262 ;; 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
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-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
265 ;; 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
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-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
268 ;; 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
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-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
271 ;; 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
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-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
274 ;; 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
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-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
277 ;; 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
278 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
279 ;; `whitespace-global-modes' Modes for which global `whitespace-mode' 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
280 ;; 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
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 ;;
1662791e8fd8 Rename blank-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 ;; 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
284 ;; ----------------
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
285 ;;
1662791e8fd8 Rename blank-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 ;; 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
287 ;; 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
288 ;;
1662791e8fd8 Rename blank-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 ;; 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
290 ;; * `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
291 ;; * `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
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 ;; 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
294 ;;
1662791e8fd8 Rename blank-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 ;; 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
296 ;; 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
297 ;;
1662791e8fd8 Rename blank-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 ;; 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
299 ;; 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
300 ;;
1662791e8fd8 Rename blank-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 ;; 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
302 ;; 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
303 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
304 ;; 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
305 ;; "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
306 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
307 ;; Thanks to Yanghui Bian <yanghuibian@gmail.com> for indicating a new
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
308 ;; newline character mapping.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
309 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
310 ;; 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
311 ;; 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
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 ;; 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
314 ;; 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
315 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
316 ;; 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
317 ;; 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
318 ;; 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
319 ;; 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
320 ;; 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
321 ;; 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
322 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
323 ;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
324 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
325
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
326 ;;; 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
327
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 ;;;; 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
331
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
332
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
333 ;;; 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
334
1662791e8fd8 Rename blank-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 (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
337 "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
338 :link '(emacs-library-link :tag "Source Lisp File" "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
339 :version "22.2"
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
340 :group 'wp
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
341 :group 'data)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
342
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (defcustom whitespace-style '(mark 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
345 "*Specify the visualization style.
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 It's a list which element value can be:
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
348
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
349 mark display mappings are visualized.
1662791e8fd8 Rename blank-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 color faces are visualized.
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 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
354
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
355 If nil, don't visualize TABs, (HARD) SPACEs and NEWLINEs.
1662791e8fd8 Rename blank-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 See also `whitespace-display-mappings' for 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
358 :type '(repeat :tag "Style of 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
359 (choice :tag "Style of 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
360 (const :tag "Display Table" 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
361 (const :tag "Faces" 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
362 :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
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 (defcustom whitespace-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
366 '(tabs spaces trailing lines space-before-tab 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
367 indentation empty 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
368 "*Specify which kind of blank is visualized.
1662791e8fd8 Rename blank-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 It's a list which element value can be:
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 trailing trailing blanks are visualized.
1662791e8fd8 Rename blank-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 tabs TABs are visualized.
1662791e8fd8 Rename blank-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 spaces SPACEs and HARD SPACEs are visualized.
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 lines lines whose have columns beyond
1662791e8fd8 Rename blank-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 `whitespace-line-column' are 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
380 Whole line is highlighted.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
381 It has precedence over
1662791e8fd8 Rename blank-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 `lines-tail' (see below).
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
384 lines-tail lines whose have columns beyond
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
385 `whitespace-line-column' are 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
386 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
387 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
388 It has effect only if `lines' (see above)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
389 is not present in `whitespace-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
390
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
391 space-before-tab SPACEs before TAB are visualized.
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
393 newline NEWLINEs are visualized.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
394
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
395 indentation 8 or more SPACEs at beginning of line 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
396 visualized.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
397
1662791e8fd8 Rename blank-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 empty 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
399 are visualized.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
400
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
401 space-after-tab 8 or more SPACEs after a TAB are visualized.
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
403 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
404
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
405 If nil, don't visualize TABs, (HARD) SPACEs and NEWLINEs.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
406
1662791e8fd8 Rename blank-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 Used when `whitespace-style' has `color' as an element.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
408 Used also when `whitespace-chars' has `newline' as an element 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
409 `whitespace-style' has `mark' as an element."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
410 :type '(repeat :tag "Kind of 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
411 (choice :tag "Kind of 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
412 (const :tag "Trailing TABs, SPACEs and 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
413 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
414 (const :tag "SPACEs and HARD SPACEs" 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
415 (const :tag "TABs" 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
416 (const :tag "Lines" 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
417 (const :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
418 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
419 (const :tag "NEWLINEs" 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
420 (const :tag "Indentation SPACEs" 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
421 (const :tag "Empty Lines At BOB And/Or EOB"
1662791e8fd8 Rename blank-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 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
423 (const :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
424 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
425 :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
426
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
427
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
428 (defcustom whitespace-space 'whitespace-space
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
429 "*Symbol face used to visualize SPACE.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
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 Used when `whitespace-style' has `color' as an element."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
432 :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
433 :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
434
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
436 (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
437 '((((class color) (background dark))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
438 (:background "grey20" :foreground "aquamarine3"))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
439 (((class color) (background light))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
440 (:background "LightYellow" :foreground "aquamarine3"))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
441 (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
442 "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
443 :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
444
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
445
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
446 (defcustom whitespace-hspace 'whitespace-hspace
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
447 "*Symbol face used to visualize HARD SPACE.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
448
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
449 Used when `whitespace-style' has `color' as an element."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
450 :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
451 :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
452
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
453
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
454 (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
455 '((((class color) (background dark))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
456 (:background "grey24" :foreground "aquamarine3"))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
457 (((class color) (background light))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
458 (:background "LemonChiffon3" :foreground "aquamarine3"))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
459 (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
460 "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
461 :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
462
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
463
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
464 (defcustom whitespace-tab 'whitespace-tab
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
465 "*Symbol face used to visualize TAB.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
466
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
467 Used when `whitespace-style' has `color' as an element."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
468 :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
469 :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
470
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
471
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
472 (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
473 '((((class color) (background dark))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
474 (:background "grey22" :foreground "aquamarine3"))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
475 (((class color) (background light))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
476 (:background "beige" :foreground "aquamarine3"))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
477 (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
478 "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
479 :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
480
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
481
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
482 (defcustom whitespace-newline 'whitespace-newline
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
483 "*Symbol face used to visualize NEWLINE char mapping.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
484
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
485 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
486
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
487 Used when `whitespace-style' has `mark' and `color' as elements
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
488 and `whitespace-chars' has `newline' as an element."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
489 :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
490 :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
491
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
492
1662791e8fd8 Rename blank-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 (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
494 '((((class color) (background dark))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
495 (:background "grey26" :foreground "aquamarine3" :bold t))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
496 (((class color) (background light))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
497 (:background "linen" :foreground "aquamarine3" :bold t))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
498 (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
499 "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
500
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
501 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
502 :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
503
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
504
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
505 (defcustom whitespace-trailing 'whitespace-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
506 "*Symbol face used to visualize traling 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
507
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
508 Used when `whitespace-style' has `color' as an element."
1662791e8fd8 Rename blank-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 :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
510 :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
511
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
512
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
513 (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
514 '((((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
515 (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
516 "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
517 :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
518
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
519
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
520 (defcustom whitespace-line 'whitespace-line
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
521 "*Symbol face used to visualize \"long\" lines.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
522
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
523 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
524
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
525 Used when `whitespace-style' has `color' as an element."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
526 :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
527 :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
528
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
529
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
530 (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
531 '((((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
532 (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
533 "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
534
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
535 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
536 :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
537
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
538
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
539 (defcustom whitespace-space-before-tab 'whitespace-space-before-tab
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
540 "*Symbol face used to visualize SPACEs before TAB.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
541
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
542 Used when `whitespace-style' has `color' as an element."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
543 :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
544 :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
545
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
547 (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
548 '((((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
549 (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
550 "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
551 :group 'whitespace)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
552
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
553
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
554 (defcustom whitespace-indentation 'whitespace-indentation
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
555 "*Symbol face used to visualize 8 or more SPACEs at beginning of line.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
556
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
557 Used when `whitespace-style' has `color' as an element."
1662791e8fd8 Rename blank-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 :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
559 :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
560
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (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
563 '((((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
564 (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
565 "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
566 :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
567
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
568
1662791e8fd8 Rename blank-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 (defcustom whitespace-empty 'whitespace-empty
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
570 "*Symbol face used to visualize empty lines at beginning and/or end of buffer.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
571
1662791e8fd8 Rename blank-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 Used when `whitespace-style' has `color' as an element."
1662791e8fd8 Rename blank-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 :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
574 :group 'whitespace)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
575
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
576
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
577 (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
578 '((((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
579 (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
580 "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
581 :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
582
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
583
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
584 (defcustom whitespace-space-after-tab 'whitespace-space-after-tab
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
585 "*Symbol face used to visualize 8 or more SPACEs after TAB.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
586
1662791e8fd8 Rename blank-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 Used when `whitespace-style' has `color' as an element."
1662791e8fd8 Rename blank-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 :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
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 (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
593 '((((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
594 (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
595 "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
596 :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
597
1662791e8fd8 Rename blank-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 (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
600 "\\(\\(\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
601 "*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
602
1662791e8fd8 Rename blank-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 If you're using `mule' package, it may exist other characters besides:
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
604
1662791e8fd8 Rename blank-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 \"\\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
606
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
607 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
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 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
610
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
611 \"\\\\(^\\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
612 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
613 \"\\\\(\\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
614 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
615 \"\\\\(^\\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
616 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
617 \"\\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
618 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
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 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
621 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
622
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
623 Used when `whitespace-style' has `color' as an element, 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
624 `whitespace-chars' has `spaces' as an element."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
625 :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
626 :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
627
1662791e8fd8 Rename blank-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 (defcustom whitespace-space-regexp "\\( +\\)"
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
630 "*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
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 If you're using `mule' package, it may exist other 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
633 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
634
1662791e8fd8 Rename blank-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 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
636
1662791e8fd8 Rename blank-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 \"\\\\(^ +\\\\)\" 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
638 \"\\\\( +$\\\\)\" 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
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 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
641 \"\\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
642
1662791e8fd8 Rename blank-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 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
644 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
645
1662791e8fd8 Rename blank-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 Used when `whitespace-style' has `color' as an element, 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
647 `whitespace-chars' has `spaces' as an element."
1662791e8fd8 Rename blank-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 :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
649 :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
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
1662791e8fd8 Rename blank-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 (defcustom whitespace-tab-regexp "\\(\t+\\)"
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
653 "*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
654
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
655 If you're using `mule' package, it may exist other 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
656 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
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 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
659
1662791e8fd8 Rename blank-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+\\\\)\" 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
661 \"\\\\(\\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
662 \"\\\\(^\\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
663 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
664 \" \\\\(\\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
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 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
667 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
668
1662791e8fd8 Rename blank-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 Used when `whitespace-style' has `color' as an element, 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
670 `whitespace-chars' has `tabs' as an element."
1662791e8fd8 Rename blank-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 '(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
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 (defcustom whitespace-trailing-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
676 "\t\\| \\|\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
677 "*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
678
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
679 If you're using `mule' package, it may exist other characters besides:
1662791e8fd8 Rename blank-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 \" \" \"\\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
682 \"\\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
683
1662791e8fd8 Rename blank-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 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
685
1662791e8fd8 Rename blank-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 NOTE: DO NOT enclose 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
687 `whitespace-mode' surrounds this regexp by \"\\\\(\\\\(\" 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
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 Used when `whitespace-style' has `color' as an element, 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
691 `whitespace-chars' has `trailing' as an element."
1662791e8fd8 Rename blank-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 :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
693 :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
694
1662791e8fd8 Rename blank-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 (defcustom whitespace-space-before-tab-regexp "\\( +\\)\t"
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
697 "*Specify SPACEs before TAB regexp.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
698
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
699 If you're using `mule' package, it may exist other characters besides:
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
700
1662791e8fd8 Rename blank-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 \" \" \"\\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
702 \"\\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
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 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
705
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
706 Used when `whitespace-style' has `color' as an element, 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
707 `whitespace-chars' has `space-before-tab' as an element."
1662791e8fd8 Rename blank-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 :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
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-indentation-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
713 "^\t*\\(\\( \\{8\\}\\)+\\)[^\n\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
714 "*Specify regexp for 8 or more SPACEs at beginning of line.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
715
1662791e8fd8 Rename blank-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 If you're using `mule' package, it may exist other characters besides:
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 \" \" \"\\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
719 \"\\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
720
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
721 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
722
1662791e8fd8 Rename blank-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 Used when `whitespace-style' has `color' as an element, 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
724 `whitespace-chars' has `indentation' as an element."
1662791e8fd8 Rename blank-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 :type '(regexp :tag "Indentation 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
726 :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
727
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
728
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
729 (defcustom whitespace-empty-at-bob-regexp "\\`\\(\\([ \t]*\n\\)+\\)"
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
730 "*Specify regexp for empty lines at beginning of buffer.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
731
1662791e8fd8 Rename blank-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 If you're using `mule' package, it may exist other characters besides:
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
734 \" \" \"\\t\" \"\\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
735 \"\\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
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 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
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 Used when `whitespace-style' has `color' as an element, 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
740 `whitespace-chars' has `empty' as an element."
1662791e8fd8 Rename blank-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 :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
742 :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
743
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
744
1662791e8fd8 Rename blank-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 (defcustom whitespace-empty-at-eob-regexp "^\\([ \t\n]+\\)\\'"
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
746 "*Specify regexp for empty lines at end of buffer.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
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 If you're using `mule' package, it may exist other characters besides:
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
749
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
750 \" \" \"\\t\" \"\\xA0\" \"\\x8A0\" \"\\x920\" \"\\xE20\" \
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
751 \"\\xF20\"
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
752
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
753 that should be considered blank.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
754
1662791e8fd8 Rename blank-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 Used when `whitespace-style' has `color' as an element, 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
756 `whitespace-chars' has `empty' as an element."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
757 :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
758 :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
759
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (defcustom whitespace-space-after-tab-regexp "\t\\(\\( \\{8\\}\\)+\\)"
1662791e8fd8 Rename blank-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 "*Specify regexp for 8 or more SPACEs after TAB.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
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 If you're using `mule' package, it may exist other characters besides:
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 \" \" \"\\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
767 \"\\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
768
1662791e8fd8 Rename blank-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 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
770
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
771 Used when `whitespace-style' has `color' as an element, 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 `whitespace-chars' has `space-after-tab' as an element."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
773 :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
774 :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
775
1662791e8fd8 Rename blank-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 (defcustom whitespace-line-column 80
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
778 "*Specify column beyond which the line is highlighted.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
779
1662791e8fd8 Rename blank-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 Used when `whitespace-style' has `color' as an element, 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
781 `whitespace-chars' has `lines' or `lines-tail' as an element."
1662791e8fd8 Rename blank-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 :type '(integer :tag "Line Length")
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
783 :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
784
1662791e8fd8 Rename blank-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 ;; 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
787 (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
788 ;; Due to limitations of glyph representation, the char code can 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
789 ;; be above ?\x1FFFF. Probably, this will be fixed after 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
790 ;; unicode merging.
1662791e8fd8 Rename blank-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 (?\ [?\xB7] [?.]) ; space - centered dot
1662791e8fd8 Rename blank-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 (?\xA0 [?\xA4] [?_]) ; hard space - currency
1662791e8fd8 Rename blank-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 (?\x8A0 [?\x8A4] [?_]) ; hard space - currency
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
795 (?\x920 [?\x924] [?_]) ; hard space - currency
1662791e8fd8 Rename blank-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 (?\xE20 [?\xE24] [?_]) ; hard space - currency
1662791e8fd8 Rename blank-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 (?\xF20 [?\xF24] [?_]) ; hard space - currency
1662791e8fd8 Rename blank-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 ;; NEWLINE is displayed using the face `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
799 (?\n [?$ ?\n]) ; end-of-line - dollar sign
1662791e8fd8 Rename blank-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 ;; (?\n [?\u21B5 ?\n] [?$ ?\n]) ; end-of-line - downwards arrow
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
801 ;; (?\n [?\xB6 ?\n] [?$ ?\n]) ; end-of-line - pilcrow
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
802 ;; (?\n [?\x8AF ?\n] [?$ ?\n]) ; end-of-line - overscore
1662791e8fd8 Rename blank-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 ;; (?\n [?\x8AC ?\n] [?$ ?\n]) ; end-of-line - negation
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
804 ;; (?\n [?\x8B0 ?\n] [?$ ?\n]) ; end-of-line - grade
1662791e8fd8 Rename blank-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 ;; 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
807 ;; 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
808 ;; 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
809 ;; 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
810 ;; If this is a problem for you, please, comment the line below.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
811 (?\t [?\xBB ?\t] [?\\ ?\t]) ; tab - left quote 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
812 )
1662791e8fd8 Rename blank-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 "*Specify an alist of mappings for displaying characters.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
814
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
815 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
816
1662791e8fd8 Rename blank-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 (CHAR VECTOR...)
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
819 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
820
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
821 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
822
1662791e8fd8 Rename blank-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 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
824 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
825 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
826 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
827
1662791e8fd8 Rename blank-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 The NEWLINE character is displayed using the face given 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
829 `whitespace-newline' variable. The characters in the vector 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
830 be displayed will not have this face applied if the character
1662791e8fd8 Rename blank-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 code is above #x1FFFF.
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 Used when `whitespace-style' has `mark' as an element."
1662791e8fd8 Rename blank-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 :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
835 (list :tag "Character Mapping"
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
836 (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
837 (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
838 (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
839 (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
840 :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
841 (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
842 :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
843
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
844
1662791e8fd8 Rename blank-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 (defcustom whitespace-global-modes t
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
846 "*Modes for which global `whitespace-mode' is automagically turned on.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
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 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
849 `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
850
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
851 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
852 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
853
1662791e8fd8 Rename blank-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 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
855 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
856
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
857 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
858 `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
859 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
860
1662791e8fd8 Rename blank-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 (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
862
1662791e8fd8 Rename blank-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 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
864 C++ modes 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
865 :type '(choice (const :tag "None" 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
866 (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
867 (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
868 :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
869 (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
870 (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
871 (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
872 :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
873
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
875 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-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 ;;;; 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
877
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 ;;;###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
880 (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
881 "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
882
1662791e8fd8 Rename blank-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 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
884 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
885 otherwise, turn off visualization.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
886 Only useful with a windowing system."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
887 :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
888 :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
889 :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
890 :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
891 (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
892 (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
893 (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
894 (whitespace-mode ; 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
895 (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
896 (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
897 (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
898
1662791e8fd8 Rename blank-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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-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 ;;;; 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
902
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
903
1662791e8fd8 Rename blank-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 (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
905 "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
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 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
908 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
909 otherwise, turn off visualization.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
910 Only useful with a windowing system."
88113
c80332ad12c1 (global-whitespace-mode): Fix modeline lighter.
Juanma Barranquero <lekktu@gmail.com>
parents: 88100
diff changeset
911 :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
912 :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
913 :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
914 :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
915 (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
916 (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
917 (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
918 (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
919 (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
920 (if (boundp 'find-file-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
921 (add-hook 'find-file-hook 'whitespace-turn-on-if-enabled 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
922 (add-hook 'find-file-hooks 'whitespace-turn-on-if-enabled t))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
923 (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
924 (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
925 (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
926 (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
927 (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
928 (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
929 (if (boundp 'find-file-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
930 (remove-hook 'find-file-hook '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
931 (remove-hook 'find-file-hooks '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
932 (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
933 (set-buffer buffer)
88115
becc5f138486 (global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents: 88113
diff changeset
934 (when (or (not whitespace-mode)
becc5f138486 (global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents: 88113
diff changeset
935 ;; whitespace is being unloaded
becc5f138486 (global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents: 88113
diff changeset
936 (bound-and-true-p unload-function-defs-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
937 (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
938
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
939
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
940 (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
941 (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
942 ((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
943 ((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
944 (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
945 (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
946 (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
947 (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
948 (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
949 ;; 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
950 (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
951 ;; ...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
952 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
953 ;; ...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
954 (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
955 ;; ...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
956 (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
957 ;; 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
958 (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
959 ;; 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
960 (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
961
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 ;;;; 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
965
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (defconst whitespace-chars-value-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
968 '(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
969 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
970 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
971 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
972 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
973 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
974 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
975 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
976 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
977 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
978 )
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
979 "List of valid `whitespace-chars' values.")
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 (defconst whitespace-style-value-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
983 '(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
984 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
985 )
1662791e8fd8 Rename blank-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 "List of valid `whitespace-style' values.")
1662791e8fd8 Rename blank-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 (defconst 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
990 '((?t . 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
991 (?s . 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
992 (?r . 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
993 (?b . 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
994 (?l . 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
995 (?L . 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
996 (?n . 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
997 (?i . 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
998 (?e . 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
999 (?a . 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
1000 (?c . 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
1001 (?m . 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
1002 (?x . whitespace-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
1003 (?z . whitespace-style)
1662791e8fd8 Rename blank-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 "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
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 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
1008
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1009 (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
1010
1662791e8fd8 Rename blank-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 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
1012
1662791e8fd8 Rename blank-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 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
1014
1662791e8fd8 Rename blank-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 SYMBOL is a valid symbol associated with 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
1016 See `whitespace-chars-value-list' 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
1017 `whitespace-style-value-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
1018
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1019
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1020 (defvar whitespace-active-chars 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
1021 "Used to save locally `whitespace-chars' 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
1022 (make-variable-buffer-local 'whitespace-active-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
1023
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1024 (defvar whitespace-active-style 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
1025 "Used to save locally `whitespace-style' 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
1026 (make-variable-buffer-local 'whitespace-active-style)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1027
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1028
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1029 ;;;###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
1030 (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
1031 "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
1032
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1033 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
1034 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
1035
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1036 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
1037 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
1038
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1039 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
1040
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1041 CHAR MEANING
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1042 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
1043 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
1044 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
1045 b toggle SPACEs before 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
1046 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
1047 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
1048 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
1049 i toggle indentation SPACEs 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
1050 e toggle empty line at bob and/or eob 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
1051 a toggle SPACEs after 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
1052 c toggle color faces
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1053 m toggle visual 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
1054 x restore `whitespace-chars' 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
1055 z restore `whitespace-style' 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
1056 ? 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
1057
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1058 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
1059 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
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 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
1062 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
1063 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
1064 space-before-tab toggle SPACEs before 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
1065 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
1066 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
1067 newline 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
1068 indentation toggle indentation SPACEs 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 empty toggle empty line at bob and/or eob 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 space-after-tab toggle SPACEs after 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
1071 color toggle color faces
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1072 mark toggle visual 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
1073 whitespace-chars restore `whitespace-chars' 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
1074 whitespace-style restore `whitespace-style' 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
1075
1662791e8fd8 Rename blank-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 Only useful with a windowing system."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1077 (interactive (whitespace-interactive-char 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
1078 (let ((whitespace-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
1079 (whitespace-toggle-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
1080 t arg whitespace-active-chars whitespace-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
1081 'whitespace-chars whitespace-chars-value-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
1082 (whitespace-style
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1083 (whitespace-toggle-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
1084 t arg whitespace-active-style whitespace-style
1662791e8fd8 Rename blank-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-style whitespace-style-value-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
1086 (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
1087 (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
1088
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1089
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1090 (defvar whitespace-toggle-chars 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
1091 "Used to toggle the global `whitespace-chars' 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
1092 (defvar whitespace-toggle-style 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
1093 "Used to toggle the global `whitespace-style' 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
1094
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1095
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1096 ;;;###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
1097 (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
1098 "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
1099
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1100 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
1101 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
1102
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1103 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
1104 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
1105
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1106 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
1107
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1108 CHAR MEANING
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1109 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
1110 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
1111 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
1112 b toggle SPACEs before 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
1113 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
1114 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
1115 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
1116 i toggle indentation SPACEs 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
1117 e toggle empty line at bob and/or eob 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
1118 a toggle SPACEs after 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
1119 c toggle color faces
1662791e8fd8 Rename blank-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 m toggle visual 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
1121 x restore `whitespace-chars' 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
1122 z restore `whitespace-style' 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
1123 ? 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
1124
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1125 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
1126 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
1127
1662791e8fd8 Rename blank-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 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
1129 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
1130 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
1131 space-before-tab toggle SPACEs before 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
1132 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
1133 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
1134 newline 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
1135 indentation toggle indentation SPACEs 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
1136 empty toggle empty line at bob and/or eob 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
1137 space-after-tab toggle SPACEs after 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
1138 color toggle color faces
1662791e8fd8 Rename blank-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 mark toggle visual 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
1140 whitespace-chars restore `whitespace-chars' 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
1141 whitespace-style restore `whitespace-style' 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
1142
1662791e8fd8 Rename blank-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 Only useful with a windowing system."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1144 (interactive (whitespace-interactive-char 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
1145 (let ((whitespace-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
1146 (whitespace-toggle-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
1147 nil arg whitespace-toggle-chars whitespace-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
1148 'whitespace-chars whitespace-chars-value-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
1149 (whitespace-style
1662791e8fd8 Rename blank-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 (whitespace-toggle-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
1151 nil arg whitespace-toggle-style whitespace-style
1662791e8fd8 Rename blank-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 'whitespace-style whitespace-style-value-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
1153 (setq whitespace-toggle-chars whitespace-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
1154 whitespace-toggle-style whitespace-style)
1662791e8fd8 Rename blank-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 (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
1156 (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
1157
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1159 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1160 ;;;; 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
1161
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1162
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1163 ;;;###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
1164 (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
1165 "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
1166
1662791e8fd8 Rename blank-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 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
1168 mode when the mark is active, it applies to the region. It also
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1169 applies to the region when it is not in transiente mark mode, 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
1170 mark is active and it was pressed `C-u' just before calling
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1171 `whitespace-cleanup' interactively.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1172
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1173 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
1174
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1175 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
1176
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1177 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
1178 2. 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
1179 If `whitespace-chars' has `empty' as an element, remove all
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1180 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
1181
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1182 3. 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
1183 If `whitespace-chars' has `indentation' as an element, replace
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1184 8 or more SPACEs at beginning of line by 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
1185
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1186 4. 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
1187 If `whitespace-chars' has `space-before-tab' as an element,
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1188 replace SPACEs by 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
1189
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1190 5. SPACEs or TABs at end 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
1191 If `whitespace-chars' has `trailing' as an element, remove all
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1192 SPACEs or TABs at end 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
1193
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1194 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
1195 If `whitespace-chars' has `space-after-tab' as an element,
1662791e8fd8 Rename blank-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 replace SPACEs by 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
1197 (interactive "@*")
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1198 (if (and (or transient-mark-mode
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1199 current-prefix-arg)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1200 mark-active)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1201 ;; region active
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1202 ;; problems 1 and 2 are not handled in 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
1203 ;; problem 3: 8 or more SPACEs at bol
1662791e8fd8 Rename blank-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 ;; problem 4: 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
1205 ;; problem 5: SPACEs or TABs at eol
1662791e8fd8 Rename blank-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 ;; problem 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
1207 (whitespace-cleanup-region (region-beginning) (region-end))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1208 ;; whole buffer
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1209 (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
1210 (save-match-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
1211 ;; problem 1: empty lines at bob
1662791e8fd8 Rename blank-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 ;; problem 2: empty lines at eob
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1213 ;; action: remove all empty lines at bob and/or eob
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1214 (when (memq 'empty whitespace-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
1215 (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
1216 (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
1217 (when (re-search-forward
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1218 whitespace-empty-at-bob-regexp nil t)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1219 (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
1220 (when (re-search-forward
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1221 whitespace-empty-at-eob-regexp nil t)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1222 (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
1223 ;; problem 3: 8 or more SPACEs at bol
1662791e8fd8 Rename blank-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 ;; problem 4: 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
1225 ;; problem 5: SPACEs or TABs at eol
1662791e8fd8 Rename blank-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 ;; problem 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
1227 (whitespace-cleanup-region (point-min) (point-max))))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1228
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1229
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1230 ;;;###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
1231 (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
1232 "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
1233
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1234 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
1235
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1236 1. 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
1237 If `whitespace-chars' has `indentation' as an element, replace
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1238 8 or more SPACEs at beginning of line by 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
1239
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1240 2. 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
1241 If `whitespace-chars' has `space-before-tab' as an element,
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1242 replace SPACEs by 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
1243
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1244 3. SPACEs or TABs at end 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
1245 If `whitespace-chars' has `trailing' as an element, remove all
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1246 SPACEs or TABs at end 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
1247
1662791e8fd8 Rename blank-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 4. 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
1249 If `whitespace-chars' has `space-after-tab' as an element,
1662791e8fd8 Rename blank-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 replace SPACEs by 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
1251 (interactive "@*r")
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1252 (let ((rstart (min start end))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1253 (rend (copy-marker (max 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
1254 (tab-width 8) ; assure TAB width
1662791e8fd8 Rename blank-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 (indent-tabs-mode t) ; always insert 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
1256 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
1257 tmp)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1258 (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
1259 (save-match-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
1260 ;; problem 1: 8 or more SPACEs at bol
1662791e8fd8 Rename blank-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 ;; action: replace 8 or more SPACEs at bol by 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
1262 (when (memq 'indentation whitespace-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
1263 (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
1264 (while (re-search-forward
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1265 whitespace-indentation-regexp rend 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
1266 (setq tmp (current-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
1267 (delete-horizontal-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
1268 (unless (eolp)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1269 (indent-to tmp))))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1270 ;; problem 3: SPACEs or TABs at eol
1662791e8fd8 Rename blank-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 ;; action: remove all SPACEs or TABs at eol
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1272 (when (memq 'trailing whitespace-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
1273 (let ((regexp (concat "\\(\\(" whitespace-trailing-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
1274 "\\)+\\)$")))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1275 (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
1276 (while (re-search-forward regexp rend 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
1277 (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
1278 ;; problem 4: 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
1279 ;; action: replace 8 or more SPACEs by 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
1280 (when (memq 'space-after-tab whitespace-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
1281 (whitespace-replace-spaces-by-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
1282 rstart rend whitespace-space-after-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
1283 ;; problem 2: 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
1284 ;; action: replace SPACEs before TAB by 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
1285 (when (memq 'space-before-tab whitespace-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
1286 (whitespace-replace-spaces-by-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
1287 rstart rend 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
1288 (set-marker rend nil))) ; point marker to nowhere
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1289
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1290
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1291 (defun whitespace-replace-spaces-by-tabs (rstart rend 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
1292 "Replace all SPACEs by TABs matched by REGEXP between RSTART and REND."
1662791e8fd8 Rename blank-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 (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
1294 (while (re-search-forward regexp rend 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
1295 (goto-char (match-beginning 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
1296 (let* ((scol (current-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
1297 (ecol (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
1298 (goto-char (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
1299 (current-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
1300 (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
1301 (insert-char ?\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
1302 (/ (- (- ecol (% ecol 8)) ; prev end col
1662791e8fd8 Rename blank-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 (- scol (% scol 8))) ; prev start col
1662791e8fd8 Rename blank-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 8)))))
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1307 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1308 ;;;; User command - old whitespace compatibility
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1310
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1311 ;;;###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
1312 (defun whitespace-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
1313 "Turn on `whitespace-mode' forcing some settings.
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 It forces `whitespace-style' to have `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
1316
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1317 It also forces `whitespace-chars' to have:
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1318
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1319 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
1320 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
1321 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
1322 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
1323 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
1324
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1325 So, it is possible to visualize the following problems:
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1326
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1327 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
1328 empty 2. 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
1329 indentation 3. 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
1330 space-before-tab 4. 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
1331 trailing 5. SPACEs or TABs at end 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
1332 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
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 See `whitespace-chars' and `whitespace-style' for 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
1335 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
1336 cleaning up these problems."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1337 (interactive)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1338 (whitespace-mode 0) ; assure is 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
1339 ;; keep original values
1662791e8fd8 Rename blank-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 (let ((whitespace-style (copy-sequence whitespace-style))
1662791e8fd8 Rename blank-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 (whitespace-chars (copy-sequence whitespace-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
1342 ;; adjust options for whitespace bogus 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
1343 (add-to-list 'whitespace-style '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
1344 (mapc #'(lambda (option)
1662791e8fd8 Rename blank-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 (add-to-list 'whitespace-chars option))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1346 '(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
1347 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
1348 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
1349 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
1350 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
1351 (whitespace-mode 1))) ; 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
1352
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1353
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1354 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1355 ;;;; 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
1356
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1357
1662791e8fd8 Rename blank-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 (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
1359 "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
1360 (make-variable-buffer-local '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
1361
1662791e8fd8 Rename blank-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 (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
1363 "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
1364 (make-variable-buffer-local '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
1365
1662791e8fd8 Rename blank-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 (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
1367 "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
1368 (make-variable-buffer-local '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
1369
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1370
1662791e8fd8 Rename blank-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 (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
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 whitespace-mode 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
1374
1662791e8fd8 Rename blank-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 [] 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
1376 [] 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
1377 [] 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
1378 [] b - toggle SPACEs before 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
1379 [] 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
1380 [] 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
1381 [] 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
1382 [] i - toggle indentation SPACEs 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
1383 [] e - toggle empty line at bob and/or eob 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
1384 [] a - toggle SPACEs after 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
1385
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1386 [] c - toggle color faces
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1387 [] m - toggle visual 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
1388
1662791e8fd8 Rename blank-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 x - restore `whitespace-chars' 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
1390 z - restore `whitespace-style' 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
1391
1662791e8fd8 Rename blank-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 ? - 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
1393 "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
1394
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1395
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1396 (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
1397 "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
1398
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1399
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1400 (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
1401 "Insert the option mark ('X' or ' ') in toggle options 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
1402 (forward-line 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
1403 (dolist (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
1404 (forward-line 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
1405 (forward-char 2)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1406 (insert (if (memq sym the-value) "X" " "))))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1407
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1408
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1409 (defun whitespace-help-on (chars style)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1410 "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
1411 (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
1412 (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
1413 (let ((buffer (get-buffer-create whitespace-help-buffer-name)))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1414 (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
1415 (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
1416 (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
1417 (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
1418 (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
1419 (whitespace-insert-option-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
1420 whitespace-chars-value-list 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
1421 (whitespace-insert-option-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
1422 whitespace-style-value-list style)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1423 (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
1424 (set-buffer-modified-p 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
1425 (let ((size (- (window-height)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1426 (max window-min-height
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1427 (1+ (count-lines (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
1428 (point-max)))))))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1429 (when (<= size 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
1430 (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
1431 (error "Frame height is too small; \
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1432 can't split window to display 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
1433 (set-window-buffer (split-window nil size) 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
1434
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1435
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1436 (defun 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
1437 "Remove the buffer and window of 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
1438 (let ((buffer (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
1439 (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
1440 (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
1441 (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
1442
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1443
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1444 (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
1445 "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
1446
1662791e8fd8 Rename blank-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 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
1448 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
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 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
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 CHAR MEANING
1662791e8fd8 Rename blank-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 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
1454 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
1455 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
1456 b toggle SPACEs before 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
1457 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
1458 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
1459 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
1460 i toggle indentation SPACEs 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
1461 e toggle empty line at bob and/or eob 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
1462 a toggle SPACEs after 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
1463 c toggle color faces
1662791e8fd8 Rename blank-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 m toggle visual 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
1465 x restore `whitespace-chars' 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
1466 z restore `whitespace-style' 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
1467 ? 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
1468
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1469 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
1470 (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
1471 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
1472 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
1473 (chars (cond (is-off whitespace-chars) ; use default 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
1474 (local-p whitespace-active-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
1475 (t whitespace-toggle-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
1476 (style (cond (is-off whitespace-style) ; use default 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
1477 (local-p whitespace-active-style)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1478 (t whitespace-toggle-style)))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1479 (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
1480 (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
1481 (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
1482 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
1483 ;; 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
1484 (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
1485 (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
1486 (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
1487 (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
1488 ;; 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
1489 (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
1490 (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
1491 (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
1492 (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
1493 (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
1494 (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
1495 ;; while body
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1496 (if (eq ch ?\?)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1497 (whitespace-help-on chars style)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1498 (ding)))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1499 (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
1500 (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
1501 ;; 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
1502 ((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
1503 (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
1504 (error (error-message-string data)))))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1505 (list sym))) ; return the apropriate symbol
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1506
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1507
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1508 (defun whitespace-toggle-list (local-p arg the-list default-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
1509 sym-restore sym-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
1510 "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
1511
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1512 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
1513 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
1514
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1515 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
1516
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1517 THE-LIST is a list of options. This list will be toggled and 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
1518 resultant list will be returned.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1519
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1520 DEFAULT-LIST is the default list of options. It is used 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
1521 restore the options in 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
1522
1662791e8fd8 Rename blank-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 SYM-RESTORE is the symbol which indicates to restore the 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
1524 in 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
1525
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1526 SYM-LIST is a list of valid options, used to check if the ARG's
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1527 options are valid."
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1528 (unless (if local-p whitespace-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
1529 (setq the-list default-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
1530 (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
1531 (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
1532 (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
1533 ;; restore default values
1662791e8fd8 Rename blank-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 ((eq sym sym-restore)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1535 (setq the-list default-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
1536 ;; toggle valid values
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1537 ((memq sym sym-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
1538 (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
1539 (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
1540 (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
1541 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
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 (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
1545 "Turn on 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
1546 (setq whitespace-active-style (if (listp whitespace-style)
1662791e8fd8 Rename blank-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 whitespace-style
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1548 (list whitespace-style)))
1662791e8fd8 Rename blank-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 (setq whitespace-active-chars (if (listp whitespace-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
1550 whitespace-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
1551 (list whitespace-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
1552 (when (memq 'color whitespace-active-style)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1553 (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
1554 (when (memq 'mark whitespace-active-style)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1555 (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
1556
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1557
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1558 (defun 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
1559 "Turn off whitesapce 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
1560 (when (memq 'color whitespace-active-style)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1561 (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
1562 (when (memq 'mark whitespace-active-style)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1563 (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
1564
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1565
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1566 (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
1567 "Turn on color 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
1568 (when whitespace-active-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
1569 (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
1570 (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
1571 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
1572 (copy-sequence font-lock-keywords)))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1573 ;; turn off 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
1574 (setq whitespace-font-lock-mode 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
1575 (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
1576 ;; add whitespace-mode color into 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
1577 (when (memq 'spaces whitespace-active-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
1578 (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
1579 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
1580 (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
1581 ;; Show SPACEs
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1582 (list whitespace-space-regexp 1 whitespace-space t)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1583 ;; 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
1584 (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
1585 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
1586 (when (memq 'tabs whitespace-active-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
1587 (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
1588 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
1589 (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
1590 ;; Show TABs
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1591 (list whitespace-tab-regexp 1 whitespace-tab t))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1592 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
1593 (when (memq 'trailing whitespace-active-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
1594 (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
1595 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
1596 (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
1597 ;; Show 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
1598 (list (concat "\\(\\(" whitespace-trailing-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
1599 1 whitespace-trailing 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
1600 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
1601 (when (or (memq 'lines whitespace-active-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
1602 (memq 'lines-tail whitespace-active-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
1603 (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
1604 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
1605 (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
1606 ;; 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
1607 (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
1608 (format
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1609 "^\\([^\t\n]\\{%s\\}\\|[^\t\n]\\{0,%s\\}\t\\)\\{%d\\}%s\\(.+\\)$"
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1610 tab-width (1- tab-width)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1611 (/ whitespace-line-column tab-width)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1612 (let ((rem (% whitespace-line-column tab-width)))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1613 (if (zerop rem)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1614 ""
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1615 (format ".\\{%d\\}" rem))))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1616 (if (memq 'lines whitespace-active-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
1617 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
1618 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
1619 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
1620 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
1621 (when (memq 'space-before-tab whitespace-active-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
1622 (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
1623 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
1624 (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
1625 ;; Show 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
1626 (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
1627 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
1628 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
1629 (when (memq 'indentation whitespace-active-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
1630 (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
1631 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
1632 (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
1633 ;; Show indentation 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
1634 (list whitespace-indentation-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
1635 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
1636 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
1637 (when (memq 'empty whitespace-active-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
1638 (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
1639 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
1640 (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
1641 ;; Show empty lines at beginning of buffer
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1642 (list whitespace-empty-at-bob-regexp
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1643 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
1644 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
1645 (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
1646 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
1647 (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
1648 ;; Show empty lines at end of buffer
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1649 (list whitespace-empty-at-eob-regexp
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1650 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
1651 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
1652 (when (memq 'space-after-tab whitespace-active-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
1653 (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
1654 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
1655 (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
1656 ;; Show SPACEs after TAB
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1657 (list whitespace-space-after-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
1658 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
1659 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
1660 ;; 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
1661 (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
1662
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1663
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1664 (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
1665 "Turn off color 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
1666 (when whitespace-active-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
1667 ;; turn off 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
1668 (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
1669 (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
1670 (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
1671 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
1672 ;; 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
1673 (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
1674
1662791e8fd8 Rename blank-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
1662791e8fd8 Rename blank-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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1677 ;;;; 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
1678
1662791e8fd8 Rename blank-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 (defvar whitespace-display-table 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
1681 "Used to save 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
1682 (make-variable-buffer-local '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
1683
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1684 (defvar 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
1685 "Used to remember whether a buffer initially had 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
1686 (make-variable-buffer-local '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
1687
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1688
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1689 (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
1690 ;; 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
1691 (or (< char 256)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1692 (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
1693
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1694
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1695 (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
1696 "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
1697 (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
1698 (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
1699 (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
1700 (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
1701 (< 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
1702
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1703
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1704 (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
1705 "Turn on 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
1706 (when 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
1707 (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
1708 ;; 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
1709 (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
1710 (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
1711 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
1712 (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
1713 (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
1714 (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
1715 (dolist (entry 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
1716 (setq vecs (cdr entry))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1717 ;; Get a displayable 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
1718 (while (and vecs
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1719 (not (whitespace-display-vector-p (car vecs))))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1720 (setq vecs (cdr vecs)))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1721 ;; Display a valid 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
1722 (when vecs
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1723 (setq vec (copy-sequence (car vecs)))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1724 (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
1725 ;; Any char except 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
1726 ((not (eq (car entry) ?\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
1727 (aset buffer-display-table (car entry) 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
1728 ;; Newline char - display 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
1729 ((memq 'newline whitespace-active-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
1730 ;; Only insert face bits on NEWLINE char mapping to avoid
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1731 ;; obstruction of other faces like TABs and (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
1732 ;; faces, font-lock faces, etc.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1733 (when (memq 'color whitespace-active-style)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1734 (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
1735 ;; Due to limitations of glyph representation, the 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
1736 ;; code can not be above ?\x1FFFF. Probably, this 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
1737 ;; be fixed after Emacs unicode merging.
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1738 (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
1739 (> (aref vec i) #x1FFFF)
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1740 (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
1741 (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
1742 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
1743 ;; 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
1744 (aset buffer-display-table (car entry) 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
1745 ;; Newline char - don't display 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
1746 (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
1747 ;; Do nothing
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1748 )))))))
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1749
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1750
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1751 (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
1752 "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
1753 (and 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
1754 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
1755 (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
1756 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
1757
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1758
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1759 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1760
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1761
88115
becc5f138486 (global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents: 88113
diff changeset
1762 (defun whitespace-unload-function ()
becc5f138486 (global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents: 88113
diff changeset
1763 "Unload the Whitespace library."
becc5f138486 (global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents: 88113
diff changeset
1764 (global-whitespace-mode -1)
becc5f138486 (global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents: 88113
diff changeset
1765 ;; continue standard unloading
becc5f138486 (global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents: 88113
diff changeset
1766 nil)
becc5f138486 (global-whitespace-mode): When turning off the global mode,
Juanma Barranquero <lekktu@gmail.com>
parents: 88113
diff changeset
1767
88097
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1768 (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
1769
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1770
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1771 (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
1772
1662791e8fd8 Rename blank-mode.el to whitespace.el and obsolete/whitespace.el to obsolete/old-whitespace.el
Vinicius Jose Latorre <viniciusjl@ig.com.br>
parents:
diff changeset
1773
88100
9623247b8103 Re-use arch-tag from old blank-mode.el for lisp/whitespace.el
Miles Bader <miles@gnu.org>
parents: 88099
diff changeset
1774 ;; 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
1775 ;;; whitespace.el ends here