org-test: Small code clean-up

* testing/org-test.el (org-test-with-temp-text): Clean-up code.
This commit is contained in:
Nicolas Goaziou 2014-04-10 11:53:27 +02:00
parent d01d22b74f
commit 7fe1da1f8c
1 changed files with 3 additions and 3 deletions

View File

@ -208,13 +208,13 @@ otherwise place the point at the beginning of the inserted text."
`(let ((inside-text (if (stringp ,text) ,text (eval ,text)))) `(let ((inside-text (if (stringp ,text) ,text (eval ,text))))
(with-temp-buffer (with-temp-buffer
(org-mode) (org-mode)
(let ((point (string-match (regexp-quote "<point>") inside-text))) (let ((point (string-match "<point>" inside-text)))
(if point (if point
(progn (progn
(insert (replace-match "" nil nil inside-text)) (insert (replace-match "" nil nil inside-text))
(goto-char (1+ (match-beginning 0)))) (goto-char (1+ (match-beginning 0))))
(progn (insert inside-text) (insert inside-text)
(goto-char (point-min))))) (goto-char (point-min))))
,@body))) ,@body)))
(def-edebug-spec org-test-with-temp-text (form body)) (def-edebug-spec org-test-with-temp-text (form body))