changeset 20749:e87544dbfacb

(byte-optimize-form-code-walker): If compiler-macroexpand is defined, use it.
author Richard M. Stallman <rms@gnu.org>
date Thu, 22 Jan 1998 02:23:21 +0000
parents 2e68ae1d1928
children df2745fa6999
files lisp/emacs-lisp/byte-opt.el
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/byte-opt.el	Thu Jan 22 02:15:35 1998 +0000
+++ b/lisp/emacs-lisp/byte-opt.el	Thu Jan 22 02:23:21 1998 +0000
@@ -504,6 +504,13 @@
 		    (setq form (macroexpand form
 					    byte-compile-macro-environment))))
 	   (byte-optimize-form form for-effect))
+
+	  ;; Support compiler macros as in cl.el.
+	  ((and (fboundp 'compiler-macroexpand)
+	        (not (eq form
+		         (setq form (compiler-macroexpand form
+		                     byte-compile-macro-environment)))))
+	   (byte-optimize-form form for-effect))
 	  
 	  ((not (symbolp fn))
 	   (or (eq 'mocklisp (car-safe fn)) ; ha!