projects
/
kmrcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
r9173: add defconst
[kmrcl.git]
/
macros.lisp
diff --git
a/macros.lisp
b/macros.lisp
index bf2714b86d441eec6f9d0c4bbce5a64f7f539d73..1239eb46b6d7d7cce32b073edc15d0d53a23efe8 100644
(file)
--- a/
macros.lisp
+++ b/
macros.lisp
@@
-254,3
+254,9
@@
(pprint exp)))
(format t "~%~%")
(values)))
+
+(defmacro defconst (symbol value &optional doc)
+ `(defconstant ,symbol (if (boundp ',symbol)
+ (symbol-value ',symbol)
+ ,value)
+ ,@(when doc (list doc))))