Index: primitives.lisp =================================================================== RCS file: /sources/stumpwm/stumpwm/primitives.lisp,v retrieving revision 1.22 diff -u -r1.22 primitives.lisp --- primitives.lisp 7 Apr 2006 02:26:51 -0000 1.22 +++ primitives.lisp 7 Apr 2006 22:11:20 -0000 @@ -26,6 +26,13 @@ (in-package :stumpwm) +(defmacro defconst (name initial-value &optional doc) + "Only evaluates INITIAL-VALUE when NAME is unbound to a value." + `(eval-when (:compile-toplevel :load-toplevel :execute) + (if (boundp ',name) + ',name + (defconstant ,name ,initial-value ,@(when doc (list doc)))))) + (defun char->keysym (ch) "Convert a char to a keysym" (first (xlib:character->keysyms ch))) @@ -134,10 +141,10 @@ "A list of key-bindings for line editing.") ;; default values. use the set-* functions to change them -(defconstant +default-foreground-color+ "White") -(defconstant +default-background-color+ "Black") -(defconstant +default-border-color+ "White") -(defconstant +default-font-name+ "9x15bold") +(defconst +default-foreground-color+ "White") +(defconst +default-background-color+ "Black") +(defconst +default-border-color+ "White") +(defconst +default-font-name+ "9x15bold") (defvar *top-level-error-action* :message "If an error is encountered at the top level, in