Re: Bug#182116: ILISP broken with readtable inverted
Bob Rogers <[email protected]>
| Newsgroups | gmane.lisp.ilisp.devel |
|---|---|
| Message-ID | <[email protected]> |
From: "Adam Warner" <[email protected]> Date: Mon, 24 Feb 2003 11:51:41 +1300 One caseberg at a time is fine with me :-) Thank you very much for the analysis. I chucked in an invert-string script but finally discovered the fix is to do nothing to the symbol-name just like preserve . . . Thank you; I hope a good chunk of the other casebergs can be fixed as tidily. It should be safe to commit this fix. Thanks again. Regards, Adam Done (committed), plus I changed "case" to "ecase", so we get a sensible error if there are any other random case modes waiting to bite us. (And also an unrelated fix I discovered while testing.) -- Bob ------------------------------------------------------------------------ Index: cl-ilisp.lisp =================================================================== RCS file: /cvsroot/ilisp/ILISP/cl-ilisp.lisp,v retrieving revision 1.17 diff -u -r1.17 cl-ilisp.lisp --- cl-ilisp.lisp 17 Feb 2003 02:18:19 -0000 1.17 +++ cl-ilisp.lisp 24 Feb 2003 02:21:25 -0000 @@ -239,12 +239,11 @@ ;;; ':capitalize' case added under suggestion by Rich Mallory. (defun ilisp-symbol-name (symbol-name) "Return SYMBOL-NAME with the appropriate case as a symbol." - (case (ilisp-readtable-case *readtable*) + (ecase (ilisp-readtable-case *readtable*) (:upcase (string-upcase symbol-name)) (:downcase (string-downcase symbol-name)) (:capitalize (string-capitalize symbol-name)) - (:preserve symbol-name))) - + ((:preserve :invert) symbol-name))) ;;; ilisp-find-package -- ;;; @@ -367,7 +366,11 @@ #+cmu (let ((*package* (ilisp-find-package package)) (source-info - (c::make-file-source-info (c::verify-source-files filename)))) + (handler-case + (c::make-file-source-info (c::verify-source-files filename)) + ;; [this is a kludge to get around the fact that the file may not + ;; yet exist. -- rgr, 23-Feb-03.] + (file-error nil)))) (with-input-from-string (s form) (c::compile-from-stream s :source-info source-info ;; this shuts of the "Converted foo/Compiling foo" ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge