[climacs-devel] Re: Build breakage: missing class CHAR-CODE-LIST-LEXEME

Maciej Katafiasz mathrick at gmail.com
Fri Jun 13 19:19:03 UTC 2008


Den Fri, 13 Jun 2008 15:50:22 +0000 skrev Maciej Katafiasz:

> No longer READ-TABLE, but I do mess with *PRINT-CASE* (I have it at
> :DOWNCASE). Lemme take a look at it, though I suspect it's due to there
> being (format nil "~A" 'foo) instead of (format nil "~A" (symbol- name
> 'foo)).

Okay, that was indeed it. Below is a patch, with a couple of remarks:

1) I don't know where to put FORMAT-SYM. It should be in some widely-
accessible place, ideally a CL-UTILS package of sorts, so that hopefully 
people will finally get it right wrt. symbols and case... Anyway, 
Clim(acs) package structure confuses me to no end, what with :CLIM and 
friends not using :CL for example. So here you have the code, and you 
pick where to stick it in.

(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)))

2) Not directly related, but I stumbled upon the following odd snippet. 
Why doesn't it simply return "C"?

[c-syntax.lisp:49]

(defmethod name-for-info-pane ((syntax c-syntax) &key pane)
  (declare (ignore pane))
  (format nil "C"))

3) And finally, the patch against Climacs CVS. I tried to identify all 
spots where I believe symbols were being manipulated, tell me if I got 
something wrong or missed anything. Similar treatment would be in order 
for the entirety of McCLIM, I imagine, but I want to stick just to 
Climacs first.

Cheers,
Maciej



cvs diff: Diffing .
Index: climacs-lisp-syntax.lisp
===================================================================
RCS file: /project/climacs/cvsroot/climacs/climacs-lisp-syntax.lisp,v
retrieving revision 1.16
diff -u -r1.16 climacs-lisp-syntax.lisp
--- climacs-lisp-syntax.lisp	5 Feb 2008 22:07:30 -0000	1.16
+++ climacs-lisp-syntax.lisp	13 Jun 2008 19:16:07 -0000
@@ -422,7 +422,7 @@
                   (with-drawing-options (stream :ink +dark-blue+
                                                 :text-style (make-text-
style :fixed nil nil))
                     (princ (dspec item) stream))))
-           (climacs-gui:with-typeout-view (stream (format nil "~A ~A" 
type symbol))
+           (climacs-gui:with-typeout-view (stream (format-sym "~A ~A" 
type symbol))
              (loop for xref in xrefs
                 do (with-output-as-presentation (stream xref 'xref)
                      (printer xref stream))
Index: prolog-syntax.lisp
===================================================================
RCS file: /project/climacs/cvsroot/climacs/prolog-syntax.lisp,v
retrieving revision 1.37
diff -u -r1.37 prolog-syntax.lisp
--- prolog-syntax.lisp	11 Feb 2008 22:50:27 -0000	1.37
+++ prolog-syntax.lisp	13 Jun 2008 19:16:08 -0000
@@ -98,7 +98,7 @@
 (defmethod syntactic-lexeme ((lexeme prolog-lexeme))
   lexeme)
 (macrolet ((def ((name &optional tokenp) &rest subs)
-	     (flet ((f (x) (intern (format nil "~A-~A" x '#:lexeme))))
+	     (flet ((f (x) (intern (format-sym "~A-~A" x '#:lexeme))))
 	       `(progn
 		  (defclass ,(f name) (prolog-lexeme) ())
 
cvs diff: Diffing Doc
cvs diff: Diffing Persistent
cvs diff: Diffing cl-automaton
cvs diff: Diffing testing





More information about the climacs-devel mailing list