From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert Krewinkel Subject: [PATCH] org.el: Use `org-any-link-re' to avoid duplication Date: Thu, 24 Apr 2014 15:54:44 +0200 Message-ID: <1398347684-17785-1-git-send-email-tarleb@moltkeplatz.de> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdUkj-0003Y0-OZ for emacs-orgmode@gnu.org; Thu, 24 Apr 2014 21:17:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WdK7z-0006BP-Et for emacs-orgmode@gnu.org; Thu, 24 Apr 2014 09:55:59 -0400 Received: from moltkeplatz.de ([85.214.95.47]:58360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdK7z-0006BJ-8h for emacs-orgmode@gnu.org; Thu, 24 Apr 2014 09:55:51 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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