property lisp hack



Richard Fateman <fateman at eecs.berkeley.edu> writes:
> I doubt that anyone was placing multiple properties with the same
> indicator (= operators) on a symbol's property list.  In fact, it is
> not clear to me that there is an idiom for placing such an extra
> property on a plist.  Maybe extracting the symbol-plist and hacking on
> it with destructive operations?

Well, you don't have to do anything *too* crazy to do it:

CL-USER> (setf (get 'foo 'a) 1)
1
CL-USER> (setf (symbol-plist 'foo) (append '(a 2) (symbol-plist 'foo)))
(A 2 A 1)
CL-USER> (get 'foo 'a)
2
CL-USER> (setf (get 'foo 'a) 3)
3
CL-USER> (get 'foo 'a)
3
CL-USER> (symbol-plist 'foo)
(A 3 A 1)

But if you don't remember anyone using this, I agree we should probably
assume there's no danger of breaking legacy code.

Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120806/9293e572/attachment.pgp>;