Variable: whitespace-action
whitespace-action is a customizable variable defined in
whitespace.el.gz.
Value
nil
Documentation
Specify which action is taken when a buffer is visited or written.
The value is a list containing one or more of the following symbols:
nil no action is taken.
cleanup always cleanup any bogus whitespace when local
whitespace is turned on.
See whitespace-cleanup and
whitespace-cleanup-region.
report-on-bogus always report if there is any bogus whitespace
when local whitespace is turned on.
auto-cleanup cleanup any bogus whitespace when buffer is
written.
See whitespace-cleanup and
whitespace-cleanup-region.
abort-on-bogus signal an error when writing the buffer if there is
any bogus whitespace in the buffer.
warn-if-read-only give a warning if cleanup or auto-cleanup
is included in whitespace-action and the
buffer is read-only.
Any other value is treated as nil.
Probably introduced at or before Emacs version 23.1.
Source Code
;; Defined in /usr/src/emacs/lisp/whitespace.el.gz
(defcustom whitespace-action nil
"Specify which action is taken when a buffer is visited or written.
The value is a list containing one or more of the following symbols:
nil no action is taken.
cleanup always cleanup any bogus whitespace when local
whitespace is turned on.
See `whitespace-cleanup' and
`whitespace-cleanup-region'.
report-on-bogus always report if there is any bogus whitespace
when local whitespace is turned on.
auto-cleanup cleanup any bogus whitespace when buffer is
written.
See `whitespace-cleanup' and
`whitespace-cleanup-region'.
abort-on-bogus signal an error when writing the buffer if there is
any bogus whitespace in the buffer.
warn-if-read-only give a warning if `cleanup' or `auto-cleanup'
is included in `whitespace-action' and the
buffer is read-only.
Any other value is treated as nil."
:type '(choice :tag "Actions"
(const :tag "None" nil)
(repeat :tag "Action List"
(choice :tag "Action"
(const :tag "Cleanup When On" cleanup)
(const :tag "Report On Bogus" report-on-bogus)
(const :tag "Auto Cleanup" auto-cleanup)
(const :tag "Abort On Bogus" abort-on-bogus)
(const :tag "Warn If Read-Only" warn-if-read-only)))))