Mercurial > emacs
diff lisp/emacs-lisp/bytecomp.el @ 105364:338d102432df
* eval.c (Fcalled_interactively_p): Add `kind' argument.
* subr.el (interactive-p): Mark obsolete.
(called-interactively-p): Make the optional-ness of `kind' obsolete.
* emacs-lisp/bytecomp.el (byte-compile-fdefinition): Make it obey
advertised-signature-table for subroutines as well.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 01 Oct 2009 17:47:38 +0000 |
parents | a3acd4b1e5cc |
children | 83e7d269fc49 |
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el Thu Oct 01 16:54:21 2009 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Thu Oct 01 17:47:38 2009 +0000 @@ -1248,7 +1248,11 @@ (and (not macro-p) (byte-code-function-p (symbol-function fn))))) (setq fn (symbol-function fn))) - (let ((advertised (gethash fn advertised-signature-table t))) + (let ((advertised (gethash (if (and (symbolp fn) (fboundp fn)) + ;; Could be a subr. + (symbol-function fn) + fn) + advertised-signature-table t))) (cond ((listp advertised) (if macro-p @@ -3104,14 +3108,14 @@ ;; which have special byte codes just for speed. (defmacro byte-defop-compiler (function &optional compile-handler) - ;; add a compiler-form for FUNCTION. - ;; If function is a symbol, then the variable "byte-SYMBOL" must name - ;; the opcode to be used. If function is a list, the first element - ;; is the function and the second element is the bytecode-symbol. - ;; The second element may be nil, meaning there is no opcode. - ;; COMPILE-HANDLER is the function to use to compile this byte-op, or - ;; may be the abbreviations 0, 1, 2, 3, 0-1, or 1-2. - ;; If it is nil, then the handler is "byte-compile-SYMBOL." + "Add a compiler-form for FUNCTION. +If function is a symbol, then the variable \"byte-SYMBOL\" must name +the opcode to be used. If function is a list, the first element +is the function and the second element is the bytecode-symbol. +The second element may be nil, meaning there is no opcode. +COMPILE-HANDLER is the function to use to compile this byte-op, or +may be the abbreviations 0, 1, 2, 3, 0-1, or 1-2. +If it is nil, then the handler is \"byte-compile-SYMBOL.\"" (let (opcode) (if (symbolp function) (setq opcode (intern (concat "byte-" (symbol-name function))))