diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-10-01 17:47:38 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-10-01 17:47:38 +0000 |
commit | 9d28c33edefe1b366f4c6944886a3e4cf294cf60 (patch) | |
tree | 49c37c932cee4f48d0bba8b7009ceec71af60d92 /lisp/emacs-lisp | |
parent | ced10a4c9f0030e4e554d6ca3f96c6e366dba8db (diff) | |
download | emacs-9d28c33edefe1b366f4c6944886a3e4cf294cf60.tar.gz emacs-9d28c33edefe1b366f4c6944886a3e4cf294cf60.tar.bz2 emacs-9d28c33edefe1b366f4c6944886a3e4cf294cf60.zip |
* 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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index f411576c883..1262264e9ec 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1248,7 +1248,11 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." (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 @@ That command is designed for interactive use only" bytecomp-fn)) ;; 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)))) |