From: David Kastrup <dak@gnu.org>
Subject: Re: Newbie Conditional Problem
Date: 17 Jan 2003 17:52:57 +0100 [thread overview]
Message-ID: <x5vg0nyaza.fsf@lola.goethe.zz> (raw)
In-Reply-To: grWV9.42835$aG4.2479915@twister.austin.rr.com
"CarlC" <carlc@snowbd.com> writes:
> "David Kastrup" <dak@gnu.org> wrote in message
> news:x54r87zrdo.fsf@lola.goethe.zz...
> > Well, what do you expect? (goto-line line) is no function, and you
> > use it in the place of one, namely immediately after an opening
>
> C-f h goto-line RET shows:
>
> goto-line is an interactive compiled Lisp function in `simple'.
See? goto-line is a function. (goto-line line) is a function call.
> (goto-line ARG)
This is supposed to illustrate how goto-line is called. A function
call is not the same as a function.
> Goto line ARG, counting from line 1 at beginning of buffer.
>
> I am new to this. Is it technically a command or function? Can it be
> used immediatly after an opening parenthesis?
goto-line is a function. It can be "used" immediately after an
opening parenthesis. This is not what Emacs complained about. Emacs
complained about using (goto-line line) after an opening
parenthesis. (goto-line line) is not a function, it is a function
call.
> It seems to work fine outside of this conditional.
No, it doesn't. (goto-line line) will work fine.
((goto-line line) ...) will not.
> I can put other commands in the conditional and they fail, also.
You don't put them in the conditional. You put them in the
function call place of a function that you want to have as the body
of the conditional.
> > parenthesis of a non-special form. I recommend that you instead use
> > progn after the opening parenthesis. Look it up with
> >
> > C-h f progn RET
>
> progn is a special form.
> (progn BODY ...)
>
> Eval BODY forms sequentially and return value of last one.
>
> This doesn't tell me a whole lot. I get an invalid function using progn,
> also. Is it a function?
(progn (goto-line line) (goto-line line))
would be a valid form.
((goto-line line) (goto-line line))
isn't, and because of the first function call in it which is used as
if it were a function.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2003-01-17 16:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-17 15:19 Newbie Conditional Problem CarlC
2003-01-17 15:36 ` Friedrich Dominicus
2003-01-17 16:09 ` CarlC
2003-01-18 6:27 ` Friedrich Dominicus
2003-01-18 13:35 ` Johan Bockgård
2003-01-18 16:59 ` Friedrich Dominicus
2003-01-18 13:48 ` Christopher J. White
2003-01-18 17:03 ` Friedrich Dominicus
2003-01-17 16:19 ` Brendan Halpin
[not found] ` <x54r87zrdo.fsf@lola.goethe.zz>
2003-01-17 16:46 ` CarlC
2003-01-17 16:52 ` David Kastrup [this message]
2003-01-17 17:24 ` CarlC
2003-01-17 17:42 ` Stefan Monnier <foo@acm.com>
2003-01-18 17:36 ` Kai Großjohann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=x5vg0nyaza.fsf@lola.goethe.zz \
--to=dak@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).