]> git.eshelyaron.com Git - emacs.git/commit
whitespace: Redraw if indentation or line length changes
authorRichard Hansen <rhansen@rhansen.org>
Mon, 20 Jun 2022 07:40:38 +0000 (09:40 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 20 Jun 2022 07:41:15 +0000 (09:41 +0200)
commit1172c7303dbce015d12424739a56bfce00e195b1
treef7f099dd6ab7d14bf42222e287bf7f15d1a02f9c
parent382f7920abcf7df46b5b44462c6c71de54454b0e
whitespace: Redraw if indentation or line length changes

* lisp/whitespace.el (whitespace-color-on): Convert the indentation
matcher from a static regular expression to a function so that changes
to `indent-tabs-mode' and `tab-width' are picked up the next time
`font-lock-flush' runs.
(whitespace--indentation-matcher): The new function matcher.
(whitespace--variable-watcher): New variable watcher that calls
`font-lock-flush' if `whitespace-mode' is enabled for the buffer.
(whitespace--watched-vars): List of variables to watch.
(whitespace-unload-function): Un-watch the variables. (bug#56103).
lisp/whitespace.el