diff options
| author | Stefan Monnier | 2009-10-01 17:47:38 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-10-01 17:47:38 +0000 |
| commit | 9d28c33edefe1b366f4c6944886a3e4cf294cf60 (patch) | |
| tree | 49c37c932cee4f48d0bba8b7009ceec71af60d92 /lisp | |
| parent | ced10a4c9f0030e4e554d6ca3f96c6e366dba8db (diff) | |
| download | emacs-9d28c33edefe1b366f4c6944886a3e4cf294cf60.tar.gz 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')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 22 | ||||
| -rw-r--r-- | lisp/subr.el | 64 |
3 files changed, 51 insertions, 40 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 505f9b847c6..b4953592726 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2009-10-01 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2009-10-01 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * subr.el (interactive-p): Mark obsolete. | ||
| 4 | (called-interactively-p): Make the optional-ness of `kind' obsolete. | ||
| 5 | * emacs-lisp/bytecomp.el (byte-compile-fdefinition): Make it obey | ||
| 6 | advertised-signature-table for subroutines as well. | ||
| 7 | |||
| 3 | * emacs-lisp/byte-run.el (advertised-signature-table): New var. | 8 | * emacs-lisp/byte-run.el (advertised-signature-table): New var. |
| 4 | (set-advertised-calling-convention): New function. | 9 | (set-advertised-calling-convention): New function. |
| 5 | (make-obsolete, define-obsolete-function-alias) | 10 | (make-obsolete, define-obsolete-function-alias) |
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'." | |||
| 1248 | (and (not macro-p) | 1248 | (and (not macro-p) |
| 1249 | (byte-code-function-p (symbol-function fn))))) | 1249 | (byte-code-function-p (symbol-function fn))))) |
| 1250 | (setq fn (symbol-function fn))) | 1250 | (setq fn (symbol-function fn))) |
| 1251 | (let ((advertised (gethash fn advertised-signature-table t))) | 1251 | (let ((advertised (gethash (if (and (symbolp fn) (fboundp fn)) |
| 1252 | ;; Could be a subr. | ||
| 1253 | (symbol-function fn) | ||
| 1254 | fn) | ||
| 1255 | advertised-signature-table t))) | ||
| 1252 | (cond | 1256 | (cond |
| 1253 | ((listp advertised) | 1257 | ((listp advertised) |
| 1254 | (if macro-p | 1258 | (if macro-p |
| @@ -3104,14 +3108,14 @@ That command is designed for interactive use only" bytecomp-fn)) | |||
| 3104 | ;; which have special byte codes just for speed. | 3108 | ;; which have special byte codes just for speed. |
| 3105 | 3109 | ||
| 3106 | (defmacro byte-defop-compiler (function &optional compile-handler) | 3110 | (defmacro byte-defop-compiler (function &optional compile-handler) |
| 3107 | ;; add a compiler-form for FUNCTION. | 3111 | "Add a compiler-form for FUNCTION. |
| 3108 | ;; If function is a symbol, then the variable "byte-SYMBOL" must name | 3112 | If function is a symbol, then the variable \"byte-SYMBOL\" must name |
| 3109 | ;; the opcode to be used. If function is a list, the first element | 3113 | the opcode to be used. If function is a list, the first element |
| 3110 | ;; is the function and the second element is the bytecode-symbol. | 3114 | is the function and the second element is the bytecode-symbol. |
| 3111 | ;; The second element may be nil, meaning there is no opcode. | 3115 | The second element may be nil, meaning there is no opcode. |
| 3112 | ;; COMPILE-HANDLER is the function to use to compile this byte-op, or | 3116 | COMPILE-HANDLER is the function to use to compile this byte-op, or |
| 3113 | ;; may be the abbreviations 0, 1, 2, 3, 0-1, or 1-2. | 3117 | may be the abbreviations 0, 1, 2, 3, 0-1, or 1-2. |
| 3114 | ;; If it is nil, then the handler is "byte-compile-SYMBOL." | 3118 | If it is nil, then the handler is \"byte-compile-SYMBOL.\"" |
| 3115 | (let (opcode) | 3119 | (let (opcode) |
| 3116 | (if (symbolp function) | 3120 | (if (symbolp function) |
| 3117 | (setq opcode (intern (concat "byte-" (symbol-name function)))) | 3121 | (setq opcode (intern (concat "byte-" (symbol-name function)))) |
diff --git a/lisp/subr.el b/lisp/subr.el index a7d3fcd600c..20a692c22a8 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1008,6 +1008,39 @@ and `event-end' functions." | |||
| 1008 | 1008 | ||
| 1009 | ;;;; Obsolescent names for functions. | 1009 | ;;;; Obsolescent names for functions. |
| 1010 | 1010 | ||
| 1011 | (define-obsolete-function-alias 'window-dot 'window-point "22.1") | ||
| 1012 | (define-obsolete-function-alias 'set-window-dot 'set-window-point "22.1") | ||
| 1013 | (define-obsolete-function-alias 'read-input 'read-string "22.1") | ||
| 1014 | (define-obsolete-function-alias 'show-buffer 'set-window-buffer "22.1") | ||
| 1015 | (define-obsolete-function-alias 'eval-current-buffer 'eval-buffer "22.1") | ||
| 1016 | (define-obsolete-function-alias 'string-to-int 'string-to-number "22.1") | ||
| 1017 | |||
| 1018 | (make-obsolete 'char-bytes "now always returns 1." "20.4") | ||
| 1019 | (make-obsolete 'forward-point "use (+ (point) N) instead." "23.1") | ||
| 1020 | |||
| 1021 | (defun insert-string (&rest args) | ||
| 1022 | "Mocklisp-compatibility insert function. | ||
| 1023 | Like the function `insert' except that any argument that is a number | ||
| 1024 | is converted into a string by expressing it in decimal." | ||
| 1025 | (dolist (el args) | ||
| 1026 | (insert (if (integerp el) (number-to-string el) el)))) | ||
| 1027 | (make-obsolete 'insert-string 'insert "22.1") | ||
| 1028 | |||
| 1029 | (defun makehash (&optional test) (make-hash-table :test (or test 'eql))) | ||
| 1030 | (make-obsolete 'makehash 'make-hash-table "22.1") | ||
| 1031 | |||
| 1032 | ;; These are used by VM and some old programs | ||
| 1033 | (defalias 'focus-frame 'ignore "") | ||
| 1034 | (make-obsolete 'focus-frame "it does nothing." "22.1") | ||
| 1035 | (defalias 'unfocus-frame 'ignore "") | ||
| 1036 | (make-obsolete 'unfocus-frame "it does nothing." "22.1") | ||
| 1037 | (make-obsolete 'make-variable-frame-local | ||
| 1038 | "explicitly check for a frame-parameter instead." "22.2") | ||
| 1039 | (make-obsolete 'interactive-p 'called-interactively-p "23.2") | ||
| 1040 | (set-advertised-calling-convention 'called-interactively-p '(kind)) | ||
| 1041 | |||
| 1042 | ;;;; Obsolescence declarations for variables, and aliases. | ||
| 1043 | |||
| 1011 | ;; Special "default-FOO" variables which contain the default value of | 1044 | ;; Special "default-FOO" variables which contain the default value of |
| 1012 | ;; the "FOO" variable are nasty. Their implementation is brittle, and | 1045 | ;; the "FOO" variable are nasty. Their implementation is brittle, and |
| 1013 | ;; slows down several unrelated variable operations; furthermore, they | 1046 | ;; slows down several unrelated variable operations; furthermore, they |
| @@ -1047,37 +1080,6 @@ and `event-end' functions." | |||
| 1047 | (make-obsolete-variable 'default-enable-multibyte-characters | 1080 | (make-obsolete-variable 'default-enable-multibyte-characters |
| 1048 | "use enable-multibyte-characters or set-buffer-multibyte instead" "23.2") | 1081 | "use enable-multibyte-characters or set-buffer-multibyte instead" "23.2") |
| 1049 | 1082 | ||
| 1050 | (define-obsolete-function-alias 'window-dot 'window-point "22.1") | ||
| 1051 | (define-obsolete-function-alias 'set-window-dot 'set-window-point "22.1") | ||
| 1052 | (define-obsolete-function-alias 'read-input 'read-string "22.1") | ||
| 1053 | (define-obsolete-function-alias 'show-buffer 'set-window-buffer "22.1") | ||
| 1054 | (define-obsolete-function-alias 'eval-current-buffer 'eval-buffer "22.1") | ||
| 1055 | (define-obsolete-function-alias 'string-to-int 'string-to-number "22.1") | ||
| 1056 | |||
| 1057 | (make-obsolete 'char-bytes "now always returns 1." "20.4") | ||
| 1058 | (make-obsolete 'forward-point "use (+ (point) N) instead." "23.1") | ||
| 1059 | |||
| 1060 | (defun insert-string (&rest args) | ||
| 1061 | "Mocklisp-compatibility insert function. | ||
| 1062 | Like the function `insert' except that any argument that is a number | ||
| 1063 | is converted into a string by expressing it in decimal." | ||
| 1064 | (dolist (el args) | ||
| 1065 | (insert (if (integerp el) (number-to-string el) el)))) | ||
| 1066 | (make-obsolete 'insert-string 'insert "22.1") | ||
| 1067 | |||
| 1068 | (defun makehash (&optional test) (make-hash-table :test (or test 'eql))) | ||
| 1069 | (make-obsolete 'makehash 'make-hash-table "22.1") | ||
| 1070 | |||
| 1071 | ;; These are used by VM and some old programs | ||
| 1072 | (defalias 'focus-frame 'ignore "") | ||
| 1073 | (make-obsolete 'focus-frame "it does nothing." "22.1") | ||
| 1074 | (defalias 'unfocus-frame 'ignore "") | ||
| 1075 | (make-obsolete 'unfocus-frame "it does nothing." "22.1") | ||
| 1076 | (make-obsolete 'make-variable-frame-local | ||
| 1077 | "explicitly check for a frame-parameter instead." "22.2") | ||
| 1078 | |||
| 1079 | ;;;; Obsolescence declarations for variables, and aliases. | ||
| 1080 | |||
| 1081 | (make-obsolete-variable 'define-key-rebound-commands nil "23.2") | 1083 | (make-obsolete-variable 'define-key-rebound-commands nil "23.2") |
| 1082 | (make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1") | 1084 | (make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1") |
| 1083 | (make-obsolete 'window-redisplay-end-trigger nil "23.1") | 1085 | (make-obsolete 'window-redisplay-end-trigger nil "23.1") |