From: "Drew Adams" <drew.adams@oracle.com>
To: "'Klaus Jantzen'" <k.d.jantzen@t-online.de>,
"'emacs-list'" <help-gnu-emacs@gnu.org>
Subject: RE: Command in a function
Date: Wed, 24 Mar 2010 15:36:04 -0700 [thread overview]
Message-ID: <579E3B8BC2A2420588F857DE9B9AFFAB@us.oracle.com> (raw)
In-Reply-To: <4BAA8919.8000502@t-online.de>
> I am writing a function that inserts some text into a buffer.
> At some point the cursor (point?) should go to the end of a line.
>
> For that I found the command "end-of-line". How do I code the
> execution of this command in a function?
> I tried it with (command-execute end-of-line) but that resulted in an
> error message.
Just use (end-of-line).
Or (end-of-line N), where N is the number of lines to first move forward or
backward.
In Emacs, a command is a function.
A function that has an `interactive' spec is a command. See the Elisp manual,
page `Using Interactive', if you want to make a function interactive (i.e. make
it a command, so you can bind it to a key or invoke it by name using `M-x').
next prev parent reply other threads:[~2010-03-24 22:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-24 21:50 Command in a function Klaus Jantzen
2010-03-24 22:36 ` Drew Adams [this message]
2010-03-25 7:23 ` Klaus Jantzen
2010-03-26 15:29 ` Drew Adams
[not found] ` <4BACD9DE.6080802@t-online.de>
[not found] ` <52CFAD1180B1460090347833DE17B97D@us.oracle.com>
2010-03-27 10:25 ` Klaus Jantzen
2010-03-27 14:01 ` Drew Adams
2010-03-26 16:04 ` Lennart Borgman
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=579E3B8BC2A2420588F857DE9B9AFFAB@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=k.d.jantzen@t-online.de \
/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.