Function: global-whitespace-newline-mode
global-whitespace-newline-mode is an autoloaded, interactive and
byte-compiled function defined in whitespace.el.gz.
This command is obsolete since 28.1; use global-whitespace-mode(var)/global-whitespace-mode(fun) with
whitespace-style set to (newline-mark newline) instead.
Signature
(global-whitespace-newline-mode &optional ARG)
Documentation
Toggle global newline visualization (Global Whitespace Newline mode).
Use global-whitespace-newline-mode(var)/global-whitespace-newline-mode(fun) only for NEWLINE
visualization exclusively. For other visualizations, including
NEWLINE visualization together with (HARD) SPACEs and/or TABs,
please use global-whitespace-mode(var)/global-whitespace-mode(fun).
See also whitespace-newline and whitespace-display-mappings.
This is a global minor mode. If called interactively, toggle the
Global Whitespace-Newline mode mode. If the prefix argument is
positive, enable the mode, and if it is zero or negative, disable the
mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate (default-value \=global-whitespace-newline-mode)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/whitespace.el.gz
;;;###autoload
(define-minor-mode global-whitespace-newline-mode
"Toggle global newline visualization (Global Whitespace Newline mode).
Use `global-whitespace-newline-mode' only for NEWLINE
visualization exclusively. For other visualizations, including
NEWLINE visualization together with (HARD) SPACEs and/or TABs,
please use `global-whitespace-mode'.
See also `whitespace-newline' and `whitespace-display-mappings'."
:lighter " NL"
:global t
(let ((whitespace-style '(newline-mark newline)))
(global-whitespace-mode (if global-whitespace-newline-mode
1 -1))
;; sync states (running a batch job)
(setq global-whitespace-newline-mode global-whitespace-mode)))