[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interactive-form invoked with specified arg
From: |
Emanuel Berg |
Subject: |
Re: Interactive-form invoked with specified arg |
Date: |
Wed, 05 Jun 2013 01:53:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
gentsquash <gentsquash@gmail.com> writes:
> I looked at it before I posted. If someone can explain to me
> how it does what I want, then I'll be grateful.
Well, take replace-string for example. If you want to call it from
Elisp, it looks like this:
(replace-string FROM-STRING TO-STRING &optional DELIMITED START
END)
In the below function, you see how it is combined with
call-interactively. The result is the same as if the user would
have hit `M-x replace-string'. But, you don't have to write a
whole new interface (that does the same thing).
(defun replace-str ()
"Like `replace-string', but reset point when done."
(interactive)
(save-excursion
(call-interactively 'replace-string) ))
But, as for your purposes, now that you have described them in
more detail, I don't think it is the solution.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573