From d2b7c50880704e63fd54a528799abd5af47a6b3b Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sun, 11 May 2014 18:33:29 +0200 Subject: [PATCH] org.el (org-offer-links-in-entry): Reuse global variable * org.el (org-offer-links-in-entry): Use global variable `org-any-link-re' instead of defining a string-equal local variable. The `re' variable defined in function `org-offer-links-in-entry' is string-equal to `org-any-link-re' and is hence replaced by the latter. TINYCHANGE --- lisp/org.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 0dcdaf373..c6e4627b3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10721,10 +10721,7 @@ there is one, return it." (save-restriction (widen) (goto-char marker) - (let ((re (concat "\\(" org-bracket-link-regexp "\\)\\|" - "\\(" org-angle-link-re "\\)\\|" - "\\(" org-plain-link-re "\\)")) - (cnt ?0) + (let ((cnt ?0) (in-emacs (if (integerp nth) nil nth)) have-zero end links link c) (when (and (stringp zero) (string-match org-bracket-link-regexp zero)) @@ -10733,7 +10730,7 @@ there is one, return it." (save-excursion (org-back-to-heading t) (setq end (save-excursion (outline-next-heading) (point))) - (while (re-search-forward re end t) + (while (re-search-forward org-any-link-re end t) (push (match-string 0) links)) (setq links (org-uniquify (reverse links)))) (cond