help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: default value with interactive


From: Emanuel Berg
Subject: Re: default value with interactive
Date: Mon, 20 Nov 2017 02:10:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Michael Heerdegen wrote:

>> OK, so that is OK?
>
> Sure - most of the time you are not aware of
> the value of point as a number, so the first
> version is much clearer.

Yeah, in this case, I meant in principle.

What I have is two functions, one that
searches, and one that "searches again" with
the previous search string as input.

When the function that searches is invoked, it
asks for a search string, but if it isn't
provided, the default (i.e., previous) string
is used even tho the better way to do that is
to invoke the function that searches
again directly.

I can extract into a function the code that
fetches the previous search *but* how do I use
that in the interactive form as well as outside
it without computing twice? As was instructed
here - (info "(elisp) Programming Tips") - only
even in the provided example, it really didn't
happen that way at all.

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]