changeset 50680:ae1e2c38d746

(byte-compile-defun): Generate and compile a defalias form, unless byte-compile-compatibility.
author Richard M. Stallman <rms@gnu.org>
date Thu, 24 Apr 2003 01:51:54 +0000
parents d92b5086170c
children bf8d1b20e95e
files lisp/emacs-lisp/bytecomp.el
diffstat 1 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el	Thu Apr 24 01:41:45 2003 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Thu Apr 24 01:51:54 2003 +0000
@@ -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 @@
       (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)