Browse Source

Fix some more Org `check-declare' issues.

* ob.el: Require org when compiling.
(org-save-outline-visibility): Remove macro declaration.
* ob-emacs-lisp.el: Require ob-comint when compiling, for macros.
Remove unnecessary/macro declarations.
* org-docview.el: Require doc-view when compiling.
(doc-view-goto-page): Autoload rather than declaring.
(doc-view-current-page): Remove macro declaration.
* ob.el (tramp-compat-make-temp-file, org-edit-src-code)
(org-entry-get, org-table-import): Fix declarations.
(org-match-string-no-properties): Remove declaration.
* ob-sh.el (org-babel-comint-in-buffer)
(org-babel-comint-wait-for-output, org-babel-comint-buffer-livep)
(org-babel-comint-with-output): Remove unnecessary declarations.
* ob-R.el (orgtbl-to-tsv): Fix declaration.
* org-list.el (org-entry-get): Fix declaration.
Glenn Morris 10 years ago
parent
commit
e314478511
5 changed files with 16 additions and 15 deletions
  1. 1 1
      lisp/ob-R.el
  2. 1 4
      lisp/ob-emacs-lisp.el
  3. 10 7
      lisp/ob.el
  4. 2 2
      lisp/org-docview.el
  5. 2 1
      lisp/org-list.el

+ 1 - 1
lisp/ob-R.el

@@ -33,7 +33,7 @@
 (require 'ob-eval)
 (eval-when-compile (require 'cl))
 
-(declare-function orgtbl-to-tsv "ob-table" (table params))
+(declare-function orgtbl-to-tsv "org-table" (table params))
 (declare-function R "ext:essd-r" (&optional start-args))
 (declare-function inferior-ess-send-input "ext:ess-inf" ())
 

+ 1 - 4
lisp/ob-emacs-lisp.el

@@ -28,15 +28,12 @@
 
 ;;; Code:
 (require 'ob)
+(eval-when-compile (require 'ob-comint))
 
 (defvar org-babel-default-header-args:emacs-lisp
   '((:hlines . "yes") (:colnames . "no"))
   "Default arguments for evaluating an emacs-lisp source block.")
 
-(declare-function org-babel-comint-with-output "ob-comint" (&rest body))
-(declare-function org-babel-comint-buffer-livep "ob-comint" (buffer))
-(declare-function org-babel-comint-wait-for-output "ob-comint" (buffer))
-(declare-function org-babel-comint-in-buffer "ob-comint" (buffer &rest body))
 (declare-function orgtbl-to-generic "org-table" (table params))
 
 (defun org-babel-expand-body:emacs-lisp (body params &optional processed-params)

+ 10 - 7
lisp/ob.el

@@ -25,33 +25,36 @@
 ;;; Commentary:
 
 ;; See the online documentation for more information
-;; 
+;;
 ;;   http://orgmode.org/worg/org-contrib/babel/
 
 ;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile
+  (require 'cl)
+  (require 'org))                  ; org-save-outline-visibility macro
 (require 'org-macs)
 
 (defvar org-babel-call-process-region-original)
 (declare-function show-all "outline" ())
-(declare-function tramp-compat-make-temp-file "tramp" (filename &optional dir-flag))
+(declare-function tramp-compat-make-temp-file "tramp-compat"
+                  (filename &optional dir-flag))
 (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
 (declare-function tramp-file-name-user "tramp" (vec))
 (declare-function tramp-file-name-host "tramp" (vec))
 (declare-function org-icompleting-read "org" (&rest args))
-(declare-function org-edit-src-code "org" (context code edit-buffer-name))
+(declare-function org-edit-src-code "org-src" 
+                  (&optional context code edit-buffer-name))
 (declare-function org-open-at-point "org" (&optional in-emacs reference-buffer))
 (declare-function org-save-outline-visibility "org" (use-markers &rest body))
 (declare-function org-narrow-to-subtree "org" ())
-(declare-function org-entry-get "org" (pom property &optional inherit))
+(declare-function org-entry-get "org" (pom property &optional inherit literal-nil))
 (declare-function org-make-options-regexp "org" (kwds &optional extra))
-(declare-function org-match-string-no-properties "org" (num &optional string))
 (declare-function org-do-remove-indentation "org" (&optional n))
 (declare-function org-show-context "org" (&optional key))
 (declare-function org-at-table-p "org" (&optional table-type))
 (declare-function org-cycle "org" (&optional arg))
 (declare-function org-uniquify "org" (list))
-(declare-function org-table-import "org" (file arg))
+(declare-function org-table-import "org-table" (file arg))
 (declare-function org-add-hook "org-compat" (hook function &optional append local))
 (declare-function org-table-align "org-table" ())
 (declare-function org-table-end "org-table" (&optional table-type))

+ 2 - 2
lisp/org-docview.el

@@ -45,9 +45,9 @@
 
 
 (require 'org)
+(eval-when-compile (require 'doc-view))	; doc-view-current-page macro
 
-(declare-function doc-view-goto-page "doc-view" (page))
-(declare-function doc-view-current-page "doc-view"  (&optional win))
+(autoload 'doc-view-goto-page "doc-view")
 
 (org-add-link-type "docview" 'org-docview-open)
 (add-hook 'org-store-link-functions 'org-docview-store-link)

+ 2 - 1
lisp/org-list.el

@@ -51,7 +51,8 @@
 (declare-function org-get-indentation "org" (&optional line))
 (declare-function org-timer-item "org-timer" (&optional arg))
 (declare-function org-combine-plists "org" (&rest plists))
-(declare-function org-entry-get "org" (pom property &optional inherit))
+(declare-function org-entry-get "org"
+		  (pom property &optional inherit literal-nil))
 (declare-function org-narrow-to-subtree "org" ())
 (declare-function org-show-subtree "org" ())