From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert Krewinkel Subject: [PATCH] org.el (org-offer-links-in-entry): Reuse global variable Date: Sun, 11 May 2014 18:33:29 +0200 Message-ID: <1399826009-369-2-git-send-email-tarleb@moltkeplatz.de> References: <87k39zmcw2.fsf@bzg.ath.cx> <1399826009-369-1-git-send-email-tarleb@moltkeplatz.de> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjWin-00076b-Dz for emacs-orgmode@gnu.org; Sun, 11 May 2014 12:35:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjWih-0003Ho-1T for emacs-orgmode@gnu.org; Sun, 11 May 2014 12:35:29 -0400 In-Reply-To: <1399826009-369-1-git-send-email-tarleb@moltkeplatz.de> In-Reply-To: <87k39zmcw2.fsf@bzg.ath.cx> References: <87k39zmcw2.fsf@bzg.ath.cx> 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: Bastien Cc: Albert Krewinkel , emacs-orgmode@gnu.org * 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 c16fab0..40d6972 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10709,10 +10709,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)) @@ -10721,7 +10718,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 -- 2.0.0.rc0