mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Make after-change-functions to buffer-local hook.
Close #184. If an unhandled error happens in running these functions, the variable’s value remains nil. That prevents the error from happening repeatedly and making Emacs nonfunctional.
This commit is contained in:
parent
c12ba0edfc
commit
bafe20a171
1 changed files with 2 additions and 2 deletions
|
@ -293,7 +293,7 @@ Uses `all-the-icons-material' to fetch the icon."
|
||||||
(add-hook 'after-revert-hook #'doom-modeline-update-buffer-file-state-icon)
|
(add-hook 'after-revert-hook #'doom-modeline-update-buffer-file-state-icon)
|
||||||
(add-hook 'after-save-hook #'doom-modeline-update-buffer-file-state-icon)
|
(add-hook 'after-save-hook #'doom-modeline-update-buffer-file-state-icon)
|
||||||
(add-hook 'read-only-mode-hook #'doom-modeline-update-buffer-file-state-icon)
|
(add-hook 'read-only-mode-hook #'doom-modeline-update-buffer-file-state-icon)
|
||||||
(add-hook 'after-change-functions #'doom-modeline-update-buffer-file-state-icon)
|
(add-hook 'after-change-functions #'doom-modeline-update-buffer-file-state-icon nil t)
|
||||||
(add-hook 'clone-indirect-buffer-hook #'doom-modeline-update-buffer-file-state-icon)
|
(add-hook 'clone-indirect-buffer-hook #'doom-modeline-update-buffer-file-state-icon)
|
||||||
(add-hook 'evil-insert-state-exit-hook #'doom-modeline-update-buffer-file-state-icon)
|
(add-hook 'evil-insert-state-exit-hook #'doom-modeline-update-buffer-file-state-icon)
|
||||||
(advice-add #'undo :after #'doom-modeline-update-buffer-file-state-icon)
|
(advice-add #'undo :after #'doom-modeline-update-buffer-file-state-icon)
|
||||||
|
@ -340,7 +340,7 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
|
||||||
(add-hook 'find-file-hook #'doom-modeline-update-buffer-file-name)
|
(add-hook 'find-file-hook #'doom-modeline-update-buffer-file-name)
|
||||||
(add-hook 'after-revert-hook #'doom-modeline-update-buffer-file-name)
|
(add-hook 'after-revert-hook #'doom-modeline-update-buffer-file-name)
|
||||||
(add-hook 'after-save-hook #'doom-modeline-update-buffer-file-name)
|
(add-hook 'after-save-hook #'doom-modeline-update-buffer-file-name)
|
||||||
(add-hook 'after-change-functions #'doom-modeline-update-buffer-file-name)
|
(add-hook 'after-change-functions #'doom-modeline-update-buffer-file-name nil t)
|
||||||
(add-hook 'clone-indirect-buffer-hook #'doom-modeline-update-buffer-file-name)
|
(add-hook 'clone-indirect-buffer-hook #'doom-modeline-update-buffer-file-name)
|
||||||
(add-hook 'evil-insert-state-exit-hook #'doom-modeline-update-buffer-file-name)
|
(add-hook 'evil-insert-state-exit-hook #'doom-modeline-update-buffer-file-name)
|
||||||
(advice-add #'rename-buffer :after #'doom-modeline-update-buffer-file-name)
|
(advice-add #'rename-buffer :after #'doom-modeline-update-buffer-file-name)
|
||||||
|
|
Loading…
Reference in a new issue