summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2018-10-06 09:40:33 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-10-06 09:40:33 +0200
commit5cc69a9ebfbb966a8e2a22f296b5d30827878ae5 (patch)
tree306b3754912c6769e4905d33de71e2f2ee2e785e
parent0ae2e656d7b15d6d4d150b87be21cbc09b0d2361 (diff)
downloadorg-mode-5cc69a9ebfbb966a8e2a22f296b5d30827878ae5.tar.gz
Deprecate `org-babel-strip-quotes' in favor of `org-strip-quotes'
* lisp/ob-core.el (org-babel-strip-quotes): Remove function. * lisp/org-macs.el (org-strip-quotes): New function. * lisp/org-compat.el (org-babel-strip-quotes): Alias for new function. * lisp/ob-haskell.el (org-babel-execute:haskell): * lisp/ob-octave.el (org-babel-octave-evaluate-session): Use new function.
-rw-r--r--lisp/ob-core.el4
-rw-r--r--lisp/ob-haskell.el9
-rw-r--r--lisp/ob-octave.el10
-rw-r--r--lisp/org-compat.el3
-rw-r--r--lisp/org-macs.el4
5 files changed, 15 insertions, 15 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 32de18e..aae3617 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3160,10 +3160,6 @@ Callers of this function will probably want to add an entry to
(when (and sym (boundp sym))
(defvaralias (intern (concat "org-babel-" var ":" new)) sym)))))
-(defun org-babel-strip-quotes (string)
- "Strip \\\"s from around a string, if applicable."
- (org-unbracket-string "\"" "\"" string))
-
(provide 'ob-core)
;; Local variables:
diff --git a/lisp/ob-haskell.el b/lisp/ob-haskell.el
index 8fd6199..ff975f7 100644
--- a/lisp/ob-haskell.el
+++ b/lisp/ob-haskell.el
@@ -74,17 +74,16 @@
(org-babel-variable-assignments:haskell params)))
(session (org-babel-haskell-initiate-session session params))
(comint-preoutput-filter-functions
- (cons 'ansi-color-filter-apply comint-preoutput-filter-functions))
+ (cons 'ansi-color-filter-apply comint-preoutput-filter-functions))
(raw (org-babel-comint-with-output
(session org-babel-haskell-eoe t full-body)
(insert (org-trim full-body))
(comint-send-input nil t)
(insert org-babel-haskell-eoe)
(comint-send-input nil t)))
- (results (mapcar
- #'org-babel-strip-quotes
- (cdr (member org-babel-haskell-eoe
- (reverse (mapcar #'org-trim raw)))))))
+ (results (mapcar #'org-strip-quotes
+ (cdr (member org-babel-haskell-eoe
+ (reverse (mapcar #'org-trim raw)))))))
(org-babel-reassemble-table
(let ((result
(pcase result-type
diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el
index 61492c7..bc3dc4c 100644
--- a/lisp/ob-octave.el
+++ b/lisp/ob-octave.el
@@ -237,13 +237,11 @@ value of the last statement in BODY, as elisp."
(`output
(setq results
(if matlabp
- (cdr (reverse (delq "" (mapcar
- #'org-babel-strip-quotes
- (mapcar #'org-trim raw)))))
+ (cdr (reverse (delq "" (mapcar #'org-strip-quotes
+ (mapcar #'org-trim raw)))))
(cdr (member org-babel-octave-eoe-output
- (reverse (mapcar
- #'org-babel-strip-quotes
- (mapcar #'org-trim raw)))))))
+ (reverse (mapcar #'org-strip-quotes
+ (mapcar #'org-trim raw)))))))
(mapconcat #'identity (reverse results) "\n")))))
(defun org-babel-octave-import-elisp-from-file (file-name)
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 714ad78..f180f11 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -460,6 +460,9 @@ use of this function is for the stuck project list."
(debug (body)))
`(with-silent-modifications ,@body))
+(define-obsolete-function-alias 'org-babel-strip-quotes
+ 'org-strip-quotes "Org 9.2")
+
;;;; Obsolete link types
(eval-after-load 'org
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 93c2140..fa052a9 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -882,6 +882,10 @@ removed."
(substring string (length pre) (- (length post)))
string))
+(defun org-strip-quotes (string)
+ "Strip double quotes from around a string, if applicable."
+ (org-unbracket-string "\"" "\"" string))
+
(defsubst org-current-line-string (&optional to-here)
(buffer-substring (point-at-bol) (if to-here (point) (point-at-eol))))