3 ;; JSCL is free software: you can redistribute it and/or
4 ;; modify it under the terms of the GNU General Public License as
5 ;; published by the Free Software Foundation, either version 3 of the
6 ;; License, or (at your option) any later version.
8 ;; JSCL is distributed in the hope that it will be useful, but
9 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
10 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 ;; General Public License for more details.
13 ;; You should have received a copy of the GNU General Public License
14 ;; along with JSCL. If not, see <http://www.gnu.org/licenses/>.
16 (defun symbol-plist (x)
18 ((symbolp x) (error "`~a' is not a symbol." x))
19 ((in "plist" x) (oget* x "plist"))))
21 (defun set-symbol-plist (new-value x)
23 (oset* new-value x "plist")
24 (error "`~a' is not a symbol." x)))
26 (define-setf-expander symbol-plist (x)
32 `(set-symbol-plist ,g!value ,g!x)
33 `(symbol-plist ,g!value))))
35 (defun get (symbol indicator &optional default)
36 (getf (symbol-plist symbol) indicator default))