From: Albert Krewinkel <tarleb@moltkeplatz.de>
To: emacs-orgmode@gnu.org
Cc: Albert Krewinkel <tarleb@moltkeplatz.de>
Subject: [PATCH] org.el (org-offer-links-in-entry): Remove code duplication
Date: Thu, 24 Apr 2014 16:36:08 +0200 [thread overview]
Message-ID: <1398350168-18902-1-git-send-email-tarleb@moltkeplatz.de> (raw)
* org.el (org-offer-links-in-entry): Use `org-any-link-re' to avoid
code duplication.
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.
This is a TINYCHANGE.
---
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
next reply other threads:[~2014-04-25 1:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 14:36 Albert Krewinkel [this message]
2014-05-06 9:29 ` [PATCH] org.el (org-offer-links-in-entry): Remove code duplication Bastien
2014-05-11 16:33 ` Albert Krewinkel
2014-05-11 16:33 ` [PATCH] org.el (org-offer-links-in-entry): Reuse global variable Albert Krewinkel
2014-05-20 21:08 ` Bastien
2014-05-11 19:09 ` [PATCH] org.el (org-offer-links-in-entry): Remove code duplication Achim Gratz
2014-05-15 10:41 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398350168-18902-1-git-send-email-tarleb@moltkeplatz.de \
--to=tarleb@moltkeplatz.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.