Variable: word-wrap-whitespace-mode

word-wrap-whitespace-mode is a buffer-local variable defined in word-wrap-mode.el.gz.

Documentation

Non-nil if Word-Wrap-Whitespace mode is enabled.

Use the command word-wrap-whitespace-mode(var)/word-wrap-whitespace-mode(fun) to change this variable.

View in manual

Probably introduced at or before Emacs version 29.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/word-wrap-mode.el.gz
;;;###autoload
(define-minor-mode word-wrap-whitespace-mode
  "Allow `word-wrap' to fold on all breaking whitespace characters.
The characters to break on are defined by `word-wrap-whitespace-characters'."
  :group 'display
  (if word-wrap-whitespace-mode
      (progn
        (setq-local word-wrap-mode--previous-state
                    (cons (category-table)
                          (buffer-local-set-state
                           word-wrap-by-category t
                           word-wrap t)))
        (set-category-table (copy-category-table))
        (dolist (char word-wrap-whitespace-characters)
          (modify-category-entry char ?|)))
    (set-category-table (car word-wrap-mode--previous-state))
    (buffer-local-restore-state (cdr word-wrap-mode--previous-state))))