1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; Fix mistakes in 'declare function' forms

* lisp/progmodes/gdb-mi.el (tooltip-show):
* lisp/vc/vc-git.el (grep-expand-template):
* lisp/cedet/semantic/imenu.el (pulse-momentary-highlight-one-line):
* lisp/mail/feedmail.el (smtpmail-via-smtp):
* lisp/mail/rmail.el (rmail-mime-entity-truncated):
* lisp/mail/rmailsum.el (rmail-cease-edit):
* lisp/progmodes/gud.el (speedbar-toggle-line-expansion)
(speedbar-edit-line):
* lisp/autoinsert.el (sgml-tag):
* lisp/comint.el (url-host, url-type, url-filename):
* lisp/progmodes/elisp-mode.el (xref-make, xref-item-location):
* lisp/vc/vc-hooks.el (vc-responsible-backend):
* lisp/cedet/semantic/complete.el (tooltip-show):
* lisp/doc-view.el (tooltip-show):
* lisp/follow.el (mwheel-scroll):
* lisp/term/pgtk-win.el (pgtk-set-resource):
* lisp/progmodes/cperl-mode.el (Info-find-node):
* lisp/lpr.el (print-region-function):
* lisp/w32-fns.el (w32-version, w32-read-registry):
* lisp/emacs-lisp/checkdoc.el (ispell-correct-p, checkdoc-dired):
* lisp/progmodes/xref.el (apropos-parse-pattern):
* lisp/cus-edit.el (apropos-parse-pattern):
* lisp/obsolete/gs.el (x-change-window-property):
* lisp/x-dnd.el (x-change-window-property):
* lisp/xwidget.el (make-xwidget):
* lisp/transient.el (info, Man-find-section, Man-next-section)
(Man-getpage-in-background):
* lisp/frame.el (x-device-class, pgtk-device-class):
* lisp/textmodes/texinfo.el (flymake--log-1):
* lisp/term/x-win.el (x-internal-focus-input-context): Fix
'declare function' errors uncovered by 'check-declare'.
This commit is contained in:
Eli Zaretskii 2022-05-14 16:19:12 +03:00
parent e0044dfeb0
commit 640e52d8fa
28 changed files with 43 additions and 39 deletions

View file

@ -89,7 +89,7 @@ If this contains a %s, that will be replaced by the matching rule."
:type 'string :type 'string
:version "28.1") :version "28.1")
(declare-function sgml-tag "sgml-mode" (&optional str arg)) (declare-function sgml-tag "textmodes/sgml-mode" (&optional str arg))
(defcustom auto-insert-alist (defcustom auto-insert-alist
`((("\\.\\([Hh]\\|hh\\|hpp\\|hxx\\|h\\+\\+\\)\\'" . "C / C++ header") `((("\\.\\([Hh]\\|hh\\|hpp\\|hxx\\|h\\+\\+\\)\\'" . "C / C++ header")

View file

@ -1761,7 +1761,8 @@ Return a cons cell (X . Y)."
(defvar tooltip-frame-parameters) (defvar tooltip-frame-parameters)
(declare-function tooltip-show "tooltip" (text &optional use-echo-area)) (declare-function tooltip-show "tooltip" (text &optional use-echo-area
text-face default-face))
(defun semantic-displayer-tooltip-show (text) (defun semantic-displayer-tooltip-show (text)
"Display a tooltip with TEXT near cursor." "Display a tooltip with TEXT near cursor."

View file

@ -39,7 +39,8 @@
(require 'semantic/sort) (require 'semantic/sort)
(require 'imenu) (require 'imenu)
(declare-function pulse-momentary-highlight-one-line "pulse" (o &optional face)) (declare-function pulse-momentary-highlight-one-line "pulse"
(&optional point face))
(declare-function semanticdb-semantic-init-hook-fcn "db-mode") (declare-function semanticdb-semantic-init-hook-fcn "db-mode")
;; Because semantic imenu tags will hose the current imenu handling ;; Because semantic imenu tags will hose the current imenu handling

View file

@ -4026,9 +4026,9 @@ arguments, with point where the escape sequence was located."
;; Current directory tracking (OSC 7) ;; Current directory tracking (OSC 7)
(declare-function url-host "url-parse.el") (declare-function url-host "url/url-parse.el")
(declare-function url-type "url-parse.el") (declare-function url-type "url/url-parse.el")
(declare-function url-filename "url-parse.el") (declare-function url-filename "url/url-parse.el")
(defun comint-osc-directory-tracker (_ text) (defun comint-osc-directory-tracker (_ text)
"Update `default-directory' from OSC 7 escape sequences. "Update `default-directory' from OSC 7 escape sequences.

View file

@ -1498,7 +1498,7 @@ symbols `custom-face' or `custom-variable'."
(custom-buffer-create (custom-sort-items found t nil) (custom-buffer-create (custom-sort-items found t nil)
"*Customize Saved*")))) "*Customize Saved*"))))
(declare-function apropos-parse-pattern "apropos" (pattern)) (declare-function apropos-parse-pattern "apropos" (pattern &optional di-all))
(defvar apropos-regexp) (defvar apropos-regexp)
;;;###autoload ;;;###autoload

View file

@ -1641,7 +1641,8 @@ For now these keys are useful:
\\[image-kill-buffer] : Kill the conversion process and this buffer. \\[image-kill-buffer] : Kill the conversion process and this buffer.
\\[doc-view-kill-proc] : Kill the conversion process.\n"))))) \\[doc-view-kill-proc] : Kill the conversion process.\n")))))
(declare-function tooltip-show "tooltip" (text &optional use-echo-area)) (declare-function tooltip-show "tooltip" (text &optional use-echo-area
text-face default-face))
(defun doc-view-show-tooltip () (defun doc-view-show-tooltip ()
(interactive) (interactive)

View file

@ -1127,7 +1127,7 @@ When called from Lisp, FILES is a list of filenames."
(progn (progn
;; These Dired functions must be defined since we're in a Dired buffer. ;; These Dired functions must be defined since we're in a Dired buffer.
(declare-function dired-get-filename "dired" (declare-function dired-get-filename "dired"
(&optional localp no-error-if-not-filep bof)) (&optional localp no-error-if-not-filep))
;; These functions are used by the expansion of `dired-map-over-marks'. ;; These functions are used by the expansion of `dired-map-over-marks'.
(declare-function dired-move-to-filename "dired" (declare-function dired-move-to-filename "dired"
(&optional raise-error eol)) (&optional raise-error eol))
@ -2234,7 +2234,7 @@ If the offending word is in a piece of quoted text, then it is skipped."
;; ;;
(defvar ispell-process) (defvar ispell-process)
(declare-function ispell-buffer-local-words "ispell" ()) (declare-function ispell-buffer-local-words "ispell" ())
(declare-function ispell-correct-p "ispell" ()) (declare-function ispell-correct-p "ispell" (&optional following))
(declare-function ispell-set-spellchecker-params "ispell" ()) (declare-function ispell-set-spellchecker-params "ispell" ())
(declare-function ispell-accept-buffer-local-defs "ispell" ()) (declare-function ispell-accept-buffer-local-defs "ispell" ())
(declare-function ispell-error-checking-word "ispell" (word)) (declare-function ispell-error-checking-word "ispell" (word))

View file

@ -1552,7 +1552,7 @@ non-first windows in Follow mode."
(declare-function scroll-bar-drag "scroll-bar" (event)) (declare-function scroll-bar-drag "scroll-bar" (event))
(declare-function scroll-bar-scroll-up "scroll-bar" (event)) (declare-function scroll-bar-scroll-up "scroll-bar" (event))
(declare-function scroll-bar-scroll-down "scroll-bar" (event)) (declare-function scroll-bar-scroll-down "scroll-bar" (event))
(declare-function mwheel-scroll "mwheel" (event)) (declare-function mwheel-scroll "mwheel" (event &optional arg))
(defun follow-scroll-bar-toolkit-scroll (event) (defun follow-scroll-bar-toolkit-scroll (event)
(interactive "e") (interactive "e")

View file

@ -2433,8 +2433,8 @@ monitors."
,(display-mm-height display))) ,(display-mm-height display)))
(frames . ,(frames-on-display-list display))))))))) (frames . ,(frames-on-display-list display)))))))))
(declare-function x-device-class (name) "x-win.el") (declare-function x-device-class "term/x-win.el" (name))
(declare-function pgtk-device-class (name) "pgtk-win.el") (declare-function pgtk-device-class "term/pgtk-win.el" (name))
(defun device-class (frame name) (defun device-class (frame name)
"Return the class of the device NAME for an event generated on FRAME. "Return the class of the device NAME for an event generated on FRAME.

View file

@ -125,7 +125,7 @@ and print the result."
(defcustom print-region-function (defcustom print-region-function
(if (memq system-type '(ms-dos windows-nt)) (if (memq system-type '(ms-dos windows-nt))
(progn (progn
(declare-function w32-direct-print-region-function "w32-fns") (declare-function w32-direct-print-region-function "dos-w32")
#'w32-direct-print-region-function) #'w32-direct-print-region-function)
#'call-process-region) #'call-process-region)
"Function to call to print the region on a printer. "Function to call to print the region on a printer.

View file

@ -1619,7 +1619,8 @@ local gurus."
(if (null mail-interactive) '("-oem" "-odb"))))) (if (null mail-interactive) '("-oem" "-odb")))))
(declare-function smtpmail-via-smtp "smtpmail" (declare-function smtpmail-via-smtp "smtpmail"
(recipient smtpmail-text-buffer &optional ask-for-password)) (recipient smtpmail-text-buffer &optional ask-for-password
send-attempts))
(defvar smtpmail-smtp-server) (defvar smtpmail-smtp-server)
;; provided by jam@austin.asc.slb.com (James A. McLaughlin); ;; provided by jam@austin.asc.slb.com (James A. McLaughlin);

View file

@ -4592,8 +4592,6 @@ Argument MIME is non-nil if this is a mime message."
armor-end-regexp armor-end-regexp
(buffer-substring armor-start (- (point-max) after-end))))) (buffer-substring armor-start (- (point-max) after-end)))))
(declare-function rmail-mime-entity-truncated "rmailmm" (entity))
;; Should this have a key-binding, or be in a menu? ;; Should this have a key-binding, or be in a menu?
;; There doesn't really seem to be an appropriate menu. ;; There doesn't really seem to be an appropriate menu.
;; Eg the edit command is not in a menu either. ;; Eg the edit command is not in a menu either.

View file

@ -1475,7 +1475,7 @@ argument says to read a file name and use that file as the inbox."
(forward-line -1)) (forward-line -1))
(declare-function rmail-abort-edit "rmailedit" ()) (declare-function rmail-abort-edit "rmailedit" ())
(declare-function rmail-cease-edit "rmailedit"()) (declare-function rmail-cease-edit "rmailedit" (&optional abort))
(declare-function rmail-set-label "rmailkwd" (l state &optional n)) (declare-function rmail-set-label "rmailkwd" (l state &optional n))
(declare-function rmail-output-read-file-name "rmailout" ()) (declare-function rmail-output-read-file-name "rmailout" ())
(declare-function mail-send-and-exit "sendmail" (&optional arg)) (declare-function mail-send-and-exit "sendmail" (&optional arg))

View file

@ -116,7 +116,7 @@ FILE is the value to substitute for the place-holder `<file>'."
(/ (* 25.4 mm) 72.0))) (/ (* 25.4 mm) 72.0)))
(declare-function x-change-window-property "xfns.c" (declare-function x-change-window-property "xfns.c"
(prop value &optional frame type format outer-p)) (prop value &optional frame type format outer-p window-id))
(defun gs-set-ghostview-window-prop (frame spec img-width img-height) (defun gs-set-ghostview-window-prop (frame spec img-width img-height)
"Set the `GHOSTVIEW' window property of FRAME. "Set the `GHOSTVIEW' window property of FRAME.

View file

@ -6382,7 +6382,8 @@ side-effect of memorizing only. Examples in `cperl-style-examples'."
(eval '(mode-compile)))) ; Avoid a warning (eval '(mode-compile)))) ; Avoid a warning
(declare-function Info-find-node "info" (declare-function Info-find-node "info"
(filename nodename &optional no-going-back strict-case)) (filename nodename &optional no-going-back strict-case
noerror))
(defun cperl-info-buffer (type) (defun cperl-info-buffer (type)
;; Return buffer with documentation. Creates if missing. ;; Return buffer with documentation. Creates if missing.

View file

@ -776,8 +776,8 @@ functions are annotated with \"<f>\" via the
;;; Xref backend ;;; Xref backend
(declare-function xref-make "xref" (summary location)) (declare-function xref-make "progmodes/xref" (summary location))
(declare-function xref-item-location "xref" (this)) (declare-function xref-item-location "progmodes/xref" (this))
(defun elisp--xref-backend () 'elisp) (defun elisp--xref-backend () 'elisp)

View file

@ -1144,7 +1144,8 @@ no input, and GDB is waiting for input."
(setq name (nth 1 (split-string define "[( ]"))) (setq name (nth 1 (split-string define "[( ]")))
(push (cons name define) gdb-define-alist)))) (push (cons name define) gdb-define-alist))))
(declare-function tooltip-show "tooltip" (text &optional use-echo-area)) (declare-function tooltip-show "tooltip" (text &optional use-echo-area
text-face default-face))
(defconst gdb--string-regexp (rx "\"" (defconst gdb--string-regexp (rx "\""
(* (or (seq "\\" nonl) (* (or (seq "\\" nonl)

View file

@ -54,8 +54,8 @@
(declare-function gdb-tooltip-print-1 "gdb-mi" (expr)) (declare-function gdb-tooltip-print-1 "gdb-mi" (expr))
(declare-function gud-pp "gdb-mi" (arg)) (declare-function gud-pp "gdb-mi" (arg))
(declare-function gdb-var-delete "gdb-mi" ()) (declare-function gdb-var-delete "gdb-mi" ())
(declare-function speedbar-toggle-line-expansion "gud" ()) (declare-function speedbar-toggle-line-expansion "speedbar" ())
(declare-function speedbar-edit-line "gud" ()) (declare-function speedbar-edit-line "speedbar" ())
;; FIXME: The declares below are necessary because we don't call `gud-def' ;; FIXME: The declares below are necessary because we don't call `gud-def'
;; at toplevel, so the compiler doesn't know under which circumstances ;; at toplevel, so the compiler doesn't know under which circumstances
;; they're defined. ;; they're defined.

View file

@ -1549,7 +1549,7 @@ This command is intended to be bound to a mouse event."
(xref-find-references identifier)) (xref-find-references identifier))
(user-error "No identifier here")))) (user-error "No identifier here"))))
(declare-function apropos-parse-pattern "apropos" (pattern)) (declare-function apropos-parse-pattern "apropos" (pattern &optional do-all))
;;;###autoload ;;;###autoload
(defun xref-find-apropos (pattern) (defun xref-find-apropos (pattern)

View file

@ -97,7 +97,7 @@ the last file dropped is selected."
(declare-function x-handle-args "common-win" (args)) (declare-function x-handle-args "common-win" (args))
(declare-function x-open-connection "pgtkfns.c" (declare-function x-open-connection "pgtkfns.c"
(display &optional xrm-string must-succeed)) (display &optional xrm-string must-succeed))
(declare-function pgtk-set-resource "pgtkfns.c" (owner name value)) (declare-function pgtk-set-resource "pgtkfns.c" (attribute value))
;; Do the actual window system setup here; the above code just defines ;; Do the actual window system setup here; the above code just defines
;; functions and variables that we use now. ;; functions and variables that we use now.

View file

@ -1559,7 +1559,7 @@ EVENT is a preedit-text event."
(defvaralias 'x-gtk-use-system-tooltips 'use-system-tooltips) (defvaralias 'x-gtk-use-system-tooltips 'use-system-tooltips)
(declare-function x-internal-focus-input-context (focus frame) "xfns.c") (declare-function x-internal-focus-input-context "xfns.c" (focus))
(defun x-gtk-use-native-input-watcher (_symbol newval &rest _ignored) (defun x-gtk-use-native-input-watcher (_symbol newval &rest _ignored)
"Variable watcher for `x-gtk-use-native-input'. "Variable watcher for `x-gtk-use-native-input'.

View file

@ -39,7 +39,7 @@
(declare-function flymake-make-diagnostic "flymake" (declare-function flymake-make-diagnostic "flymake"
( locus beg end type text ( locus beg end type text
&optional data overlay-properties)) &optional data overlay-properties))
(declare-function flymake--log-1 (level sublog msg &rest args)) (declare-function flymake--log-1 "flymake" (level sublog msg &rest args))
(eval-when-compile (require 'tex-mode)) (eval-when-compile (require 'tex-mode))
(declare-function tex-buffer "tex-mode" ()) (declare-function tex-buffer "tex-mode" ())

View file

@ -61,10 +61,10 @@
(eval-when-compile (eval-when-compile
(require 'subr-x)) (require 'subr-x))
(declare-function info 'info) (declare-function info "info")
(declare-function Man-find-section 'man) (declare-function Man-find-section "man")
(declare-function Man-next-section 'man) (declare-function Man-next-section "man")
(declare-function Man-getpage-in-background 'man) (declare-function Man-getpage-in-background "man")
(defvar Man-notify-method) (defvar Man-notify-method)

View file

@ -1599,7 +1599,7 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
(declare-function grep-read-regexp "grep" ()) (declare-function grep-read-regexp "grep" ())
(declare-function grep-read-files "grep" (regexp)) (declare-function grep-read-files "grep" (regexp))
(declare-function grep-expand-template "grep" (declare-function grep-expand-template "grep"
(template &optional regexp files dir excl)) (template &optional regexp files dir excl more-opts))
(defvar compilation-environment) (defvar compilation-environment)
;; Derived from `lgrep'. ;; Derived from `lgrep'.

View file

@ -966,7 +966,7 @@ In the latter case, VC mode is deactivated for this buffer."
(defalias 'vc-menu-map vc-menu-map) (defalias 'vc-menu-map vc-menu-map)
(declare-function vc-responsible-backend "vc" (file)) (declare-function vc-responsible-backend "vc" (file &optional no-error))
(defun vc-menu-map-filter (orig-binding) (defun vc-menu-map-filter (orig-binding)
(if (and (symbolp orig-binding) (fboundp orig-binding)) (if (and (symbolp orig-binding) (fboundp orig-binding))

View file

@ -312,8 +312,8 @@ names."
;;;; System name and version for emacsbug.el ;;;; System name and version for emacsbug.el
(declare-function w32-version "w32-win" ()) (declare-function w32-version "term/w32-win" ())
(declare-function w32-read-registry "w32fns" (root key name)) (declare-function w32-read-registry "w32fns.c" (root key name))
(defun w32--os-description () (defun w32--os-description ()
"Return a string describing the underlying OS and its version." "Return a string describing the underlying OS and its version."

View file

@ -403,7 +403,7 @@ Currently XDND, Motif and old KDE 1.x protocols are recognized."
;;; XDND protocol. ;;; XDND protocol.
(declare-function x-change-window-property "xfns.c" (declare-function x-change-window-property "xfns.c"
(prop value &optional frame type format outer-P)) (prop value &optional frame type format outer-P window-id))
(defun x-dnd-init-xdnd-for-frame (frame) (defun x-dnd-init-xdnd-for-frame (frame)
"Set the XdndAware property for FRAME to indicate that we do XDND." "Set the XdndAware property for FRAME to indicate that we do XDND."

View file

@ -36,7 +36,7 @@
(require 'format-spec) (require 'format-spec)
(declare-function make-xwidget "xwidget.c" (declare-function make-xwidget "xwidget.c"
(type title width height arguments &optional buffer related)) (type title width height &optional arguments buffer related))
(declare-function xwidget-buffer "xwidget.c" (xwidget)) (declare-function xwidget-buffer "xwidget.c" (xwidget))
(declare-function set-xwidget-buffer "xwidget.c" (xwidget buffer)) (declare-function set-xwidget-buffer "xwidget.c" (xwidget buffer))
(declare-function xwidget-size-request "xwidget.c" (xwidget)) (declare-function xwidget-size-request "xwidget.c" (xwidget))