From ca9f31a29bf8a54975a8da3a8172a004dad3ed9a Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Mon, 12 Nov 2012 21:16:44 +0100 Subject: [PATCH] Add COMPILER-MACRO aliases --- src/base/defalias.lisp | 14 +++++++++++++- src/base/pkgdcl.lisp | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/base/defalias.lisp b/src/base/defalias.lisp index 96bf728..a294dae 100644 --- a/src/base/defalias.lisp +++ b/src/base/defalias.lisp @@ -33,7 +33,8 @@ (setf (fdefinition ',alias) (fdefinition ',original)) (setf (documentation ',alias 'function) - (documentation ',original 'function)))) + (documentation ',original 'function)) + (defalias (compiler-macro ,alias) ,original))) (defnamespace macro "The namespace of macros.") @@ -46,6 +47,17 @@ (setf (documentation ',alias 'function) (documentation ',original 'function)))) +(defnamespace compiler-macro + "The namespace of compiler macros.") + +(defmethod make-alias ((namespace (eql 'compiler-macro)) + original alias) + `(progn + (setf (compiler-macro-function ',alias) + (compiler-macro-function ',original)) + (setf (documentation ',alias 'compiler-macro) + (documentation ',original 'compiler-macro)))) + (defnamespace special "The namespace of special variables.") diff --git a/src/base/pkgdcl.lisp b/src/base/pkgdcl.lisp index 55f87a5..3970d42 100644 --- a/src/base/pkgdcl.lisp +++ b/src/base/pkgdcl.lisp @@ -34,6 +34,7 @@ #:make-alias #:defalias ;; #:function is already in CL + ;; #:compiler-macro is already in CL #:macro #:constant ;; #:special is already in CL -- 2.11.4.GIT