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

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

[elpa] externals/org-remark 22eed1f5c2 042/173: fix: om/list-highlights-


From: ELPA Syncer
Subject: [elpa] externals/org-remark 22eed1f5c2 042/173: fix: om/list-highlights-positions
Date: Fri, 28 Jan 2022 16:57:57 -0500 (EST)

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

    fix: om/list-highlights-positions
    
    It was not checking the visibility correctly.
---
 org-marginalia.el | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/org-marginalia.el b/org-marginalia.el
index 94e192d139..050fb0d16d 100644
--- a/org-marginalia.el
+++ b/org-marginalia.el
@@ -384,9 +384,9 @@ buffer, go back to the first one."
   (interactive)
   (if (not om/highlights)
       (progn (message "No highlights present in this buffer.") nil)
-    (if (om/find-next-highlight)
-        (progn (goto-char (om/find-next-highlight)) t)
-      (message "Nothing done. No more visible highlights exist") nil)))
+    (let ((p (om/find-next-highlight)))
+      (if p (progn (goto-char p) t)
+        (message "Nothing done. No more visible highlights exist") nil))))
 
 (defun om/prev ()
   "Look at the current point, and move to the previous highlight, if any.
@@ -394,11 +394,10 @@ If there is none above the point, but there is a 
highlight in the
 buffer, go back to the last one."
   (interactive)
   (if (not om/highlights)
-      (progn (message "No highlights present in this buffer.")
-             nil)
-    (if (om/find-prev-highlight)
-        (progn (goto-char (om/find-prev-highlight)) t)
-      (message "Nothing done. No more visible highlights exist") nil)))
+      (progn (message "No highlights present in this buffer.") nil)
+    (let ((p (om/find-prev-highlight)))
+      (if p (progn (goto-char p) t)
+        (message "Nothing done. No more visible highlights exist") nil))))
 
 (defun om/toggle ()
   "Toggle showing/hiding of highlighters in current buffer.



reply via email to

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