Browse Source

babel: Eliminate compiler warnings

	* ob.el (with-parsed-tramp-file-name): declared
	(org-babel-tramp-localname): Ensure variable name exists
	locally

	* ob-R.el (ess-eval-buffer): declared

	* ob-comint.el (with-parsed-tramp-file-name): declared
	(tramp-flush-directory-property): declared
	(org-babel-comint-eval-invisibly-and-wait-for-file): Ensure
	variable name exists locally
Dan Davison 14 years ago
parent
commit
8cb53ddc1a
3 changed files with 10 additions and 4 deletions
  1. 1 0
      lisp/ob-R.el
  2. 5 2
      lisp/ob-comint.el
  3. 4 2
      lisp/ob.el

+ 1 - 0
lisp/ob-R.el

@@ -37,6 +37,7 @@
 (declare-function R "ext:essd-r" (&optional start-args))
 (declare-function R "ext:essd-r" (&optional start-args))
 (declare-function inferior-ess-send-input "ext:ess-inf" ())
 (declare-function inferior-ess-send-input "ext:ess-inf" ())
 (declare-function ess-make-buffer-current "ext:ess-inf" ())
 (declare-function ess-make-buffer-current "ext:ess-inf" ())
+(declare-function ess-eval-buffer "ext:ess-inf" (vis))
 
 
 (defconst org-babel-header-arg-names:R
 (defconst org-babel-header-arg-names:R
   '(width height bg units pointsize antialias quality compression
   '(width height bg units pointsize antialias quality compression

+ 5 - 2
lisp/ob-comint.el

@@ -34,6 +34,8 @@
 (require 'ob)
 (require 'ob)
 (require 'comint)
 (require 'comint)
 (eval-when-compile (require 'cl))
 (eval-when-compile (require 'cl))
+(declare-function with-parsed-tramp-file-name "tramp" (filename var &rest body))
+(declare-function tramp-flush-directory-property "tramp" (vec directory))
 
 
 (defun org-babel-comint-buffer-livep (buffer)
 (defun org-babel-comint-buffer-livep (buffer)
   "Check if BUFFER is a comint buffer with a live process."
   "Check if BUFFER is a comint buffer with a live process."
@@ -149,8 +151,9 @@ FILE exists at end of evaluation."
    (if (string-match "\n$" string) string (concat string "\n")))
    (if (string-match "\n$" string) string (concat string "\n")))
   ;; From Tramp 2.1.19 the following cache flush is not necessary
   ;; From Tramp 2.1.19 the following cache flush is not necessary
   (if (file-remote-p default-directory)
   (if (file-remote-p default-directory)
-      (with-parsed-tramp-file-name default-directory nil
-	(tramp-flush-directory-property v "")))
+      (let (v)
+	(with-parsed-tramp-file-name default-directory nil
+	  (tramp-flush-directory-property v ""))))
   (while (not (file-exists-p file)) (sit-for (or period 0.25))))
   (while (not (file-exists-p file)) (sit-for (or period 0.25))))
 
 
 (provide 'ob-comint)
 (provide 'ob-comint)

+ 4 - 2
lisp/ob.el

@@ -40,6 +40,7 @@
 (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
 (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
 (declare-function tramp-file-name-user "tramp" (vec))
 (declare-function tramp-file-name-user "tramp" (vec))
 (declare-function tramp-file-name-host "tramp" (vec))
 (declare-function tramp-file-name-host "tramp" (vec))
+(declare-function with-parsed-tramp-file-name "tramp" (filename var &rest body))
 (declare-function org-icompleting-read "org" (&rest args))
 (declare-function org-icompleting-read "org" (&rest args))
 (declare-function org-edit-src-code "org-src" 
 (declare-function org-edit-src-code "org-src" 
                   (&optional context code edit-buffer-name quietp))
                   (&optional context code edit-buffer-name quietp))
@@ -1674,8 +1675,9 @@ the remote connection."
 (defun org-babel-tramp-localname (file)
 (defun org-babel-tramp-localname (file)
   "Return the local name component of FILE."
   "Return the local name component of FILE."
   (if (file-remote-p file)
   (if (file-remote-p file)
-      (with-parsed-tramp-file-name file nil
-	localname)
+      (let (localname)
+	(with-parsed-tramp-file-name file nil
+	  localname))
     file))
     file))
 
 
 (defvar org-babel-temporary-directory
 (defvar org-babel-temporary-directory