From d8c912588720da6b48e4d8ba089244b34a2f48ba Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 24 Apr 2003 01:51:54 +0000 Subject: [PATCH] (byte-compile-defun): Generate and compile a defalias form, unless byte-compile-compatibility. --- lisp/emacs-lisp/bytecomp.el | 21 +++++++++++++++------ 1 file 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) -- 2.39.2