[mcclim-cvs] CVS mcclim/ESA

thenriksen thenriksen at common-lisp.net
Sun Jun 15 09:01:33 UTC 2008


Update of /project/mcclim/cvsroot/mcclim/ESA
In directory clnet:/tmp/cvs-serv21340/ESA

Modified Files:
	packages.lisp utils.lisp 
Log Message:
Added FORMAT-SYM function from Maciej Katafiasz to ESA-UTILS.


--- /project/mcclim/cvsroot/mcclim/ESA/packages.lisp	2008/05/01 06:48:22	1.20
+++ /project/mcclim/cvsroot/mcclim/ESA/packages.lisp	2008/06/15 09:01:33	1.21
@@ -47,6 +47,7 @@
            #:ensure-array-size
            #:values-max-min
            #:retaining-value
+           #:format-sym
            #:build-menu #:define-menu-table
            #:observable-mixin
            #:add-observer #:remove-observer
--- /project/mcclim/cvsroot/mcclim/ESA/utils.lisp	2008/04/29 16:27:42	1.12
+++ /project/mcclim/cvsroot/mcclim/ESA/utils.lisp	2008/06/15 09:01:33	1.13
@@ -273,6 +273,18 @@
               (unwind-protect (progn , at body)
                 (setf (symbol-value ',symbol) ,bound-symbol))))))
 
+(defun format-sym (format-string &rest args)
+  "Return `format-string' with args spliced in, where all
+arguments that are symbols with have their `symbol-name' spliced
+instead, this makes sure the result is correct even on systems
+where read/print case is other than default."
+  (apply #'format nil format-string
+         (mapcar #'(lambda (arg)
+                     (if (symbolp arg)
+                         (symbol-name arg)
+                         arg))
+                 args)))
+
 (defun build-menu (command-tables &rest commands)
   "Create a command table inheriting commands from
 `command-tables', which must be a list of command table




More information about the Mcclim-cvs mailing list