From: "Robert D. Crawford" <rdc1x@comcast.net>
Subject: Re: Why does this code sometimes work?
Date: Fri, 17 Feb 2006 05:31:48 -0600 [thread overview]
Message-ID: <87y80a1asb.fsf@laptop.rdc1.home> (raw)
In-Reply-To: 1140174857.888898.141060@z14g2000cwz.googlegroups.com
jacksneckhurts@yahoo.com writes:
> I pulled the following code from a tutorial:
>
> ;; begin (defun multiply-by-seven (number)
> "Multiply NUMBER by seven."
> (* 7 number))
>
> (multiply-by-seven 3) ;; end
>
> I put it in emacs as is, and sometimes it runs, and most of the time
> it errors out...
What does the backtrace tell you. If you are getting a lisp error, you
should be getting a backgtrace.
> I run the code with "ctrl-x ctrl-e" while the cursor is to the right
> of "3)". What am I doing wrong? Thanks!
You have to be more specific about where the cursor is. C-x C-e will
eval the last sexp before point. Point is actually _between the
character that the cursor is on and the character right before it. So
if the cursor is resting on the paren after the three in your
expression, then it will eval the 3 and since numbers eval as
themselves, that will be returned. If, however you have the cursor
resting on the space just after the paren, it should eval properly.
rdc
position of the cursor
--
<========================================================================>
Robert D. Crawford rdc1x@comcast.net
There was a phone call for you.
<========================================================================>
prev parent reply other threads:[~2006-02-17 11:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-17 11:14 Why does this code sometimes work? jacksneckhurts
2006-02-17 11:31 ` Robert D. Crawford [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y80a1asb.fsf@laptop.rdc1.home \
--to=rdc1x@comcast.net \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.