diff options
author | Bastien <bzg@gnu.org> | 2019-12-03 23:27:04 +0100 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2019-12-03 23:27:04 +0100 |
commit | 165f7383822086d465519ebe6e4283723923f097 (patch) | |
tree | 820be9480e3d571d766483f564c963037192f6ec /lisp/org/ob-octave.el | |
parent | 821de968434d2096bdea67dd24301bf6b517aef1 (diff) | |
download | emacs-165f7383822086d465519ebe6e4283723923f097.tar.gz |
Update Org to 9.3
Diffstat (limited to 'lisp/org/ob-octave.el')
-rw-r--r-- | lisp/org/ob-octave.el | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/org/ob-octave.el b/lisp/org/ob-octave.el index 28c7ad2dd0a..d334fa514ec 100644 --- a/lisp/org/ob-octave.el +++ b/lisp/org/ob-octave.el @@ -30,10 +30,10 @@ ;;; Code: (require 'ob) +(require 'org-macs) (declare-function matlab-shell "ext:matlab-mode") (declare-function matlab-shell-run-region "ext:matlab-mode") -(declare-function org-trim "org" (s &optional keep-lead)) (defvar org-babel-default-header-args:matlab '()) (defvar org-babel-default-header-args:octave '()) @@ -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) @@ -254,9 +252,9 @@ This removes initial blank and comment lines and then calls (with-temp-file temp-file (insert-file-contents file-name) (re-search-forward "^[ \t]*[^# \t]" nil t) - (if (< (setq beg (point-min)) - (setq end (point-at-bol))) - (delete-region beg end))) + (when (< (setq beg (point-min)) + (setq end (point-at-bol))) + (delete-region beg end))) (org-babel-import-elisp-from-file temp-file '(16)))) (provide 'ob-octave) |