; Improve doc strings in whitespace.el
* lisp/whitespace.el (whitespace-hspace-regexp) (whitespace-space-regexp, whitespace-tab-regexp) (whitespace-trailing-regexp, whitespace-space-before-tab-regexp) (whitespace-indentation-regexp, whitespace-empty-at-bob-regexp) (whitespace-empty-at-eob-regexp) (whitespace-space-after-tab-regexp) (whitespace-big-indent-regexp, whitespace-line-column) (whitespace-display-mappings, whitespace-global-modes) (whitespace-action, whitespace-style, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-space-before-tab, whitespace-indentation) (whitespace-big-indent, whitespace-empty) (whitespace-space-after-tab): Doc fixes.
This commit is contained in:
parent
f1f4a0c9d2
commit
510020d30d
1 changed files with 161 additions and 125 deletions
|
@ -272,120 +272,117 @@
|
||||||
indentation empty space-after-tab
|
indentation empty space-after-tab
|
||||||
space-mark tab-mark newline-mark
|
space-mark tab-mark newline-mark
|
||||||
missing-newline-at-eof)
|
missing-newline-at-eof)
|
||||||
"Specify which kind of blank is visualized.
|
"Determine the kinds of whitespace are visualized.
|
||||||
|
|
||||||
It's a list containing some or all of the following values:
|
The value is a list containing one or more of the following symbols:
|
||||||
|
|
||||||
face enable all visualization via faces (see below).
|
face visualize by using faces (see below).
|
||||||
|
|
||||||
trailing trailing blanks are visualized via faces.
|
trailing visualize trailing blanks via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
tabs TABs are visualized via faces.
|
tabs visualize TABs via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
spaces SPACEs and HARD SPACEs are visualized via
|
spaces visualize SPACEs and HARD SPACEs via
|
||||||
faces.
|
faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
lines lines which have columns beyond
|
lines highlight lines which have columns beyond
|
||||||
`whitespace-line-column' are highlighted via
|
`whitespace-line-column' via faces.
|
||||||
faces.
|
|
||||||
Whole line is highlighted.
|
Whole line is highlighted.
|
||||||
It has precedence over `lines-tail' (see
|
This has precedence over `lines-tail' (see
|
||||||
below).
|
below).
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
lines-tail lines which have columns beyond
|
lines-tail highlighted lines which have columns beyond
|
||||||
`whitespace-line-column' are highlighted via
|
`whitespace-line-column' via faces.
|
||||||
faces.
|
Only the part of line which goes beyond
|
||||||
But only the part of line which goes
|
`whitespace-line-column' column.
|
||||||
beyond `whitespace-line-column' column.
|
This has effect only if `lines' (see above)
|
||||||
It has effect only if `lines' (see above)
|
is NOT present in `whitespace-style',
|
||||||
is not present in `whitespace-style'
|
and if `face' (see above) IS present in
|
||||||
and if `face' (see above) is present in
|
|
||||||
`whitespace-style'.
|
`whitespace-style'.
|
||||||
|
|
||||||
newline NEWLINEs are visualized via faces.
|
newline visualize NEWLINEs via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
missing-newline-at-eof Missing newline at the end of the file is
|
missing-newline-at-eof visualize missing newline at the end of
|
||||||
visualized via faces.
|
the file via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
empty empty lines at beginning and/or end of buffer
|
empty visualize empty lines at beginning and/or
|
||||||
are visualized via faces.
|
end of buffer via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
indentation::tab `tab-width' or more SPACEs at beginning of line
|
indentation::tab visualize `tab-width' or more SPACEs at
|
||||||
are visualized via faces.
|
beginning of line via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
indentation::space TABs at beginning of line are visualized via
|
indentation::space visualize TABs at beginning of line via
|
||||||
faces.
|
faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
indentation `tab-width' or more SPACEs at beginning of line
|
indentation visualize `tab-width' or more SPACEs at
|
||||||
are visualized, if `indent-tabs-mode' (which
|
beginning of line, if `indent-tabs-mode' (which
|
||||||
see) is non-nil; otherwise, TABs at beginning
|
see) is non-nil; otherwise, visualize TABs
|
||||||
of line are visualized via faces.
|
at beginning of line via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
big-indent Big indentations are visualized via faces.
|
big-indent visualize big indentations via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
space-after-tab::tab `tab-width' or more SPACEs after a TAB
|
space-after-tab::tab visualize `tab-width' or more SPACEs
|
||||||
are visualized via faces.
|
after a TAB via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
space-after-tab::space TABs are visualized when `tab-width' or
|
space-after-tab::space visualize TABs when `tab-width' or
|
||||||
more SPACEs occur after a TAB, via
|
more SPACEs occur after a TAB, via
|
||||||
faces.
|
faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
space-after-tab `tab-width' or more SPACEs after a TAB
|
space-after-tab visualize `tab-width' or more SPACEs
|
||||||
are visualized, if `indent-tabs-mode'
|
after a TAB, if `indent-tabs-mode'
|
||||||
(which see) is non-nil; otherwise,
|
(which see) is non-nil; otherwise,
|
||||||
the TABs are visualized via faces.
|
visualize the TABs via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
space-before-tab::tab SPACEs before TAB are visualized via
|
space-before-tab::tab visualize SPACEs before TAB via faces.
|
||||||
faces.
|
This has effect only if `face' (see above)
|
||||||
It has effect only if `face' (see above)
|
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
space-before-tab::space TABs are visualized when SPACEs occur
|
space-before-tab::space visualize TABs when SPACEs occur
|
||||||
before TAB, via faces.
|
before TAB, via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
space-before-tab SPACEs before TAB are visualized, if
|
space-before-tab visualize SPACEs before TAB, if
|
||||||
`indent-tabs-mode' (which see) is
|
`indent-tabs-mode' (which see) is
|
||||||
non-nil; otherwise, the TABs are
|
non-nil; otherwise, visualize TABs
|
||||||
visualized via faces.
|
via faces.
|
||||||
It has effect only if `face' (see above)
|
This has effect only if `face' (see above)
|
||||||
is present in `whitespace-style'.
|
is present in `whitespace-style'.
|
||||||
|
|
||||||
space-mark SPACEs and HARD SPACEs are visualized via
|
space-mark visualize SPACEs and HARD SPACEs via
|
||||||
display table.
|
display table.
|
||||||
|
|
||||||
tab-mark TABs are visualized via display table.
|
tab-mark visualize TABs via display table.
|
||||||
|
|
||||||
newline-mark NEWLINEs are visualized via display table.
|
newline-mark visualize NEWLINEs via display table.
|
||||||
|
|
||||||
Any other value is ignored.
|
Any other value is ignored.
|
||||||
|
|
||||||
|
@ -395,8 +392,7 @@ via display table.
|
||||||
There is an evaluation order for some values, if they are
|
There is an evaluation order for some values, if they are
|
||||||
included in `whitespace-style' list. For example, if
|
included in `whitespace-style' list. For example, if
|
||||||
indentation, indentation::tab and/or indentation::space are
|
indentation, indentation::tab and/or indentation::space are
|
||||||
included in `whitespace-style' list. The evaluation order for
|
included in `whitespace-style' list, the evaluation order is:
|
||||||
these values is:
|
|
||||||
|
|
||||||
* For indentation:
|
* For indentation:
|
||||||
1. indentation
|
1. indentation
|
||||||
|
@ -467,7 +463,9 @@ Used when `whitespace-style' includes the value `spaces'.")
|
||||||
(((class color) (background light))
|
(((class color) (background light))
|
||||||
:background "LightYellow" :foreground "lightgray")
|
:background "LightYellow" :foreground "lightgray")
|
||||||
(t :inverse-video t))
|
(t :inverse-video t))
|
||||||
"Face used to visualize SPACE."
|
"Face used to visualize SPACE.
|
||||||
|
|
||||||
|
See `whitespace-space-regexp'."
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
|
@ -482,7 +480,9 @@ Used when `whitespace-style' includes the value `spaces'.")
|
||||||
(((class color) (background light))
|
(((class color) (background light))
|
||||||
:background "LemonChiffon3" :foreground "lightgray")
|
:background "LemonChiffon3" :foreground "lightgray")
|
||||||
(t :inverse-video t))
|
(t :inverse-video t))
|
||||||
"Face used to visualize HARD SPACE."
|
"Face used to visualize HARD SPACE.
|
||||||
|
|
||||||
|
See `whitespace-hspace-regexp'."
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
|
@ -498,7 +498,9 @@ Used when `whitespace-style' includes the value `tabs'.")
|
||||||
(((class color) (background light))
|
(((class color) (background light))
|
||||||
:background "beige" :foreground "lightgray")
|
:background "beige" :foreground "lightgray")
|
||||||
(t :inverse-video t))
|
(t :inverse-video t))
|
||||||
"Face used to visualize TAB."
|
"Face used to visualize TAB.
|
||||||
|
|
||||||
|
See `whitespace-tab-regexp'."
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
|
@ -532,7 +534,9 @@ Used when `whitespace-style' includes the value `trailing'.")
|
||||||
'((default :weight bold)
|
'((default :weight bold)
|
||||||
(((class mono)) :inverse-video t :underline t)
|
(((class mono)) :inverse-video t :underline t)
|
||||||
(t :background "red1" :foreground "yellow"))
|
(t :background "red1" :foreground "yellow"))
|
||||||
"Face used to visualize trailing blanks."
|
"Face used to visualize trailing blanks.
|
||||||
|
|
||||||
|
See '`whitespace-trailing-regexp'."
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
|
@ -560,7 +564,9 @@ Used when `whitespace-style' includes the value `space-before-tab'.")
|
||||||
(defface whitespace-space-before-tab
|
(defface whitespace-space-before-tab
|
||||||
'((((class mono)) :inverse-video t :weight bold :underline t)
|
'((((class mono)) :inverse-video t :weight bold :underline t)
|
||||||
(t :background "DarkOrange" :foreground "firebrick"))
|
(t :background "DarkOrange" :foreground "firebrick"))
|
||||||
"Face used to visualize SPACEs before TAB."
|
"Face used to visualize SPACEs before TAB.
|
||||||
|
|
||||||
|
See `whitespace-space-before-tab-regexp'."
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
|
@ -572,13 +578,17 @@ Used when `whitespace-style' includes the value `indentation'.")
|
||||||
(defface whitespace-indentation
|
(defface whitespace-indentation
|
||||||
'((((class mono)) :inverse-video t :weight bold :underline t)
|
'((((class mono)) :inverse-video t :weight bold :underline t)
|
||||||
(t :background "yellow" :foreground "firebrick"))
|
(t :background "yellow" :foreground "firebrick"))
|
||||||
"Face used to visualize `tab-width' or more SPACEs at beginning of line."
|
"Face used to visualize `tab-width' or more SPACEs at beginning of line.
|
||||||
|
|
||||||
|
See `whitespace-indentation-regexp'."
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
(defface whitespace-big-indent
|
(defface whitespace-big-indent
|
||||||
'((((class mono)) :inverse-video t :weight bold :underline t)
|
'((((class mono)) :inverse-video t :weight bold :underline t)
|
||||||
(t :background "red" :foreground "firebrick"))
|
(t :background "red" :foreground "firebrick"))
|
||||||
"Face used to visualize big indentation."
|
"Face used to visualize big indentation.
|
||||||
|
|
||||||
|
See `whitespace-big-indent-regexp'."
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
(defface whitespace-missing-newline-at-eof
|
(defface whitespace-missing-newline-at-eof
|
||||||
|
@ -594,7 +604,9 @@ Used when `whitespace-style' includes the value `empty'.")
|
||||||
(defface whitespace-empty
|
(defface whitespace-empty
|
||||||
'((((class mono)) :inverse-video t :weight bold :underline t)
|
'((((class mono)) :inverse-video t :weight bold :underline t)
|
||||||
(t :background "yellow" :foreground "firebrick" :extend t))
|
(t :background "yellow" :foreground "firebrick" :extend t))
|
||||||
"Face used to visualize empty lines at beginning and/or end of buffer."
|
"Face used to visualize empty lines at beginning and/or end of buffer.
|
||||||
|
|
||||||
|
See `whitespace-empty-at-bob-regexp' and `whitespace-empty-at-eob-regexp."
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
|
@ -607,14 +619,17 @@ Used when `whitespace-style' includes the value `space-after-tab'.")
|
||||||
(defface whitespace-space-after-tab
|
(defface whitespace-space-after-tab
|
||||||
'((((class mono)) :inverse-video t :weight bold :underline t)
|
'((((class mono)) :inverse-video t :weight bold :underline t)
|
||||||
(t :background "yellow" :foreground "firebrick"))
|
(t :background "yellow" :foreground "firebrick"))
|
||||||
"Face used to visualize `tab-width' or more SPACEs after TAB."
|
"Face used to visualize `tab-width' or more SPACEs after TAB.
|
||||||
|
|
||||||
|
See `whitespace-space-after-tab-regexp'."
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
(defcustom whitespace-hspace-regexp
|
(defcustom whitespace-hspace-regexp
|
||||||
"\\(\u00A0+\\)"
|
"\\(\u00A0+\\)"
|
||||||
"Specify HARD SPACE characters regexp.
|
"Regexp to match HARD SPACE characters that should be visualized.
|
||||||
|
|
||||||
|
The HARD SPACE characters are highlighted using the `whitespace-hspace' face.
|
||||||
Here are some examples:
|
Here are some examples:
|
||||||
|
|
||||||
\"\\\\(^\\xA0+\\\\)\" \
|
\"\\\\(^\\xA0+\\\\)\" \
|
||||||
|
@ -626,19 +641,21 @@ visualize leading and/or trailing HARD SPACEs.
|
||||||
\"\\t\\\\(\\xA0+\\\\)\\t\" \
|
\"\\t\\\\(\\xA0+\\\\)\\t\" \
|
||||||
visualize only HARD SPACEs between TABs.
|
visualize only HARD SPACEs between TABs.
|
||||||
|
|
||||||
NOTE: Enclose always by \\\\( and \\\\) the elements to highlight.
|
NOTE: Always enclose the elements to highlight in \\\\(...\\\\).
|
||||||
Use exactly one pair of enclosing \\\\( and \\\\).
|
Use exactly one pair of enclosing \\\\( and \\\\).
|
||||||
|
|
||||||
Used when `whitespace-style' includes `spaces'."
|
This variable is used when `whitespace-style' includes `spaces'."
|
||||||
:type '(regexp :tag "HARD SPACE Chars")
|
:type '(regexp :tag "HARD SPACE Chars")
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
(defcustom whitespace-space-regexp "\\( +\\)"
|
(defcustom whitespace-space-regexp "\\( +\\)"
|
||||||
"Specify SPACE characters regexp.
|
"Regexp to match SPACE characters that should be visualized.
|
||||||
|
|
||||||
If you're using `mule' package, there may be other characters
|
The SPACE characters are highlighted using the `whitespace-space' face.
|
||||||
besides \" \" that should be considered SPACE.
|
By default only ASCII SPACE character is visualized, but if you
|
||||||
|
are typing in some non-Latin language, there may be other
|
||||||
|
characters besides \" \" that should be considered SPACE.
|
||||||
|
|
||||||
Here are some examples:
|
Here are some examples:
|
||||||
|
|
||||||
|
@ -648,19 +665,21 @@ Here are some examples:
|
||||||
visualize leading and/or trailing SPACEs.
|
visualize leading and/or trailing SPACEs.
|
||||||
\"\\t\\\\( +\\\\)\\t\" visualize only SPACEs between TABs.
|
\"\\t\\\\( +\\\\)\\t\" visualize only SPACEs between TABs.
|
||||||
|
|
||||||
NOTE: Enclose always by \\\\( and \\\\) the elements to highlight.
|
NOTE: Always enclose the elements to highlight in \\\\(...\\\\).
|
||||||
Use exactly one pair of enclosing \\\\( and \\\\).
|
Use exactly one pair of enclosing \\\\( and \\\\).
|
||||||
|
|
||||||
Used when `whitespace-style' includes `spaces'."
|
This variable is used when `whitespace-style' includes `spaces'."
|
||||||
:type '(regexp :tag "SPACE Chars")
|
:type '(regexp :tag "SPACE Chars")
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
(defcustom whitespace-tab-regexp "\\(\t+\\)"
|
(defcustom whitespace-tab-regexp "\\(\t+\\)"
|
||||||
"Specify TAB characters regexp.
|
"Regexp to match TAB characters that should be visualized.
|
||||||
|
|
||||||
If you're using `mule' package, there may be other characters
|
The TAB characters are highlighted using the `whitespace-tab' face.
|
||||||
besides \"\\t\" that should be considered TAB.
|
By default only ASCII TAB character is visualized, but if you
|
||||||
|
are typing in some non-Latin language, there may be other
|
||||||
|
characters besides \" \" that should be considered a TAB.
|
||||||
|
|
||||||
Here are some examples:
|
Here are some examples:
|
||||||
|
|
||||||
|
@ -670,37 +689,40 @@ Here are some examples:
|
||||||
visualize leading and/or trailing TABs.
|
visualize leading and/or trailing TABs.
|
||||||
\" \\\\(\\t+\\\\) \" visualize only TABs between SPACEs.
|
\" \\\\(\\t+\\\\) \" visualize only TABs between SPACEs.
|
||||||
|
|
||||||
NOTE: Enclose always by \\\\( and \\\\) the elements to highlight.
|
NOTE: Always enclose the elements to highlight in \\\\(...\\\\).
|
||||||
Use exactly one pair of enclosing \\\\( and \\\\).
|
Use exactly one pair of enclosing \\\\( and \\\\).
|
||||||
|
|
||||||
Used when `whitespace-style' includes `tabs'."
|
This variable is used when `whitespace-style' includes `tabs'."
|
||||||
:type '(regexp :tag "TAB Chars")
|
:type '(regexp :tag "TAB Chars")
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
(defcustom whitespace-trailing-regexp
|
(defcustom whitespace-trailing-regexp
|
||||||
"\\([\t \u00A0]+\\)$"
|
"\\([\t \u00A0]+\\)$"
|
||||||
"Specify trailing characters regexp.
|
"Regexp to match trailing characters that should be visualized.
|
||||||
|
|
||||||
|
The trailing characters are highlighted using the `whitespace-trailing' face.
|
||||||
There may be other characters besides:
|
There may be other characters besides:
|
||||||
|
|
||||||
\" \" \"\\t\" \"\\u00A0\"
|
\" \" \"\\t\" \"\\u00A0\"
|
||||||
|
|
||||||
that should be considered blank.
|
that should be considered blank.
|
||||||
|
|
||||||
NOTE: Enclose always by \"\\\\(\" and \"\\\\)$\" the elements to highlight.
|
NOTE: Always enclose the elements to highlight in \"\\\\(\"...\"\\\\)$\".
|
||||||
Use exactly one pair of enclosing elements above.
|
Use exactly one pair of enclosing elements above.
|
||||||
|
|
||||||
Used when `whitespace-style' includes `trailing'."
|
This variable is used when `whitespace-style' includes `trailing'."
|
||||||
:type '(regexp :tag "Trailing Chars")
|
:type '(regexp :tag "Trailing Chars")
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
(defcustom whitespace-space-before-tab-regexp "\\( +\\)\\(\t+\\)"
|
(defcustom whitespace-space-before-tab-regexp "\\( +\\)\\(\t+\\)"
|
||||||
"Specify SPACEs before TAB regexp.
|
"Regexp to match SPACEs before TAB that should be visualized.
|
||||||
|
|
||||||
Used when `whitespace-style' includes `space-before-tab',
|
The SPACE characters are highlighted using the `whitespace-space-before-tab'
|
||||||
`space-before-tab::tab' or `space-before-tab::space'."
|
face.
|
||||||
|
This variable is used when `whitespace-style' includes
|
||||||
|
`space-before-tab', `space-before-tab::tab' or `space-before-tab::space'."
|
||||||
:type '(regexp :tag "SPACEs Before TAB")
|
:type '(regexp :tag "SPACEs Before TAB")
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
@ -708,12 +730,15 @@ Used when `whitespace-style' includes `space-before-tab',
|
||||||
(defcustom whitespace-indentation-regexp
|
(defcustom whitespace-indentation-regexp
|
||||||
'("^\t*\\(\\( \\{%d\\}\\)+\\)[^\n\t]"
|
'("^\t*\\(\\( \\{%d\\}\\)+\\)[^\n\t]"
|
||||||
. "^ *\\(\t+\\)[^\n]")
|
. "^ *\\(\t+\\)[^\n]")
|
||||||
"Specify regexp for `tab-width' or more SPACEs at beginning of line.
|
"Regexps to match indentation whitespace that should be visualized.
|
||||||
|
|
||||||
It is a cons where the cons car is used for SPACEs visualization
|
The value should be a cons whose car specifies the regexp to match
|
||||||
and the cons cdr is used for TABs visualization.
|
visualization of SPACEs, and the cdr specifies the regexp to match
|
||||||
|
visualization of TABs.
|
||||||
|
|
||||||
Used when `whitespace-style' includes `indentation',
|
The indentation characters are highlighted using the `whitespace-indentationp'
|
||||||
|
face.
|
||||||
|
This variable is used when `whitespace-style' includes `indentation',
|
||||||
`indentation::tab' or `indentation::space'."
|
`indentation::tab' or `indentation::space'."
|
||||||
:type '(cons (string :tag "Indentation SPACEs")
|
:type '(cons (string :tag "Indentation SPACEs")
|
||||||
(regexp :tag "Indentation TABs"))
|
(regexp :tag "Indentation TABs"))
|
||||||
|
@ -721,17 +746,19 @@ Used when `whitespace-style' includes `indentation',
|
||||||
|
|
||||||
|
|
||||||
(defcustom whitespace-empty-at-bob-regexp "\\`\\(\\([ \t]*\n\\)+\\)"
|
(defcustom whitespace-empty-at-bob-regexp "\\`\\(\\([ \t]*\n\\)+\\)"
|
||||||
"Specify regexp for empty lines at beginning of buffer.
|
"Regexp to match empty lines at beginning of buffer that should be visualized.
|
||||||
|
|
||||||
Used when `whitespace-style' includes `empty'."
|
The empty lines are highlighted using the `whitespace-empty' face.
|
||||||
|
This variable is used when `whitespace-style' includes `empty'."
|
||||||
:type '(regexp :tag "Empty Lines At Beginning Of Buffer")
|
:type '(regexp :tag "Empty Lines At Beginning Of Buffer")
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
(defcustom whitespace-empty-at-eob-regexp "^\\([ \t\n]+\\)\\'"
|
(defcustom whitespace-empty-at-eob-regexp "^\\([ \t\n]+\\)\\'"
|
||||||
"Specify regexp for empty lines at end of buffer.
|
"Regexp to match empty lines at end of buffer that should be visualized.
|
||||||
|
|
||||||
Used when `whitespace-style' includes `empty'."
|
The empty lines are highlighted using the `whitespace-empty' face.
|
||||||
|
This variable is used when `whitespace-style' includes `empty'."
|
||||||
:type '(regexp :tag "Empty Lines At End Of Buffer")
|
:type '(regexp :tag "Empty Lines At End Of Buffer")
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
@ -739,12 +766,16 @@ Used when `whitespace-style' includes `empty'."
|
||||||
(defcustom whitespace-space-after-tab-regexp
|
(defcustom whitespace-space-after-tab-regexp
|
||||||
'("\t+\\(\\( \\{%d,\\}\\)+\\)"
|
'("\t+\\(\\( \\{%d,\\}\\)+\\)"
|
||||||
. "\\(\t+\\) \\{%d,\\}")
|
. "\\(\t+\\) \\{%d,\\}")
|
||||||
"Specify regexp for `tab-width' or more SPACEs after TAB.
|
"Regexps to match multiple SPACEs after TAB that should be visualized.
|
||||||
|
|
||||||
It is a cons where the cons car is used for SPACEs visualization
|
The SPACE and TAB characters will be visualized if there at least
|
||||||
and the cons cdr is used for TABs visualization.
|
as many SPACEs as `tab-width' after a TAB.
|
||||||
|
The value should be a cons whose car is used for SPACEs visualization
|
||||||
|
and whose cdr is used for TABs visualization.
|
||||||
|
|
||||||
Used when `whitespace-style' includes `space-after-tab',
|
The SPACE characters are highlighted using the `whitespace-space-after-tab'
|
||||||
|
face.
|
||||||
|
This variable is used when `whitespace-style' includes `space-after-tab',
|
||||||
`space-after-tab::tab' or `space-after-tab::space'."
|
`space-after-tab::tab' or `space-after-tab::space'."
|
||||||
:type '(cons (string :tag "SPACEs After TAB")
|
:type '(cons (string :tag "SPACEs After TAB")
|
||||||
string)
|
string)
|
||||||
|
@ -752,27 +783,33 @@ Used when `whitespace-style' includes `space-after-tab',
|
||||||
|
|
||||||
(defcustom whitespace-big-indent-regexp
|
(defcustom whitespace-big-indent-regexp
|
||||||
"^\\(\\(?:\t\\{4,\\}\\| \\{32,\\}\\)[\t ]*\\)"
|
"^\\(\\(?:\t\\{4,\\}\\| \\{32,\\}\\)[\t ]*\\)"
|
||||||
"Specify big indentation regexp.
|
"Regexp to match big indentation at BOL that should be visualized.
|
||||||
|
|
||||||
If you're using `mule' package, there may be other characters
|
The indentation characters are highlighted using the `whitespace-big-indent'
|
||||||
besides \"\\t\" that should be considered TAB.
|
face.
|
||||||
|
If you're using non-Latin languages, there may be other characters
|
||||||
|
besides \"\\t\" that should be considered a TAB.
|
||||||
|
|
||||||
NOTE: Enclose always by \\\\( and \\\\) the elements to highlight.
|
NOTE: Always enclose the elements to highlight in \\\\(...\\\\).
|
||||||
Use exactly one pair of enclosing \\\\( and \\\\).
|
Use exactly one pair of enclosing \\\\( and \\\\).
|
||||||
|
|
||||||
Used when `whitespace-style' includes `big-indent'."
|
This variable is used when `whitespace-style' includes `big-indent'."
|
||||||
:version "25.1"
|
:version "25.1"
|
||||||
:type '(regexp :tag "Detect too much indentation at the beginning of a line")
|
:type '(regexp :tag "Detect too much indentation at the beginning of a line")
|
||||||
:group 'whitespace)
|
:group 'whitespace)
|
||||||
|
|
||||||
|
|
||||||
(defcustom whitespace-line-column 80
|
(defcustom whitespace-line-column 80
|
||||||
"Specify column beyond which the line is highlighted.
|
"Column beyond which the line is highlighted.
|
||||||
|
|
||||||
It must be an integer or nil. If nil, the `fill-column' variable value is
|
The value must be an integer or nil. If nil, use the value
|
||||||
used.
|
of the `fill-column' variable.
|
||||||
|
|
||||||
Used when `whitespace-style' includes `lines' or `lines-tail'."
|
The characters beyond the column specified by this variable are
|
||||||
|
highlighted using the `whitespace-line' face.
|
||||||
|
|
||||||
|
This varioable is used when `whitespace-style' includes `lines'
|
||||||
|
or `lines-tail' or `lines-char'."
|
||||||
:type '(choice :tag "Line Length Limit"
|
:type '(choice :tag "Line Length Limit"
|
||||||
(integer :tag "Line Length")
|
(integer :tag "Line Length")
|
||||||
(const :tag "Use fill-column" nil))
|
(const :tag "Use fill-column" nil))
|
||||||
|
@ -800,7 +837,7 @@ Used when `whitespace-style' includes `lines' or `lines-tail'."
|
||||||
;; If this is a problem for you, please, comment the line below.
|
;; If this is a problem for you, please, comment the line below.
|
||||||
(tab-mark ?\t [?» ?\t] [?\\ ?\t]) ; tab - right guillemet
|
(tab-mark ?\t [?» ?\t] [?\\ ?\t]) ; tab - right guillemet
|
||||||
)
|
)
|
||||||
"Specify an alist of mappings for displaying characters.
|
"Alist of mappings for displaying characters.
|
||||||
|
|
||||||
Each element has the following form:
|
Each element has the following form:
|
||||||
|
|
||||||
|
@ -820,15 +857,15 @@ KIND is the kind of character.
|
||||||
CHAR is the character to be mapped.
|
CHAR is the character to be mapped.
|
||||||
|
|
||||||
VECTOR is a vector of characters to be displayed in place of CHAR.
|
VECTOR is a vector of characters to be displayed in place of CHAR.
|
||||||
The first display vector that can be displayed is used;
|
The first vector that can be displayed by the terminal is used;
|
||||||
if no display vector for a mapping can be displayed, then
|
if no display vector for a mapping can be displayed, then
|
||||||
that character is displayed unmodified.
|
that character is displayed unmodified.
|
||||||
|
|
||||||
The NEWLINE character is displayed using the face given by
|
The NEWLINE character is displayed using the face given by
|
||||||
`whitespace-newline' variable.
|
`whitespace-newline' variable.
|
||||||
|
|
||||||
Used when `whitespace-style' includes `tab-mark', `space-mark' or
|
This variable is used when `whitespace-style' includes `tab-mark',
|
||||||
`newline-mark'."
|
`space-mark' or `newline-mark'."
|
||||||
:type '(repeat
|
:type '(repeat
|
||||||
(list :tag "Character Mapping"
|
(list :tag "Character Mapping"
|
||||||
(choice :tag "Char Kind"
|
(choice :tag "Char Kind"
|
||||||
|
@ -850,8 +887,7 @@ Used when `whitespace-style' includes `tab-mark', `space-mark' or
|
||||||
Global `whitespace-mode' is controlled by the command
|
Global `whitespace-mode' is controlled by the command
|
||||||
`global-whitespace-mode'.
|
`global-whitespace-mode'.
|
||||||
|
|
||||||
If nil, means no modes have `whitespace-mode' automatically
|
If nil, no modes have `whitespace-mode' automatically turned on.
|
||||||
turned on.
|
|
||||||
|
|
||||||
If t, all modes that support `whitespace-mode' have it
|
If t, all modes that support `whitespace-mode' have it
|
||||||
automatically turned on.
|
automatically turned on.
|
||||||
|
@ -878,16 +914,16 @@ C++ modes only."
|
||||||
(defcustom whitespace-action nil
|
(defcustom whitespace-action nil
|
||||||
"Specify which action is taken when a buffer is visited or written.
|
"Specify which action is taken when a buffer is visited or written.
|
||||||
|
|
||||||
It's a list containing some or all of the following values:
|
The value is a list containing one or more of the following symbols:
|
||||||
|
|
||||||
nil no action is taken.
|
nil no action is taken.
|
||||||
|
|
||||||
cleanup cleanup any bogus whitespace always when local
|
cleanup always cleanup any bogus whitespace when local
|
||||||
whitespace is turned on.
|
whitespace is turned on.
|
||||||
See `whitespace-cleanup' and
|
See `whitespace-cleanup' and
|
||||||
`whitespace-cleanup-region'.
|
`whitespace-cleanup-region'.
|
||||||
|
|
||||||
report-on-bogus report if there is any bogus whitespace always
|
report-on-bogus always report if there is any bogus whitespace
|
||||||
when local whitespace is turned on.
|
when local whitespace is turned on.
|
||||||
|
|
||||||
auto-cleanup cleanup any bogus whitespace when buffer is
|
auto-cleanup cleanup any bogus whitespace when buffer is
|
||||||
|
@ -895,8 +931,8 @@ It's a list containing some or all of the following values:
|
||||||
See `whitespace-cleanup' and
|
See `whitespace-cleanup' and
|
||||||
`whitespace-cleanup-region'.
|
`whitespace-cleanup-region'.
|
||||||
|
|
||||||
abort-on-bogus abort if there is any bogus whitespace and the
|
abort-on-bogus signal an error when writing the buffer if there is
|
||||||
buffer is written.
|
any bogus whitespace in the buffer.
|
||||||
|
|
||||||
warn-if-read-only give a warning if `cleanup' or `auto-cleanup'
|
warn-if-read-only give a warning if `cleanup' or `auto-cleanup'
|
||||||
is included in `whitespace-action' and the
|
is included in `whitespace-action' and the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue