Function: visual-wrap-prefix-mode
visual-wrap-prefix-mode is an autoloaded, interactive and
byte-compiled function defined in visual-wrap.el.gz.
Signature
(visual-wrap-prefix-mode &optional ARG)
Documentation
Display continuation lines with prefixes from surrounding context.
To enable this minor mode across all buffers, enable
global-visual-wrap-prefix-mode(var)/global-visual-wrap-prefix-mode(fun).
This is a minor mode. If called interactively, toggle the
Visual-Wrap-Prefix 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 the variable visual-wrap-prefix-mode(var)/visual-wrap-prefix-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
Probably introduced at or before Emacs version 30.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/visual-wrap.el.gz
;;;###autoload
(define-minor-mode visual-wrap-prefix-mode
"Display continuation lines with prefixes from surrounding context.
To enable this minor mode across all buffers, enable
`global-visual-wrap-prefix-mode'."
:lighter ""
:group 'visual-line
(if visual-wrap-prefix-mode
(progn
;; HACK ATTACK! We want to run after font-lock (so our
;; wrap-prefix includes the faces applied by font-lock), but
;; jit-lock-register doesn't accept an `append' argument, so
;; we add ourselves beforehand, to make sure we're at the end
;; of the hook (bug#15155).
(add-hook 'jit-lock-functions
#'visual-wrap-prefix-function 'append t)
(jit-lock-register #'visual-wrap-prefix-function))
(jit-lock-unregister #'visual-wrap-prefix-function)
(with-silent-modifications
(save-restriction
(widen)
(remove-text-properties (point-min) (point-max) '(wrap-prefix nil))))))