branch: externals/hyperbole
commit 7568a2b88a972fcb33fdeb483c3cda410b99351d
Author: Mats Lidell <mats.lid...@lidells.se>
Commit: GitHub <nore...@github.com>

    Fix assignment to free var (#702)
---
 hsys-org.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hsys-org.el b/hsys-org.el
index d4a74c6477..bb0d970c7b 100644
--- a/hsys-org.el
+++ b/hsys-org.el
@@ -538,9 +538,10 @@ a non-Org buffer type."
            (save-match-data
              ;; If this Org link matches a potential HyWiki word, ignore it.
              (when (not (and (fboundp 'hywiki-word-at) (hywiki-word-at)))
-               (if (setq label-start-end (ibut:label-p t "[" "]" t))
-                   (cons (nth 1 label-start-end) (nth 2 label-start-end))
-                 t)))))))))
+                (let ((label-start-end (ibut:label-p t "[" "]" t)))
+                 (if label-start-end
+                     (cons (nth 1 label-start-end) (nth 2 label-start-end))
+                   t))))))))))
 
 ;; Assume caller has already checked that the current buffer is in org-mode.
 (defun hsys-org-heading-at-p (&optional _)

Reply via email to