emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org.el: Use `org-any-link-re' to avoid duplication
@ 2014-04-24 13:54 Albert Krewinkel
  0 siblings, 0 replies; only message in thread
From: Albert Krewinkel @ 2014-04-24 13:54 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Albert Krewinkel

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.
---
 lisp/org.el | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index ad76e67..741529b 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10694,10 +10694,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))
@@ -10706,7 +10703,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
-- 
1.9.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-25  1:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-24 13:54 [PATCH] org.el: Use `org-any-link-re' to avoid duplication Albert Krewinkel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).