From: John Gillespie
Subject: newbie prob with clisp under emacs
Date: 
Message-ID: <Cnsy7E.H42@ucdavis.edu>
I'm loving learning lisp, but something is driving me up the wall!
I'm running clisp as an inferior-lisp under emacs 19.22.  The
following bit of code from the lisp-mode buffer compiles and runs as
expected under clisp with C-M-x:

(defun why ()
  (dotimes (i 3) (print i)))

BUT, when I reformat the code as:

(defun why ()
  (dotimes (i 3)
				   (print i)))

and issue C-M-x I get the following:
>
There are 858 possibilities.  Do you really
wish to see them all? (y or n)
WHY
> (why)
NIL

This problem keeps coming up as I write various bits of code.  When I
load the same code with (load "code.lsp") it always compiles and runs
as expected.  This must be an emacs vs. clisp problem which must mean
that that is some variable somewhere that I haven't set correctly.
Any ideas??  Thanks.

Desperate in Davis
john

From: The Crossjammer
Subject: Re: newbie prob with clisp under emacs
Date: 
Message-ID: <XJAM.94Apr5140252@palm.CS.Berkeley.EDU>
clisp likes to do command completion when it sees tabs in the input stream.
emacs uses tabs to do indentation.

You can fix up the emacs lisp modes to strip tabs out of the input that it
sends to the clisp process.

As far as I know, you cannot convince clisp to not do completion. The only
way to do that is to rebuild the system, a non-trivial undertaking.

Hope this helps.
--
····@cs.Berkeley.EDU	"They can't come on and play me in prime time, 
			 Cause I know the time, cause I'm gettin' mine
Gotta have house...	 I get on the mix late in the night..."
From: Christian Lynbech
Subject: Re: newbie prob with clisp under emacs
Date: 
Message-ID: <LYNBECH.94Apr6120630@avignon.daimi.aau.dk>
Fixing up on the meacs lisp modes is not necessary. I quote from the
emacs manual:

    Tabs vs. Spaces
    ===============

       Emacs normally uses both tabs and spaces to indent lines.  If you
    prefer, all indentation can be made from spaces only.  To request this,
    set `indent-tabs-mode' to `nil'.  This is a per-buffer variable;
    altering the variable affects only the current buffer, but there is a
    default value which you can change as well.  *Note Locals::.

       There are also commands to convert tabs to spaces or vice versa,
    always preserving the columns of all nonblank text.  `M-x tabify' scans
    the region for sequences of spaces, and converts sequences of at least
    three spaces to tabs if that can be done without changing indentation.
    `M-x untabify' changes all tabs in the region to appropriate numbers of
    spaces.



------------------------------------------------------------------------------
Christian Lynbech               | Hit the philistines three times over the 
office: R0.33 (phone: 3217)	| head with the Elisp reference manual.
email: ·······@daimi.aau.dk	|        - ·······@hal.com (Michael A. Petonic)
------------------------------------------------------------------------------
From: The Crossjammer
Subject: Re: newbie prob with clisp under emacs
Date: 
Message-ID: <XJAM.94Apr6112322@palm.CS.Berkeley.EDU>
>>>>> In article <····················@avignon.daimi.aau.dk>, ·······@avignon.daimi.aau.dk (Christian Lynbech) writes:

  Christian> Fixing up on the meacs lisp modes is not necessary. I quote from the
  Christian> emacs manual:
	[emacs manual stuff deleted]

This is exactly what I meant by "fixup". Obviously, using the
indent-tabs-mode variable is nice and portable, but the tabify/untabify
method requires actually fixinup the mode package to use it, unless you
want to hand tabify and untabify stuff before it gets sent to the slave
lisp.

--
····@cs.Berkeley.EDU	"They can't come on and play me in prime time, 
			 Cause I know the time, cause I'm gettin' mine
Gotta have house...	 I get on the mix late in the night..."
From: ······@ma2s2.mathematik.uni-karlsruhe.de
Subject: Re: newbie prob with clisp under emacs
Date: 
Message-ID: <2nutkq$enr@nz12.rz.uni-karlsruhe.de>
> clisp likes to do command completion when it sees tabs in the input stream.
> emacs uses tabs to do indentation.

Yes.

> You can fix up the emacs lisp modes to strip tabs out of the input that it
> sends to the clisp process.
>
> As far as I know, you cannot convince clisp to not do completion. The only
> way to do that is to rebuild the system, a non-trivial undertaking.

That's not needed: Setting the emacs lisp command to "clisp | cat"
instead of "clisp" will prevent clisp from doing completion.


                    Bruno Haible
                    ······@ma2s2.mathematik.uni-karlsruhe.de