emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-remark 2bd53de493 60/67: refactor: Set fn to hook o


From: ELPA Syncer
Subject: [elpa] externals/org-remark 2bd53de493 60/67: refactor: Set fn to hook org-remark-highlights-after-load-functions
Date: Sat, 22 Jul 2023 06:59:04 -0400 (EDT)

branch: externals/org-remark
commit 2bd53de49353739ddf92c9e75a6910e151aac744
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>

    refactor: Set fn to hook org-remark-highlights-after-load-functions
---
 org-remark.el | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 33070306d9..437144a7c1 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -137,10 +137,15 @@ Nil means no icon is to be displayed."
 Nil means no icon is to be displayed."
   :type 'string)
 
-(defcustom org-remark-highlights-after-load-functions nil
+
+(defcustom org-remark-highlights-after-load-functions
+  '(org-remark-highlights-adjust-positions org-remark-highlights-add-icons)
   "Abnormal hook run after `org-remark-highlights-load'.
 It is run with OVERLAYS and NOTES-BUF as arguments. OVERLAYS are
-highlights. It is run with the source buffer as current buffer."
+highlights. It is run with the source buffer as current buffer.
+
+Add-icons should be the last function because other functions may
+do something relevant for an icon -- e.g. adjust-positon."
   :type 'hook)
 
 
@@ -298,13 +303,6 @@ recommended to turn it on as part of Emacs initialization.
       ;; Activate
       (org-remark-highlights-load)
       (add-hook 'after-save-hook #'org-remark-save nil t)
-      (add-hook 'org-remark-highlights-after-load-functions
-                #'org-remark-highlights-adjust-positions)
-      ;; Add-icons should be after all after-load-hook functions because
-      ;; some of them make adjustment that's relevant for an icon --
-      ;; e.g. adjust-positon.
-      (add-hook 'org-remark-highlights-after-load-functions
-                #'org-remark-highlights-add-icons 80)
       (add-hook 'org-remark-highlight-link-to-source-functions
                 #'org-remark-highlight-link-to-source-default 80))
      (t
@@ -314,10 +312,6 @@ recommended to turn it on as part of Emacs initialization.
           (delete-overlay highlight)))
       (setq org-remark-highlights nil)
       (remove-hook 'after-save-hook #'org-remark-save t)
-      (remove-hook 'org-remark-highlights-after-load-functions
-                   #'org-remark-highlights-adjust-positions)
-      (remove-hook 'org-remark-highlights-after-load-functions
-                   #'org-remark-highlights-add-icons)
       (remove-hook 'org-remark-highlight-link-to-source-functions
                    #'org-remark-highlight-link-to-source-default))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]