Variable: word-wrap-whitespace-mode-hook

word-wrap-whitespace-mode-hook is a customizable variable defined in word-wrap-mode.el.gz.

Value

(word-wrap-whitespace-mode-set-explicitly(var)/word-wrap-whitespace-mode-set-explicitly(fun))

Documentation

Hook run after entering or leaving word-wrap-whitespace-mode(var)/word-wrap-whitespace-mode(fun).

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

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))))