diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-05-26 19:10:26 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-05-26 19:10:47 -0700 |
commit | f865e2f1e8878f7992d61a39bceb369c28a77706 (patch) | |
tree | e289a0ecdc822544877a6fe7839bd2b7803352ef /lisp/emacs-lisp | |
parent | 2f58c503dd8acd3429469d76d04976a9017b87e3 (diff) | |
download | emacs-f865e2f1e8878f7992d61a39bceb369c28a77706.tar.gz |
Fix byte-compiler pacification for declare-function
Problem reported by Michael Heerdegen in:
http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00590.html
* lisp/emacs-lisp/bytecomp.el:
(byte-compile-macroexpand-declare-function):
Revert signature to previous value.
* lisp/subr.el (declare-function): Change signature to
match the reverted signature used in the byte compiler.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index aa13210b633..11eb44cea31 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2958,24 +2958,23 @@ for symbols generated by the byte compiler itself." (list body)))) ;; Special macro-expander used during byte-compilation. -(defun byte-compile-macroexpand-declare-function (fn file &optional arglist - fileonly) - (let ((gotargs (listp arglist)) +(defun byte-compile-macroexpand-declare-function (fn file &rest args) + (let ((gotargs (and (consp args) (listp (car args)))) (unresolved (assq fn byte-compile-unresolved-functions))) (when unresolved ; function was called before declaration (if (and gotargs (byte-compile-warning-enabled-p 'callargs)) - (byte-compile-arglist-warn fn arglist nil) + (byte-compile-arglist-warn fn (car args) nil) (setq byte-compile-unresolved-functions (delq unresolved byte-compile-unresolved-functions)))) (push (cons fn (if gotargs - (list 'declared arglist) + (list 'declared (car args)) t)) ; Arglist not specified. byte-compile-function-environment)) ;; We are stating that it _will_ be defined at runtime. (setq byte-compile-noruntime-functions (delq fn byte-compile-noruntime-functions)) ;; Delegate the rest to the normal macro definition. - (macroexpand `(declare-function ,fn ,file ,arglist ,fileonly))) + (macroexpand `(declare-function ,fn ,file ,@args))) ;; This is the recursive entry point for compiling each subform of an |