aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2016-05-18 00:14:18 -0700
committerPaul Eggert2016-05-18 00:49:30 -0700
commitb4d1cddc1b238f0c53ef7eb52e7dcf3467d412ea (patch)
treee88e8311139320dc5d83ac30971b08f2d58f7ea4
parent639fd22e294fa1702c93531ebb96efb4f3cdffbd (diff)
downloademacs-b4d1cddc1b238f0c53ef7eb52e7dcf3467d412ea.tar.gz
emacs-b4d1cddc1b238f0c53ef7eb52e7dcf3467d412ea.zip
Pacify byte-compiler for byte-compile-macroexpand-declare-function
* lisp/emacs-lisp/bytecomp.el: Change signature of byte-compile-macroexpand-declare-function to match that of declare-function.
-rw-r--r--lisp/emacs-lisp/bytecomp.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 11eb44cea31..aa13210b633 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2958,23 +2958,24 @@ for symbols generated by the byte compiler itself."
2958 (list body)))) 2958 (list body))))
2959 2959
2960;; Special macro-expander used during byte-compilation. 2960;; Special macro-expander used during byte-compilation.
2961(defun byte-compile-macroexpand-declare-function (fn file &rest args) 2961(defun byte-compile-macroexpand-declare-function (fn file &optional arglist
2962 (let ((gotargs (and (consp args) (listp (car args)))) 2962 fileonly)
2963 (let ((gotargs (listp arglist))
2963 (unresolved (assq fn byte-compile-unresolved-functions))) 2964 (unresolved (assq fn byte-compile-unresolved-functions)))
2964 (when unresolved ; function was called before declaration 2965 (when unresolved ; function was called before declaration
2965 (if (and gotargs (byte-compile-warning-enabled-p 'callargs)) 2966 (if (and gotargs (byte-compile-warning-enabled-p 'callargs))
2966 (byte-compile-arglist-warn fn (car args) nil) 2967 (byte-compile-arglist-warn fn arglist nil)
2967 (setq byte-compile-unresolved-functions 2968 (setq byte-compile-unresolved-functions
2968 (delq unresolved byte-compile-unresolved-functions)))) 2969 (delq unresolved byte-compile-unresolved-functions))))
2969 (push (cons fn (if gotargs 2970 (push (cons fn (if gotargs
2970 (list 'declared (car args)) 2971 (list 'declared arglist)
2971 t)) ; Arglist not specified. 2972 t)) ; Arglist not specified.
2972 byte-compile-function-environment)) 2973 byte-compile-function-environment))
2973 ;; We are stating that it _will_ be defined at runtime. 2974 ;; We are stating that it _will_ be defined at runtime.
2974 (setq byte-compile-noruntime-functions 2975 (setq byte-compile-noruntime-functions
2975 (delq fn byte-compile-noruntime-functions)) 2976 (delq fn byte-compile-noruntime-functions))
2976 ;; Delegate the rest to the normal macro definition. 2977 ;; Delegate the rest to the normal macro definition.
2977 (macroexpand `(declare-function ,fn ,file ,@args))) 2978 (macroexpand `(declare-function ,fn ,file ,arglist ,fileonly)))
2978 2979
2979 2980
2980;; This is the recursive entry point for compiling each subform of an 2981;; This is the recursive entry point for compiling each subform of an