# HG changeset patch # User Glenn Morris # Date 1196408664 0 # Node ID 9b46232ba8015ef5b57e00dc5d9ec9529a3b0766 # Parent 3f1cc6c15b1dca712e69ff4cfc6b4468742fb197 (declare-function): Add optional fourth argument and document it. diff -r 3f1cc6c15b1d -r 9b46232ba801 lisp/emacs-lisp/byte-run.el --- a/lisp/emacs-lisp/byte-run.el Fri Nov 30 05:09:42 2007 +0000 +++ b/lisp/emacs-lisp/byte-run.el Fri Nov 30 07:44:24 2007 +0000 @@ -103,7 +103,7 @@ (eval-and-compile (put ',name 'byte-optimizer 'byte-compile-inline-expand)))) -(defmacro declare-function (fn file &optional arglist) +(defmacro declare-function (fn file &optional arglist fileonly) "Tell the byte-compiler that function FN is defined, in FILE. Optional ARGLIST is the argument list used by the function. The FILE argument is not used by the byte-compiler, but by the @@ -120,6 +120,15 @@ `check-declare' will check such files if they are found, and skip them without error if they are not. +FILEONLY non-nil means that `check-declare' will only check that +FILE exists, not that it defines FN. This is intended for +function-definitions that `check-declare' does not recognize, e.g. +`defstruct'. + +To specify a value for FILEONLY without passing an argument list, +set ARGLIST to `t'. This is necessary because `nil' means an +empty argument list, rather than an unspecified one. + Note that for the purposes of `check-declare', this statement must be the first non-whitespace on a line, and everything up to the end of FILE must be all on the same line. For example: