aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2007-11-30 07:44:24 +0000
committerGlenn Morris2007-11-30 07:44:24 +0000
commit7b58c351cf9f19ac243f33efcab74d475a58f947 (patch)
tree123100bbf646dc60b179931421ff58d29108bb83
parent393209d6fc1ad24576d8cfecfebd954d87cd0f05 (diff)
downloademacs-7b58c351cf9f19ac243f33efcab74d475a58f947.tar.gz
emacs-7b58c351cf9f19ac243f33efcab74d475a58f947.zip
(declare-function): Add optional fourth argument and document it.
-rw-r--r--lisp/emacs-lisp/byte-run.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 0445e7ca63e..6a5458df30f 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -103,7 +103,7 @@ The return value of this function is not used."
103 (eval-and-compile 103 (eval-and-compile
104 (put ',name 'byte-optimizer 'byte-compile-inline-expand)))) 104 (put ',name 'byte-optimizer 'byte-compile-inline-expand))))
105 105
106(defmacro declare-function (fn file &optional arglist) 106(defmacro declare-function (fn file &optional arglist fileonly)
107 "Tell the byte-compiler that function FN is defined, in FILE. 107 "Tell the byte-compiler that function FN is defined, in FILE.
108Optional ARGLIST is the argument list used by the function. The 108Optional ARGLIST is the argument list used by the function. The
109FILE argument is not used by the byte-compiler, but by the 109FILE argument is not used by the byte-compiler, but by the
@@ -120,6 +120,15 @@ declaration. A FILE with an \"ext:\" prefix is an external file.
120`check-declare' will check such files if they are found, and skip 120`check-declare' will check such files if they are found, and skip
121them without error if they are not. 121them without error if they are not.
122 122
123FILEONLY non-nil means that `check-declare' will only check that
124FILE exists, not that it defines FN. This is intended for
125function-definitions that `check-declare' does not recognize, e.g.
126`defstruct'.
127
128To specify a value for FILEONLY without passing an argument list,
129set ARGLIST to `t'. This is necessary because `nil' means an
130empty argument list, rather than an unspecified one.
131
123Note that for the purposes of `check-declare', this statement 132Note that for the purposes of `check-declare', this statement
124must be the first non-whitespace on a line, and everything up to 133must be the first non-whitespace on a line, and everything up to
125the end of FILE must be all on the same line. For example: 134the end of FILE must be all on the same line. For example: