Strange formatting-related behaviour...

Eric Moncrieff <[email protected]> Tue, 20 Aug 2002 13:19:01 -0400
Newsgroups gmane.lisp.ilisp.general
Message-ID <9160B867AADDD311AE7900C04F0649BB2671E2@IS~MAIL>
Hello all,

I'm observing some strange behaviour using the ILISP-20020702
snapshot under GNU Emacs 21.2 for NT, with CLISP 2.29-win.

I have an external program which is automatically generating 
Lisp forms, which I bind to variables with destructuring-bind 
and manipulate with CLISP, from within emacs.

The script generates ugly, unformatted, but balanced lists,
which look like this:

'(
( 1 2 4 )
( 4 5 6 )
)

When I cut and paste this form into emacs/ilisp:

(setq foo '(
( 1 2 4 )
( 4 5 6 )
))

and evaluate the sexp with C-z e, I get an error:

*** - EVAL: 4 is not a function name

However, if I fix up the formatting (NB, no different
characters:

(setq foo '(( 1 2 4 )
            ( 4 5 6 )))

it works fine.

If I only fix it halfway, eg:

(setq foo '(( 1 2 4 )
( 4 5 6 )))

it produces the same bad behaviour.

I think somehow the code for grabbing sexps must be
broken, because it also can't figure out when there are
unbalanced parens in the unformatted code.

Is there a switch I can throw, or other workaround/fix?

Thanks for your help.

Eric Moncrieff


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390