From 5428ee0299d1a757ed2459342104354b1ab98708 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 22 Jan 1998 02:23:21 +0000 Subject: [PATCH] (byte-optimize-form-code-walker): If compiler-macroexpand is defined, use it. --- lisp/emacs-lisp/byte-opt.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index be958e53abb..90154728f34 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -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! -- 2.39.2