lisp-slashify should bind print-escape-newlines nil

Daniel Barlow <[email protected]>
Newsgroups gmane.lisp.ilisp.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Every so often when I use compile-defun-lisp or similar commands to do
something to the form at point, I get strange error messages along the
lines of this one:

* source function
(sql:def-view-class year-end-transaction (transaction)
  ()
  (:base-table "rm_transaction"))

* output in *sbcl* buffer

;;; Compiling sql:def-view-class
; in: MAISQL-SYS:DEF-VIEW-CLASS YEAR-END-TRANSACTION
;     (MAISQL-SYS:DEF-VIEW-CLASS ROSEMARY::YEAR-END-TRANSACTION
;                              (ROSEMARY::TRANSACTION)
;                              ROSEMARY::N
;                              NIL
;                              ROSEMARY::N
;                              (:BASE-TABLE "rm_transaction"))
; ==>
;   (DEFCLASS ROSEMARY::YEAR-END-TRANSACTION
;             (ROSEMARY::TRANSACTION)
;             ROSEMARY::N
;             NIL
;             ROSEMARY::N
;             (:BASE-TABLE "rm_transaction")
;             (:METACLASS MAISQL-SYS::VIEW-METACLASS))
; 
; caught ERROR:
;   (in macroexpansion of (DEFCLASS YEAR-END-TRANSACTION # ...))
;   (hint: For more precise location, try *BREAK-ON-SIGNALS*.)
;   N is not a legal defclass option.
; compilation unit finished
;   caught 1 ERROR condition
"ILISP: execution of a form compiled with errors:
 (DEFCLASS ROSEMARY::YEAR-END-TRANSACTION
           (ROSEMARY::TRANSACTION)
           ROSEMARY::N
           NIL
           ROSEMARY::N
           (:BASE-TABLE \"rm_transaction\")
           (:METACLASS MAISQL-SYS::VIEW-METACLASS))"

By inserting calls to (message string) in lisp-send-region, I was able
to see that it's sending e.g.

(ilisp:ilisp-compile "(sql:def-view-class year-end-transaction (transaction)\n  ()\n  (:base-table \"rm_transaction\"))" "ROSEMARY" "/home/dan/src/telent/rosemary/transaction-class.lisp")

to the inferior lisp.  \n in a CL string is read as the 'n' character,
of course.  To cut a long story short, something somewhere in my emacs
had trodden on print-escape-newlines, which causes the prin1-to-string
in lisp-slashify to produce CL-incompatible output.  I think
lisp-slashify should bind printer control variables such as this if it
expects anything from the output.

Thanks to ohler on #lisp for helping to track this down.


- -dan

- -- 

   http://www.cliki.net/ - Link farm for free CL-on-Unix resources 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/LwmFHDK5ZnWQiRMRAjBBAJ9NS6LcBBetRJmAqf6YhLlt1tBi7QCfQl4A
yZlvtxrPgqgQRE6F0cmIfPM=
=AFz5
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.