[cmucl-imp] Source location for symbol macros
The patch below adds source location recording to define-symbol-macro. Helmut
On Sun, Dec 16 2012, Helmut Eller wrote:
The patch below adds source location recording to define-symbol-macro.
Let's see if the patch passes this time: diff --git a/src/code/macros.lisp b/src/code/macros.lisp index 934bcbb..892e1cf 100644 --- a/src/code/macros.lisp +++ b/src/code/macros.lisp @@ -192,9 +192,9 @@ ;;; (defmacro define-symbol-macro (name expansion) `(eval-when (:compile-toplevel :load-toplevel :execute) - (%define-symbol-macro ',name ',expansion))) + (%define-symbol-macro ',name ',expansion (c::source-location)))) ;;; -(defun %define-symbol-macro (name expansion) +(defun %define-symbol-macro (name expansion source-location) (unless (symbolp name) (error 'simple-type-error :datum name :expected-type 'symbol :format-control (intl:gettext "Symbol macro name is not a symbol: ~S.") @@ -202,7 +202,8 @@ (ecase (info variable kind name) ((:macro :global nil) (setf (info variable kind name) :macro) - (setf (info variable macro-expansion name) expansion)) + (setf (info variable macro-expansion name) expansion) + (set-defvar-source-location name source-location)) (:special (error 'simple-program-error :format-control (intl:gettext "Symbol macro name already declared special: ~S.")
"Helmut" == Helmut Eller <heller@common-lisp.net> writes:
Helmut> On Sun, Dec 16 2012, Helmut Eller wrote: >> The patch below adds source location recording to define-symbol-macro. Helmut> Let's see if the patch passes this time: Got it. I've applied the patch. Thanks! Ray
participants (2)
-
Helmut Eller -
Raymond Toy