summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2014-04-10 11:56:13 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2014-04-10 11:56:13 +0200
commitaf41c071edc45252aa7bfde4898e75a829a2b29d (patch)
tree50d5a85d4ab5bc3c2bd4c4ee313f5d1817631a99
parent645384a03787823e596846ee728ecdf0dfc2882b (diff)
parent7fe1da1f8c5a8bc54806700ea135135912f8f504 (diff)
downloadorg-mode-af41c071edc45252aa7bfde4898e75a829a2b29d.tar.gz
Merge branch 'maint'
-rw-r--r--testing/org-test.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/testing/org-test.el b/testing/org-test.el
index 879d45e..bcd0002 100644
--- a/testing/org-test.el
+++ b/testing/org-test.el
@@ -208,12 +208,13 @@ otherwise place the point at the beginning of the inserted text."
`(let ((inside-text (if (stringp ,text) ,text (eval ,text))))
(with-temp-buffer
(org-mode)
- (let ((point (string-match (regexp-quote "<point>") inside-text)))
- (if point
- (progn (insert (replace-match "" nil nil inside-text))
- (goto-char (match-beginning 0)))
- (progn (insert inside-text)
- (goto-char (point-min)))))
+ (let ((point (string-match "<point>" inside-text)))
+ (if point
+ (progn
+ (insert (replace-match "" nil nil inside-text))
+ (goto-char (1+ (match-beginning 0))))
+ (insert inside-text)
+ (goto-char (point-min))))
,@body)))
(def-edebug-spec org-test-with-temp-text (form body))