Browse Source

Merge branch 'maint'

Nicolas Goaziou 7 years ago
parent
commit
85418667a6
3 changed files with 6 additions and 7 deletions
  1. 2 2
      lisp/org-element.el
  2. 1 1
      testing/lisp/test-ob-exp.el
  3. 3 4
      testing/lisp/test-org-element.el

+ 2 - 2
lisp/org-element.el

@@ -2878,7 +2878,7 @@ Assume point is at the beginning of the babel call."
   (save-excursion
     (catch :no-object
       (when (let ((case-fold-search nil))
-	      (looking-at "call_\\([^ \t\n[(]+\\)[([]"))
+	      (looking-at "\\<call_\\([^ \t\n[(]+\\)[([]"))
 	(goto-char (match-end 1))
 	(let* ((begin (match-beginning 0))
 	       (call (match-string-no-properties 1))
@@ -2932,7 +2932,7 @@ Assume point is at the beginning of the inline src block."
   (save-excursion
     (catch :no-object
       (when (let ((case-fold-search nil))
-	      (looking-at "src_\\([^ \t\n[{]+\\)[{[]"))
+	      (looking-at "\\<src_\\([^ \t\n[{]+\\)[{[]"))
 	(goto-char (match-end 1))
 	(let ((begin (match-beginning 0))
 	      (language (match-string-no-properties 1))

+ 1 - 1
testing/lisp/test-ob-exp.el

@@ -229,7 +229,7 @@ Here is one at the end of a line. {{{results(=2=)}}}
 	      (org-babel-exp-process-buffer))
 	    (buffer-string))))
   (should
-   (equal "foosrc_emacs-lisp[]{(+ 1 1)}"
+   (equal "foosrc_emacs-lisp[:exports code]{(+ 1 1)}"
 	  (org-test-with-temp-text
 	      "foosrc_emacs-lisp[:exports code]{(+ 1 1)}"
 	    (let ((org-babel-inline-result-wrap "=%s=")

+ 3 - 4
testing/lisp/test-org-element.el

@@ -1223,10 +1223,6 @@ Some other text
   (should
    (org-test-with-temp-text "src_emacs-lisp{(+ 1 1)}"
      (org-element-map (org-element-parse-buffer) 'inline-src-block 'identity)))
-  ;; With prefix.
-  (should
-   (org-test-with-temp-text "foosrc_emacs-lisp[]{(+ 1 1)}"
-     (org-element-map (org-element-parse-buffer) 'inline-src-block 'identity)))
   ;; With switches.
   (should
    (org-test-with-temp-text "src_emacs-lisp[:foo bar]{(+ 1 1)}"
@@ -1242,6 +1238,9 @@ Some other text
   (should-not
    (org-test-with-temp-text "src_emacs-lisp[]foo{(+ 1 1)}"
      (org-element-map (org-element-parse-buffer) 'inline-src-block 'identity)))
+  (should-not
+   (org-test-with-temp-text "foosrc_emacs-lisp[]{(+ 1 1)}"
+     (org-element-map (org-element-parse-buffer) 'inline-src-block 'identity)))
   ;; Invalid language name
   (should-not
    (org-test-with-temp-text "src_emacs-\tlisp{(+ 1 1)}"