From 8546ef131d57b623893bc88cee840d12a211c186 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 16 Apr 2013 09:15:45 +0200 Subject: [PATCH] org.el (org-link-expand-abbrev): Save match data before before calling the replacement function * org.el (org-link-expand-abbrev): Save match data before before calling the replacement function. --- lisp/org.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 460897e1d..50f988de2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9252,7 +9252,9 @@ property to set." (cond ((symbolp rpl) (funcall rpl tag)) ((string-match "%(\\([^)]+\\))" rpl) - (replace-match (funcall (intern-soft (match-string 1 rpl)) tag) t t rpl)) + (replace-match + (save-match-data + (funcall (intern-soft (match-string 1 rpl)) tag)) t t rpl)) ((string-match "%s" rpl) (replace-match (or tag "") t t rpl)) ((string-match "%h" rpl) (replace-match (url-hexify-string (or tag "")) t t rpl)) -- 2.11.4.GIT