[comp.emacs] emacs elisp problem

john@beaudin.UUCP (John Beaudin) (12/08/90)

I have a buffer whose sole contents are

	(move-to-column 4)

When I type escape-x eval-current-buffer, the mini-buffer displays

	Symbol's value as variable is void: e-to-column

I understand where the end of the error msg comes from, but not why.
I expected mark to move to column 4 from wherever it was originally.
Can somebody help me with my misunderstanding? I'm trying to learn some
elisp programming and wanted to try something simple. I have the elisp
hardcopy manual, but am too naive so far to see what's wrong with my 
experiment.

I apologize if this is a moderated group.
-- 
My .signature is awaiting apropriate display technology

barmar@think.com (Barry Margolin) (12/09/90)

In article <1467@beaudin.UUCP> john@beaudin.UUCP (John Beaudin) writes:
>I have a buffer whose sole contents are
>
>	(move-to-column 4)
>
>When I type escape-x eval-current-buffer, the mini-buffer displays
>
>	Symbol's value as variable is void: e-to-column
>
>I understand where the end of the error msg comes from, but not why.
>I expected mark to move to column 4 from wherever it was originally.
	    ^^^^
You mean "point", don't you?

>Can somebody help me with my misunderstanding? I'm trying to learn some
>elisp programming and wanted to try something simple. I have the elisp
>hardcopy manual, but am too naive so far to see what's wrong with my 
>experiment.

eval-current-buffer moves point around to keep track of where it is in the
buffer as it is evaluating.  This is done so that an error leaves the
cursor at the form that caused it.  If it executes a form that moves point
itself, this causes the evaluation to resume from where the point was moved
to.  In your case, this was the middle of the symbol "move-to-column", so
it got an error.

>I apologize if this is a moderated group.

It's not, but why would it be your fault if it were?
--
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar