diff options
author | Richard M. Stallman <rms@gnu.org> | 2003-04-24 01:51:54 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2003-04-24 01:51:54 +0000 |
commit | d8c912588720da6b48e4d8ba089244b34a2f48ba (patch) | |
tree | 8d933600212659068ec4907cfc1de4f2ee350e7d /lisp/emacs-lisp | |
parent | 0a08535e77e9f615370bfdcffc85de5a79d57202 (diff) | |
download | emacs-d8c912588720da6b48e4d8ba089244b34a2f48ba.tar.gz emacs-d8c912588720da6b48e4d8ba089244b34a2f48ba.tar.bz2 emacs-d8c912588720da6b48e4d8ba089244b34a2f48ba.zip |
(byte-compile-defun): Generate and compile a defalias form,
unless byte-compile-compatibility.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e8a8a977184..22c798b4ee9 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -10,7 +10,7 @@ ;;; This version incorporates changes up to version 2.10 of the ;;; Zawinski-Furuseth compiler. -(defconst byte-compile-version "$Revision: 2.126 $") +(defconst byte-compile-version "$Revision: 2.127 $") ;; This file is part of GNU Emacs. @@ -3538,11 +3538,20 @@ If FORM is a lambda or a macro, byte-compile it as a function." (byte-compile-set-symbol-position (car form)) (byte-compile-set-symbol-position 'defun) (error "defun name must be a symbol, not %s" (car form))) - (byte-compile-two-args ; Use this to avoid byte-compile-fset's warning. - (list 'fset (list 'quote (nth 1 form)) - (byte-compile-byte-code-maker - (byte-compile-lambda (cons 'lambda (cdr (cdr form))))))) - (byte-compile-discard) + (if (byte-compile-version-cond byte-compile-compatibility) + (progn + (byte-compile-two-args ; Use this to avoid byte-compile-fset's warning. + (list 'fset + (list 'quote (nth 1 form)) + (byte-compile-byte-code-maker + (byte-compile-lambda (cons 'lambda (cdr (cdr form))))))) + (byte-compile-discard)) + (byte-compile-form + (list 'defalias + (list 'quote (nth 1 form)) + (byte-compile-byte-code-maker + (byte-compile-lambda (cons 'lambda (cdr (cdr form)))))) + t)) (byte-compile-constant (nth 1 form))) (defun byte-compile-defmacro (form) |