From 24030ef62b149a31ac3b51a13e0149c16f95c47f Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 24 Jan 2019 15:03:47 +0100 Subject: [PATCH] Fix consecutive radio links * lisp/org.el (org-activate-target-links): Properly match consecutive radio links. Reported-by: Jay Dresser --- lisp/org.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 354f437dc..3b6d11345 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6163,6 +6163,9 @@ by a #." "Add text properties for target matches." (when org-target-link-regexp (let ((case-fold-search t)) + ;; `org-target-link-regexp' matches one character before the + ;; actual target. + (unless (bolp) (forward-char -1)) (when (re-search-forward org-target-link-regexp limit t) (org-remove-flyspell-overlays-in (match-beginning 1) (match-end 1)) (add-text-properties (match-beginning 1) (match-end 1)