Kaynağa Gözat

Merge branch 'maint'

Nicolas Goaziou 11 yıl önce
ebeveyn
işleme
af41c071ed
1 değiştirilmiş dosya ile 7 ekleme ve 6 silme
  1. 7 6
      testing/org-test.el

+ 7 - 6
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))