Closed digikar99 closed 11 months ago
Especially when symbol macros are supplied through augment environment instead of being processed directly, SETF fails to respect them.
CL-USER> (let ((env (augment-environment nil :symbol-macro (list (list 'elt '(aref a 0)))))) (macroexpand-1 'elt env)) (AREF A 0) T CL-USER> (let ((env (augment-environment nil :symbol-macro (list (list 'elt '(aref a 0)))))) (macroexpand-1 '(setf elt 1) env)) (SETQ ELT 1) T
The following works though:
CL-USER> (let ((a (make-array 10))) (symbol-macrolet ((elt (aref a 0))) (setf elt 1)) a) #(1 0 0 0 0 0 0 0 0 0)
Especially when symbol macros are supplied through augment environment instead of being processed directly, SETF fails to respect them.
The following works though: