chiark / gitweb /
src/lexer-proto.lisp: New parser `must'.
[sod] / src / utilities.lisp
index 72423fded8d86f7e26af1e4d022c6f6cd6c9d5c8..72af8b327138d908d86c6476e58f17f4bea0aa4f 100644 (file)
@@ -708,6 +708,17 @@ (defun compose (function &rest more-functions)
               (multiple-value-call func-b (apply func-a args)))))
     (reduce #'compose1 more-functions :initial-value function)))
 
+;;;--------------------------------------------------------------------------
+;;; Variables.
+
+(export 'defvar-unbound)
+(defmacro defvar-unbound (var doc)
+  "Make VAR a special variable with documentation DOC, but leave it unbound."
+  `(eval-when (:compile-toplevel :load-toplevel :execute)
+     (defvar ,var)
+     (setf (documentation ',var 'variable) ',doc)
+     ',var))
+
 ;;;--------------------------------------------------------------------------
 ;;; Symbols.