Skip to content

Commit

Permalink
fix: after-revert-hook is wrongly set as global (#74)
Browse files Browse the repository at this point in the history
Function `org-remark-highlights-load' is set to `after-revert-hook'.
Before this fix, it was wrongly set as a global hook. This caused the
hook to call the function wrongly for buffers that do not have
`org-remark-mode` enabled -- it is a local minor mode.
  • Loading branch information
nobiot committed Dec 30, 2023
1 parent dd39fcc commit eaa9dc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions org-remark.el
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
;; URL: https://github.com/nobiot/org-remark
;; Version: 1.2.1
;; Created: 22 December 2020
;; Last modified: 07 October 2023
;; Last modified: 30 December 2023
;; Package-Requires: ((emacs "27.1") (org "9.4"))
;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,

Expand Down Expand Up @@ -366,7 +366,7 @@ recommended to turn it on as part of Emacs initialization.
(add-hook 'after-save-hook #'org-remark-save nil :local)
(add-hook 'org-remark-highlight-link-to-source-functions
#'org-remark-highlight-link-to-source-default 80)
(add-hook 'after-revert-hook #'org-remark-highlights-load :local)
(add-hook 'after-revert-hook #'org-remark-highlights-load 80 :local)
(add-hook 'clone-buffer-hook #'org-remark-highlights-load 80 :local))
(t
;; Deactivate
Expand Down

0 comments on commit eaa9dc7

Please sign in to comment.