Browse Source

Backport commit 65c8c7c from Emacs

* lisp/ob-awk.el (orgtbl-to-generic):
* lisp/ob-core.el (orgtbl-to-generic):
* lisp/ob-exp.el (org-element-context):
* lisp/ob-gnuplot.el (org-time-string-to-time)
(orgtbl-to-generic):
* lisp/ob-haskell.el (org-export-to-file):
* lisp/ob-latex.el (org-create-formula-image)
(org-latex-compile):
* lisp/ob-python.el (run-python):
* lisp/ob-tangle.el (org-link-escape, org-back-to-heading):
* lisp/org-colview.el (org-agenda-redo):
* lisp/org-feed.el (url-retrieve-synchronously):
* lisp/org-info.el (Info-find-node):
* lisp/org-list.el (org-previous-line-empty-p):
* lisp/org-macs.el (org-string-match-p):
* lisp/org.el (org-beamer-mode):
Fix prototype to match current definition.
* lisp/ob-comint.el (tramp-flush-directory-property):
* lisp/ob-tangle.el (org-babel-update-block-body):
* lisp/org-bibtex.el (org-babel-trim):
* lisp/org-pcomplete.el (org-export-backend-options):
* lisp/org-protocol.el (org-publish-get-project-from-filename):
Fix file name in declare-function.
* lisp/ob-comint.el (with-parsed-tramp-file-name)
* lisp/ob-core.el (with-parsed-tramp-file-name):
* lisp/org.el (org-beamer-mode):
Append ‘t’ to declare-function, since the declaration isn’t a defun.
* lisp/ob-core.el (org-save-outline-visibility):
Remove; not needed.
* lisp/ob-scheme.el (run-geiser, geiser-mode)
(geiser-eval-region, geiser-repl-exit):
* lisp/ox-org.el (htmlize-buffer):
Prepend "ext:" to file name, since it is not part of Emacs.
* lisp/org-gnus.el (nnimap-group-overview-filename):
Remove decl, since function was removed.
* lisp/org-macro.el (org-with-wide-buffer):
Omit unnecessary (and mismatching) decl.
* lisp/org-clock.el (calendar-iso-to-absolute):
Declare calendar-iso-to-absolute instead, since it is the
non-obsolete version of this function.
* lisp/org-compat.el (w32-focus-frame):
Remove decl, since function is now obsolete.

Pacify ‘make check-declare’
65c8c7cb96c14f9c6accd03cc8851b5a3459049e
Paul Eggert
Sat May 14 19:57:44 2016 -0700
Paul Eggert 3 years ago
parent
commit
1f046ea4b1

+ 2 - 1
lisp/ob-awk.el

@@ -36,7 +36,8 @@
 (eval-when-compile (require 'cl))
 
 (declare-function org-babel-ref-resolve "ob-ref" (ref))
-(declare-function orgtbl-to-generic "org-table" (table params))
+(declare-function orgtbl-to-generic "org-table"
+                  (table params &optional backend))
 
 (defvar org-babel-tangle-lang-exts)
 (add-to-list 'org-babel-tangle-lang-exts '("awk" . "awk"))

+ 3 - 2
lisp/ob-comint.el

@@ -34,8 +34,9 @@
 (require 'org-compat)
 (require 'comint)
 (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))
+(declare-function with-parsed-tramp-file-name "tramp"
+                  (filename var &rest body) t)
+(declare-function tramp-flush-directory-property "tramp-cache" (key directory))
 
 (defun org-babel-comint-buffer-livep (buffer)
   "Check if BUFFER is a comint buffer with a live process."

+ 4 - 3
lisp/ob-core.el

@@ -51,12 +51,12 @@
 (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 with-parsed-tramp-file-name "tramp" (filename var &rest body))
+(declare-function with-parsed-tramp-file-name "tramp" (filename var &rest body)
+		  t)
 (declare-function org-icompleting-read "org" (&rest args))
 (declare-function org-edit-src-code "org-src" (&optional code edit-buffer-name))
 (declare-function org-edit-src-exit "org-src"  ())
 (declare-function org-open-at-point "org" (&optional in-emacs reference-buffer))
-(declare-function org-save-outline-visibility "org-macs" (use-markers &rest body))
 (declare-function org-outline-overlay-data "org" (&optional use-markers))
 (declare-function org-set-outline-overlay-data "org" (data))
 (declare-function org-narrow-to-subtree "org" ())
@@ -77,7 +77,8 @@
 		  (hook function &optional append local))
 (declare-function org-table-align "org-table" ())
 (declare-function org-table-end "org-table" (&optional table-type))
-(declare-function orgtbl-to-generic "org-table" (table params))
+(declare-function orgtbl-to-generic "org-table"
+                  (table params &optional backend))
 (declare-function orgtbl-to-orgtbl "org-table" (table params))
 (declare-function org-babel-tangle-comment-links "ob-tangle" (&optional info))
 (declare-function org-babel-lob-get-info "ob-lob" nil)

+ 1 - 1
lisp/ob-exp.el

@@ -45,7 +45,7 @@
 (declare-function org-fill-template "org" (template alist))
 (declare-function org-split-string "org" (string &optional separators))
 (declare-function org-element-at-point "org-element" ())
-(declare-function org-element-context "org-element" ())
+(declare-function org-element-context "org-element" (&optional element))
 (declare-function org-element-property "org-element" (property element))
 (declare-function org-element-type "org-element" (element))
 (declare-function org-id-get "org-id" (&optional pom create prefix))

+ 3 - 2
lisp/ob-gnuplot.el

@@ -41,9 +41,10 @@
 (require 'ob)
 (eval-when-compile (require 'cl))
 
-(declare-function org-time-string-to-time "org" (s))
+(declare-function org-time-string-to-time "org" (s &optional buffer pos))
 (declare-function org-combine-plists "org" (&rest plists))
-(declare-function orgtbl-to-generic "org-table" (table params))
+(declare-function orgtbl-to-generic "org-table"
+                  (table params &optional backend))
 (declare-function gnuplot-mode "ext:gnuplot-mode" ())
 (declare-function gnuplot-send-string-to-gnuplot "ext:gnuplot-mode" (str txt))
 (declare-function gnuplot-send-buffer-to-gnuplot "ext:gnuplot-mode" ())

+ 2 - 1
lisp/ob-haskell.el

@@ -144,7 +144,8 @@ specifying a variable of the same value."
 (defvar org-export-copy-to-kill-ring)
 (declare-function org-export-to-file "ox"
 		  (backend file
-			   &optional async subtreep visible-only body-only ext-plist))
+			   &optional async subtreep visible-only body-only
+			   ext-plist post-process))
 (defun org-babel-haskell-export-to-lhs (&optional arg)
   "Export to a .lhs file with all haskell code blocks escaped.
 When called with a prefix argument the resulting

+ 3 - 2
lisp/ob-latex.el

@@ -32,11 +32,12 @@
 ;;; Code:
 (require 'ob)
 
-(declare-function org-create-formula-image "org" (string tofile options buffer))
+(declare-function org-create-formula-image "org"
+                  (string tofile options buffer &optional type))
 (declare-function org-splice-latex-header "org"
 		  (tpl def-pkg pkg snippets-p &optional extra))
 (declare-function org-latex-guess-inputenc "ox-latex" (header))
-(declare-function org-latex-compile "ox-latex" (file))
+(declare-function org-latex-compile "ox-latex" (texfile &optional snippet))
 
 (defvar org-babel-tangle-lang-exts)
 (add-to-list 'org-babel-tangle-lang-exts '("latex" . "tex"))

+ 1 - 1
lisp/ob-python.el

@@ -33,7 +33,7 @@
 (declare-function org-remove-indentation "org" )
 (declare-function py-shell "ext:python-mode" (&optional argprompt))
 (declare-function py-toggle-shells "ext:python-mode" (arg))
-(declare-function run-python "ext:python" (cmd &optional dedicated show))
+(declare-function run-python "ext:python" (&optional cmd dedicated show))
 
 (defvar org-babel-tangle-lang-exts)
 (add-to-list 'org-babel-tangle-lang-exts '("python" . "py"))

+ 5 - 4
lisp/ob-scheme.el

@@ -45,10 +45,11 @@
 (defvar geiser-default-implementation) ; Defined in geiser-impl.el
 (defvar geiser-active-implementations) ; Defined in geiser-impl.el
 
-(declare-function run-geiser "geiser-repl" (impl))
-(declare-function geiser-mode "geiser-mode" ())
-(declare-function geiser-eval-region "geiser-mode" (start end &optional and-go raw nomsg))
-(declare-function geiser-repl-exit "geiser-repl" (&optional arg))
+(declare-function run-geiser "ext:geiser-repl" (impl))
+(declare-function geiser-mode "ext:geiser-mode" ())
+(declare-function geiser-eval-region "ext:geiser-mode"
+                  (start end &optional and-go raw nomsg))
+(declare-function geiser-repl-exit "ext:geiser-repl" (&optional arg))
 
 (defvar org-babel-default-header-args:scheme '()
   "Default header arguments for scheme code blocks.")

+ 3 - 3
lisp/ob-tangle.el

@@ -30,8 +30,8 @@
 
 (declare-function make-directory "files" (dir &optional parents))
 (declare-function org-at-heading-p "org" (&optional ignored))
-(declare-function org-babel-update-block-body "org" (new-body))
-(declare-function org-back-to-heading "org" (invisible-ok))
+(declare-function org-babel-update-block-body "ob-core" (new-body))
+(declare-function org-back-to-heading "org" (&optional invisible-ok))
 (declare-function org-before-first-heading-p "org" ())
 (declare-function org-edit-special "org" (&optional arg))
 (declare-function org-element-at-point "org-element" ())
@@ -39,7 +39,7 @@
 (declare-function org-fill-template "org" (template alist))
 (declare-function org-heading-components "org" ())
 (declare-function org-in-commented-heading-p "org" (&optional no-inheritance))
-(declare-function org-link-escape "org" (text &optional table))
+(declare-function org-link-escape "org" (text &optional table merge))
 (declare-function org-open-link-from-string "org" (s &optional arg reference-buffer))
 (declare-function org-store-link "org" (arg))
 (declare-function org-string-nw-p "org" (s))

+ 1 - 1
lisp/org-bibtex.el

@@ -120,7 +120,7 @@
 (declare-function bibtex-generate-autokey "bibtex" ())
 (declare-function bibtex-parse-entry "bibtex" (&optional content))
 (declare-function bibtex-url "bibtex" (&optional pos no-browse))
-(declare-function org-babel-trim "ob" (string &optional regexp))
+(declare-function org-babel-trim "ob-core" (string &optional regexp))
 
 
 ;;; Bibtex data

+ 1 - 1
lisp/org-colview.el

@@ -31,7 +31,7 @@
 (eval-when-compile (require 'cl))
 (require 'org)
 
-(declare-function org-agenda-redo "org-agenda" ())
+(declare-function org-agenda-redo "org-agenda" (&optional all))
 (declare-function org-agenda-do-context-action "org-agenda" ())
 (declare-function org-clock-sum-today "org-clock" (&optional headline-filter))
 

+ 0 - 2
lisp/org-compat.el

@@ -34,8 +34,6 @@
 
 (require 'org-macs)
 
-(declare-function w32-focus-frame "term/w32-win" (frame))
-
 ;; The following constant is for backward compatibility.  We do not use
 ;; it in org-mode, because the Byte compiler evaluates (featurep 'xemacs)
 ;; at compilation time and can therefore optimize code better.

+ 2 - 1
lisp/org-feed.el

@@ -93,7 +93,8 @@
 (require 'org)
 (require 'sha1)
 
-(declare-function url-retrieve-synchronously "url" (url))
+(declare-function url-retrieve-synchronously "url"
+                  (url &optional silent inhibit-cookies timeout))
 (declare-function xml-node-children "xml" (node))
 (declare-function xml-get-children "xml" (node child-name))
 (declare-function xml-get-attribute "xml" (node attribute))

+ 2 - 1
lisp/org-gnus.el

@@ -39,7 +39,6 @@
 
 (declare-function message-fetch-field "message" (header &optional not-all))
 (declare-function message-narrow-to-head-1 "message" nil)
-(declare-function nnimap-group-overview-filename "nnimap" (group server))
 (declare-function gnus-summary-last-subject "gnus-sum" nil)
 (declare-function nnvirtual-map-article "nnvirtual" (article))
 
@@ -80,6 +79,8 @@ this variable to t."
 
 ;; Implementation
 
+;; FIXME: nnimap-group-overview-filename was removed from Gnus in
+;; September 2010.  Perhaps remove this function?
 (defun org-gnus-nnimap-cached-article-number (group server message-id)
   "Return cached article number (uid) of message in GROUP on SERVER.
 MESSAGE-ID is the message-id header field that identifies the

+ 2 - 2
lisp/org-info.el

@@ -34,8 +34,8 @@
 
 ;; Declare external functions and variables
 
-(declare-function Info-find-node "info" (filename nodename
-						  &optional no-going-back))
+(declare-function Info-find-node "info"
+                  (filename nodename &optional no-going-back strict-case))
 (defvar Info-current-file)
 (defvar Info-current-node)
 

+ 1 - 1
lisp/org-list.el

@@ -122,7 +122,7 @@
 (declare-function org-inlinetask-outline-regexp "org-inlinetask" ())
 (declare-function org-level-increment "org" ())
 (declare-function org-narrow-to-subtree "org" ())
-(declare-function org-previous-line-empty-p "org" ())
+(declare-function org-previous-line-empty-p "org" (&optional next))
 (declare-function org-reduced-level "org" (L))
 (declare-function org-remove-if "org" (predicate seq))
 (declare-function org-show-subtree "org" ())

+ 0 - 1
lisp/org-macro.el

@@ -58,7 +58,6 @@
 (declare-function org-file-contents "org" (file &optional noerror))
 (declare-function org-mode "org" ())
 (declare-function org-remove-double-quotes "org" (s))
-(declare-function org-with-wide-buffer "org-macs" (&rest body))
 
 ;;; Variables
 

+ 2 - 1
lisp/org-macs.el

@@ -45,7 +45,8 @@
       (string (decode-char 'ucs c)))))
 
 (declare-function org-add-props "org-compat" (string plist &rest props))
-(declare-function org-string-match-p "org-compat" (&rest args))
+(declare-function org-string-match-p "org-compat"
+                  (regexp string &optional start))
 
 (defmacro org-with-gensyms (symbols &rest body)
   (declare (debug (sexp body)) (indent 1))

+ 1 - 1
lisp/org-pcomplete.el

@@ -260,7 +260,7 @@ When completing for #+STARTUP, for example, this function returns
 	       (buffer-name (buffer-base-buffer)))))))
 
 
-(declare-function org-export-backend-options "org-export" (cl-x))
+(declare-function org-export-backend-options "ox" (cl-x) t)
 (defun pcomplete/org-mode/file-option/options ()
   "Complete arguments for the #+OPTIONS file option."
   (while (pcomplete-here

+ 1 - 1
lisp/org-protocol.el

@@ -119,7 +119,7 @@
 (eval-when-compile
   (require 'cl))
 
-(declare-function org-publish-get-project-from-filename "org-publish"
+(declare-function org-publish-get-project-from-filename "ox-publish"
 		  (filename &optional up))
 (declare-function server-edit "server" (&optional arg))
 

+ 7 - 7
lisp/org.el

@@ -123,11 +123,12 @@ Stars are put in group 1 and the trimmed body in group 2.")
 (declare-function cdlatex-environment "ext:cdlatex" (environment item))
 (declare-function org-add-archive-files "org-archive" (files))
 (declare-function org-agenda-entry-get-agenda-timestamp "org-agenda" (pom))
-(declare-function org-agenda-list "org-agenda" (&optional arg start-day span))
+(declare-function org-agenda-list "org-agenda"
+		  (&optional arg start-day span with-hour))
 (declare-function org-agenda-redo "org-agenda" (&optional all))
 (declare-function org-babel-do-in-edit-buffer "ob-core" (&rest body))
 (declare-function org-babel-tangle-file "ob-tangle" (file &optional target-file lang))
-(declare-function org-beamer-mode "ox-beamer" ())
+(declare-function org-beamer-mode "ox-beamer" (&optional prefix) t)
 (declare-function org-clock-get-last-clock-out-time "org-clock" ())
 (declare-function org-clock-out "org-clock" (&optional switch-to-state fail-quietly at-time))
 (declare-function org-clock-remove-overlays "org-clock" (&optional beg end noremove))
@@ -747,7 +748,7 @@ For export specific modules, see also `org-export-backends'."
 
 (defvar org-export-registered-backends) ; From ox.el.
 (declare-function org-export-derived-backend-p "ox" (backend &rest backends))
-(declare-function org-export-backend-name "ox" (backend))
+(declare-function org-export-backend-name "ox" (backend) t)
 (defcustom org-export-backends '(ascii html icalendar latex)
   "List of export back-ends that should be always available.
 
@@ -4470,14 +4471,15 @@ Normal means, no org-mode-specific context."
 (declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep))
 (defvar font-lock-unfontify-region-function)
 (declare-function iswitchb-read-buffer "iswitchb"
-                  (prompt &optional default require-match start matches-set))
+                  (prompt &optional
+                          default require-match _predicate start matches-set))
 (defvar iswitchb-temp-buflist)
 (declare-function org-gnus-follow-link "org-gnus" (&optional group article))
 (defvar org-agenda-tags-todo-honor-ignore-options)
 (declare-function org-agenda-skip "org-agenda" ())
 (declare-function
  org-agenda-format-item "org-agenda"
- (extra txt &optional level category tags dotime noprefix remove-re habitp))
+ (extra txt &optional level category tags dotime remove-re habitp))
 (declare-function org-agenda-new-marker "org-agenda" (&optional pos))
 (declare-function org-agenda-change-all-lines "org-agenda"
 		  (newhead hdmarker &optional fixface just-this))
@@ -12318,8 +12320,6 @@ This function can be used in a hook."
 
 ;;;; Completion
 
-(declare-function org-export-backend-name "org-export" (cl-x))
-(declare-function org-export-backend-options "org-export" (cl-x))
 (defun org-get-export-keywords ()
   "Return a list of all currently understood export keywords.
 Export keywords include options, block names, attributes and

+ 1 - 1
lisp/ox-org.el

@@ -25,7 +25,7 @@
 ;;; Code:
 
 (require 'ox)
-(declare-function htmlize-buffer "htmlize" (&optional buffer))
+(declare-function htmlize-buffer "ext:htmlize" (&optional buffer))
 
 (defgroup org-export-org nil
   "Options for exporting Org mode files to Org."