From baa6e1d3d7680fa11108b57bff56af0fb1d1291d Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Sun, 4 Jul 2010 15:09:20 -0700 Subject: [PATCH] babel: absolutely no babel related compiler warnings had to nest an argument in a trivial `or' to trick the compiler in the large ob-comint macro. --- Makefile | 1 + lisp/ob-R.el | 2 +- lisp/ob-comint.el | 2 +- lisp/ob-eval.el | 2 +- lisp/ob-octave.el | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3520a4561..641dbc353 100644 --- a/Makefile +++ b/Makefile @@ -122,6 +122,7 @@ LISPF = org.el \ ob-exp.el \ ob-tangle.el \ ob-comint.el \ + ob-eval.el \ ob-keys.el \ ob-C.el \ ob-ditaa.el \ diff --git a/lisp/ob-R.el b/lisp/ob-R.el index 255e153a5..b914de674 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -231,7 +231,7 @@ last statement in BODY, as elisp." "FALSE"))) (org-babel-R-process-value-result (org-babel-import-elisp-from-file - (org-babel-maybe-remote-file tmp-file)) column-names-p)))) + (org-babel-maybe-remote-file tmp-file)) column-names-p)))) ;; comint session evaluation (case result-type (value diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el index 2a2f86c30..7b742d5b7 100644 --- a/lisp/ob-comint.el +++ b/lisp/ob-comint.el @@ -107,7 +107,7 @@ or user `keyboard-quit' during execution of body." (if (and ,remove-echo ,full-body (string-match (replace-regexp-in-string - "\n" "[\r\n]+" (regexp-quote ,full-body)) + "\n" "[\r\n]+" (regexp-quote (or ,full-body ""))) string-buffer)) (setq raw (substring string-buffer (match-end 0)))) (split-string string-buffer comint-prompt-regexp))))) diff --git a/lisp/ob-eval.el b/lisp/ob-eval.el index e5af2941b..282baee29 100644 --- a/lisp/ob-eval.el +++ b/lisp/ob-eval.el @@ -61,7 +61,7 @@ otherwise display STDERR with `org-babel-eval-error-notify'." (defun org-babel-eval-read-file (file) "Return the contents of FILE as a string." (with-temp-buffer (insert-file-contents - (org-babel-maybe-remote-file tmp-file)) + (org-babel-maybe-remote-file file)) (buffer-string))) (defun org-babel-shell-command-on-region (start end command diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el index b20a3c908..e50b74fb5 100644 --- a/lisp/ob-octave.el +++ b/lisp/ob-octave.el @@ -33,6 +33,7 @@ (require 'ob) (require 'ob-ref) (require 'ob-comint) +(require 'ob-eval) (eval-when-compile (require 'cl)) (declare-function matlab-shell "ext:matlab-mode")