summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-02-07 23:19:28 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-02-10 23:50:45 +0100
commit33aeec4a61c49d32c4a7723a705b0a4b7aa780fe (patch)
tree489386cae219a851786fb39b3edfcce1bb504062
parente079c020162640c70c68f2850155cc12925e5bd3 (diff)
downloadorg-mode-33aeec4a61c49d32c4a7723a705b0a4b7aa780fe.tar.gz
Remove `org-babel-in-example-or-verbatim'
* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Remove function. * testing/lisp/test-ob.el (test-ob/combining-scalar-and-raw-result-types): Update test. This function is unused and inaccurate. If needed, the parser should be used instead.
-rw-r--r--lisp/ob-exp.el14
-rw-r--r--lisp/ob-lob.el1
-rw-r--r--testing/lisp/test-ob.el5
3 files changed, 3 insertions, 17 deletions
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index 22ebf9c..a92458e 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -30,7 +30,6 @@
(defvar org-babel-lob-one-liner-regexp)
(defvar org-babel-ref-split-regexp)
-(defvar org-list-forbidden-blocks)
(declare-function org-babel-lob-get-info "ob-lob" (&optional datum))
(declare-function org-babel-eval-wipe-error-buffer "ob-eval" ())
@@ -301,19 +300,6 @@ may make them unreachable."
(set-marker begin nil)
(set-marker end nil))))))))
-(defun org-babel-in-example-or-verbatim ()
- "Return true if point is in example or verbatim code.
-Example and verbatim code include escaped portions of
-an org-mode buffer code that should be treated as normal
-org-mode text."
- (or (save-match-data
- (save-excursion
- (goto-char (point-at-bol))
- (looking-at "[ \t]*:[ \t]")))
- (org-in-verbatim-emphasis)
- (org-in-block-p org-list-forbidden-blocks)
- (org-between-regexps-p "^[ \t]*#\\+begin_src" "^[ \t]*#\\+end_src")))
-
(defun org-babel-exp-do-export (info type &optional hash)
"Return a string with the exported content of a code block.
The function respects the value of the :exports header argument."
diff --git a/lisp/ob-lob.el b/lisp/ob-lob.el
index 1318724..769b10d 100644
--- a/lisp/ob-lob.el
+++ b/lisp/ob-lob.el
@@ -28,7 +28,6 @@
(require 'ob-core)
(require 'ob-table)
-(declare-function org-babel-in-example-or-verbatim "ob-exp" nil)
(declare-function org-element-context "org-element" (&optional element))
(declare-function org-element-property "org-element" (property element))
(declare-function org-element-type "org-element" (element))
diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index 3df318d..cdbf375 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -502,9 +502,10 @@ echo \"[[file:./cv.cls]]\"
(forward-line 1)))
(goto-char (point-min))
(next-result)
- (should (org-babel-in-example-or-verbatim))
+ (should (eq (org-element-type (org-element-at-point)) 'fixed-width))
(next-result)
- (should (not (org-babel-in-example-or-verbatim))))))
+ (should-not
+ (eq (org-element-type (org-element-at-point)) 'fixed-width)))))
(ert-deftest test-ob/no-defaut-value-for-var ()
"Test that the absence of a default value for a variable DOES THROW