Mercurial > emacs
comparison lisp/emacs-lisp/bytecomp.el @ 1819:df06a60f3362
* disass.el (disassemble): Add autoload cookie for this.
* bytecomp.el (byte-decompile-bytecode): Add an autoload for this.
compiled-function-p has been renamed to byte-code-function-p.
* subr.el: Define compiled-function-p as an alias for it.
* bytecomp.el: Register compiled-function-p as obsolete.
* bytecomp.el, byte-opt.el, disass.el, help.el, map-ynp.el: Change
uses.
unread-command-event has been replaced by unread-command-events.
* simple.el (prefix-arg-internal): Use this to push back all
key sequences for processing by the main command loop, instead of
trying to simulate its behavior ourselves.
* bytecomp.el: Document unread-command-event as an obsolete
variable, although nothing but the GNU Emacs 19 sources use it.
Adjust obsolescence message for unread-command-char.
* comint.el (comint-dynamic-list-completions): Change uses of
unread-command-event to work with unread-command-events.
* ebuff-menu.el (electric-buffer-list, Electric-buffer-menu-exit):
Same.
* edebug.el (edebug-outside-excursion): Same.
* ehelp.el (electric-help-command-loop): Same.
* electric.el (Electric-command-loop): Same.
* emerge.el (emerge-show-file-name): Same.
* fortran.el (fortran-abbrev-start,
fortran-window-create-momentarily): Same.
* gnus.el (gnus-Subject-next-article): Same.
* info.el (Info-summary): Same.
* isearch-mode.el (isearch-update, isearch-unread): Same.
* map-ynp.el (map-y-or-n-p): Same.
* mlsupport.el (push-back-character): Same.
* replace.el (perform-replace): Same.
* simula.el (simula-electric-label): Same.
* subr.el (read-quoted-char, momentary-string-display): Same.
* sun-mouse.el (mouse-second-hit): Same.
* terminal.el (te-escape-extended-command-unread): Same.
* vip.el (vip-escape-to-emacs, vip-prefix-arg-value,
vip-prefix-arg-com): Same.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Tue, 26 Jan 1993 01:36:02 +0000 |
parents | 25173c1db5a6 |
children | 83fc53d66a31 |
comparison
equal
deleted
inserted
replaced
1818:7e3322619e46 | 1819:df06a60f3362 |
---|---|
175 ;; (progn | 175 ;; (progn |
176 ;; ;; emacs-18 compatibility. | 176 ;; ;; emacs-18 compatibility. |
177 ;; (defvar baud-rate (baud-rate)) ;Define baud-rate if it's undefined | 177 ;; (defvar baud-rate (baud-rate)) ;Define baud-rate if it's undefined |
178 ;; | 178 ;; |
179 ;; (if (byte-compile-single-version) | 179 ;; (if (byte-compile-single-version) |
180 ;; (defmacro compiled-function-p (x) "Emacs 18 doesn't have these." nil) | 180 ;; (defmacro byte-code-function-p (x) "Emacs 18 doesn't have these." nil) |
181 ;; (defun compiled-function-p (x) "Emacs 18 doesn't have these." nil)) | 181 ;; (defun byte-code-function-p (x) "Emacs 18 doesn't have these." nil)) |
182 ;; | 182 ;; |
183 ;; (or (and (fboundp 'member) | 183 ;; (or (and (fboundp 'member) |
184 ;; ;; avoid using someone else's possibly bogus definition of this. | 184 ;; ;; avoid using someone else's possibly bogus definition of this. |
185 ;; (subrp (symbol-function 'member))) | 185 ;; (subrp (symbol-function 'member))) |
186 ;; (defun member (elt list) | 186 ;; (defun member (elt list) |
212 ;; This is the entrypoint to the lapcode optimizer pass1. | 212 ;; This is the entrypoint to the lapcode optimizer pass1. |
213 (autoload 'byte-optimize-form "byte-opt") | 213 (autoload 'byte-optimize-form "byte-opt") |
214 ;; This is the entrypoint to the lapcode optimizer pass2. | 214 ;; This is the entrypoint to the lapcode optimizer pass2. |
215 (autoload 'byte-optimize-lapcode "byte-opt") | 215 (autoload 'byte-optimize-lapcode "byte-opt") |
216 (autoload 'byte-compile-unfold-lambda "byte-opt") | 216 (autoload 'byte-compile-unfold-lambda "byte-opt") |
217 | |
218 ;; This is the entry point to the decompiler, which is used by the | |
219 ;; disassembler. The disassembler just requires 'byte-compile, but | |
220 ;; that doesn't define this function, so this seems to be a reasonable | |
221 ;; thing to do. | |
222 (autoload 'byte-decompile-bytecode "byte-opt") | |
217 | 223 |
218 (defvar byte-compile-verbose | 224 (defvar byte-compile-verbose |
219 (and (not noninteractive) (> baud-rate search-slow-speed)) | 225 (and (not noninteractive) (> baud-rate search-slow-speed)) |
220 "*Non-nil means print messages describing progress of byte-compiler.") | 226 "*Non-nil means print messages describing progress of byte-compiler.") |
221 | 227 |
835 (while (and (symbolp fn) | 841 (while (and (symbolp fn) |
836 (fboundp fn) | 842 (fboundp fn) |
837 (or (symbolp (symbol-function fn)) | 843 (or (symbolp (symbol-function fn)) |
838 (consp (symbol-function fn)) | 844 (consp (symbol-function fn)) |
839 (and (not macro-p) | 845 (and (not macro-p) |
840 (compiled-function-p (symbol-function fn))))) | 846 (byte-code-function-p (symbol-function fn))))) |
841 (setq fn (symbol-function fn))) | 847 (setq fn (symbol-function fn))) |
842 (if (and (not macro-p) (compiled-function-p fn)) | 848 (if (and (not macro-p) (byte-code-function-p fn)) |
843 fn | 849 fn |
844 (and (consp fn) | 850 (and (consp fn) |
845 (if (eq 'macro (car fn)) | 851 (if (eq 'macro (car fn)) |
846 (cdr fn) | 852 (cdr fn) |
847 (if macro-p | 853 (if macro-p |
1874 (not (get (get fn 'byte-opcode) 'emacs19-opcode)))) | 1880 (not (get (get fn 'byte-opcode) 'emacs19-opcode)))) |
1875 (funcall handler form) | 1881 (funcall handler form) |
1876 (if (memq 'callargs byte-compile-warnings) | 1882 (if (memq 'callargs byte-compile-warnings) |
1877 (byte-compile-callargs-warn form)) | 1883 (byte-compile-callargs-warn form)) |
1878 (byte-compile-normal-call form)))) | 1884 (byte-compile-normal-call form)))) |
1879 ((and (or (compiled-function-p (car form)) | 1885 ((and (or (byte-code-function-p (car form)) |
1880 (eq (car-safe (car form)) 'lambda)) | 1886 (eq (car-safe (car form)) 'lambda)) |
1881 ;; if the form comes out the same way it went in, that's | 1887 ;; if the form comes out the same way it went in, that's |
1882 ;; because it was malformed, and we couldn't unfold it. | 1888 ;; because it was malformed, and we couldn't unfold it. |
1883 (not (eq form (setq form (byte-compile-unfold-lambda form))))) | 1889 (not (eq form (setq form (byte-compile-unfold-lambda form))))) |
1884 (byte-compile-form form for-effect) | 1890 (byte-compile-form form for-effect) |
2849 " <not defined>")) | 2855 " <not defined>")) |
2850 ((subrp (setq f (symbol-function f))) | 2856 ((subrp (setq f (symbol-function f))) |
2851 " <subr>") | 2857 " <subr>") |
2852 ((symbolp f) | 2858 ((symbolp f) |
2853 (format " ==> %s" f)) | 2859 (format " ==> %s" f)) |
2854 ((compiled-function-p f) | 2860 ((byte-code-function-p f) |
2855 "<compiled function>") | 2861 "<compiled function>") |
2856 ((not (consp f)) | 2862 ((not (consp f)) |
2857 "<malformed function>") | 2863 "<malformed function>") |
2858 ((eq 'macro (car f)) | 2864 ((eq 'macro (car f)) |
2859 (if (or (compiled-function-p (cdr f)) | 2865 (if (or (byte-code-function-p (cdr f)) |
2860 (assq 'byte-code (cdr (cdr (cdr f))))) | 2866 (assq 'byte-code (cdr (cdr (cdr f))))) |
2861 " <compiled macro>" | 2867 " <compiled macro>" |
2862 " <macro>")) | 2868 " <macro>")) |
2863 ((assq 'byte-code (cdr (cdr f))) | 2869 ((assq 'byte-code (cdr (cdr f))) |
2864 "<compiled lambda>") | 2870 "<compiled lambda>") |
2965 (make-obsolete 'dot-min 'point-min) | 2971 (make-obsolete 'dot-min 'point-min) |
2966 (make-obsolete 'dot-marker 'point-marker) | 2972 (make-obsolete 'dot-marker 'point-marker) |
2967 | 2973 |
2968 (make-obsolete 'buffer-flush-undo 'buffer-disable-undo) | 2974 (make-obsolete 'buffer-flush-undo 'buffer-disable-undo) |
2969 (make-obsolete 'baud-rate "use the baud-rate variable instead") | 2975 (make-obsolete 'baud-rate "use the baud-rate variable instead") |
2976 (make-obsolete 'compiled-function-p 'byte-code-function-p) | |
2970 (make-obsolete-variable 'auto-fill-hook 'auto-fill-function) | 2977 (make-obsolete-variable 'auto-fill-hook 'auto-fill-function) |
2971 (make-obsolete-variable 'blink-paren-hook 'blink-paren-function) | 2978 (make-obsolete-variable 'blink-paren-hook 'blink-paren-function) |
2972 (make-obsolete-variable 'lisp-indent-hook 'lisp-indent-function) | 2979 (make-obsolete-variable 'lisp-indent-hook 'lisp-indent-function) |
2973 (make-obsolete-variable 'temp-buffer-show-hook | 2980 (make-obsolete-variable 'temp-buffer-show-hook |
2974 'temp-buffer-show-function) | 2981 'temp-buffer-show-function) |
2975 (make-obsolete-variable 'inhibit-local-variables | 2982 (make-obsolete-variable 'inhibit-local-variables |
2976 "use enable-local-variables (with the reversed sense.)") | 2983 "use enable-local-variables (with the reversed sense.)") |
2977 (make-obsolete-variable 'unread-command-char | 2984 (make-obsolete-variable 'unread-command-char |
2978 "use unread-command-event; now nil means `no event', instead of -1.") | 2985 "use unread-command-events instead. That variable is a list of events to reread, so it now uses nil to mean `no event', instead of -1.") |
2986 (make-obsolete-variable 'unread-command-event | |
2987 "use unread-command-events; this is now a list of events.") | |
2979 | 2988 |
2980 (provide 'byte-compile) | 2989 (provide 'byte-compile) |
2981 | 2990 |
2982 | 2991 |
2983 ;;; report metering (see the hacks in bytecode.c) | 2992 ;;; report metering (see the hacks in bytecode.c) |
3010 | 3019 |
3011 ;; To avoid "lisp nesting exceeds max-lisp-eval-depth" when bytecomp compiles | 3020 ;; To avoid "lisp nesting exceeds max-lisp-eval-depth" when bytecomp compiles |
3012 ;; itself, compile some of its most used recursive functions (at load time). | 3021 ;; itself, compile some of its most used recursive functions (at load time). |
3013 ;; | 3022 ;; |
3014 (eval-when-compile | 3023 (eval-when-compile |
3015 (or (compiled-function-p (symbol-function 'byte-compile-form)) | 3024 (or (byte-code-function-p (symbol-function 'byte-compile-form)) |
3016 (assq 'byte-code (symbol-function 'byte-compile-form)) | 3025 (assq 'byte-code (symbol-function 'byte-compile-form)) |
3017 (let ((byte-optimize nil) ; do it fast | 3026 (let ((byte-optimize nil) ; do it fast |
3018 (byte-compile-warnings nil)) | 3027 (byte-compile-warnings nil)) |
3019 (mapcar '(lambda (x) | 3028 (mapcar '(lambda (x) |
3020 (or noninteractive (message "compiling %s..." x)) | 3029 (or noninteractive (message "compiling %s..." x)) |