mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Fix: add-variable-watcher is undefined in 25.
This commit is contained in:
parent
4b22534199
commit
888efb61ec
1 changed files with 8 additions and 6 deletions
|
@ -797,13 +797,15 @@ buffer where knowing the current project directory is important."
|
||||||
(advice-add #'undo-tree-undo :after #'doom-modeline-update-buffer-file-state-icon)
|
(advice-add #'undo-tree-undo :after #'doom-modeline-update-buffer-file-state-icon)
|
||||||
(advice-add #'undo-tree-redo :after #'doom-modeline-update-buffer-file-state-icon)
|
(advice-add #'undo-tree-redo :after #'doom-modeline-update-buffer-file-state-icon)
|
||||||
(advice-add #'narrow-to-region :after #'doom-modeline-update-buffer-file-state-icon)
|
(advice-add #'narrow-to-region :after #'doom-modeline-update-buffer-file-state-icon)
|
||||||
(advice-add #'widen :after #'doom-modeline-update-buffer-file-state-icon)
|
(advice-add
|
||||||
|
#'widen :after #'doom-modeline-update-buffer-file-state-icon)
|
||||||
|
|
||||||
(add-variable-watcher
|
(when (>= emacs-major-version 26)
|
||||||
'buffer-read-only
|
(add-variable-watcher
|
||||||
(lambda (_sym val op _where)
|
'buffer-read-only
|
||||||
(when (and (eq op 'set) (eq val nil))
|
(lambda (_sym _val op _where)
|
||||||
(doom-modeline-update-buffer-file-state-icon))))
|
(when (eq op 'set)
|
||||||
|
(doom-modeline-update-buffer-file-state-icon)))))
|
||||||
|
|
||||||
(defvar-local doom-modeline--buffer-file-name nil)
|
(defvar-local doom-modeline--buffer-file-name nil)
|
||||||
(defun doom-modeline-update-buffer-file-name (&rest _)
|
(defun doom-modeline-update-buffer-file-name (&rest _)
|
||||||
|
|
Loading…
Reference in a new issue