emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/byte-run.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/byte-run.el,v
Date: Sat, 17 Nov 2007 03:45:17 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       07/11/17 03:45:17

Index: byte-run.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/byte-run.el,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- byte-run.el 26 Jul 2007 05:26:44 -0000      1.22
+++ byte-run.el 17 Nov 2007 03:45:17 -0000      1.23
@@ -103,6 +103,25 @@
      (eval-and-compile
        (put ',name 'byte-optimizer 'byte-compile-inline-expand))))
 
+(defmacro declare-function (fn file &optional arglist)
+  "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
+`check-declare' package, which checks that FILE contains a
+definition for FN.  FILE should be either absolute, or relative
+to the location of the file containing the declaration.  ARGLIST
+is used by both the byte-compiler and `check-declare' to check
+for consistency.
+
+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:
+
+\(declare-function c-end-of-defun \"progmodes/cc-cmds.el\"
+                  \(&optional arg))"
+  ;; Does nothing - byte-compile-declare-function does the work.
+  )
+
 (defun make-obsolete (obsolete-name current-name &optional when)
   "Make the byte-compiler warn that OBSOLETE-NAME is obsolete.
 The warning will say that CURRENT-NAME should be used instead.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]