|
From: | Klaus Jantzen |
Subject: | Re: Command in a function |
Date: | Thu, 25 Mar 2010 08:23:20 +0100 |
User-agent: | Mozilla-Thunderbird 2.0.0.22 (X11/20090707) |
Drew Adams wrote:
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).
That is what I had in the beginning . I tried it again and receive the friendly message
"Invalid function (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').
-- K.D.J.
[Prev in Thread] | Current Thread | [Next in Thread] |