[Top][All Lists]

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

Re: Keeping replace-buffer-contents runtime in bounds

From: Tassilo Horn
Subject: Re: Keeping replace-buffer-contents runtime in bounds
Date: Tue, 26 Feb 2019 07:51:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Well, after reading the docs for `interactive' again, I guess
>> replace-region-contents could be a command with "X" interactive spec
>> (and a check that the user actually typed in a function).  Any
>> objections?
> I don't see much point in making it a command.
> Is there some actual use-case?

I don't think that anybody would want to type in a lambda at the prompt
but instead would simply create his own command using

But I could see a use-case if REPLACE-FN could also just be a string or
buffer instead of a function returning a string or a buffer.  In that
case, it could be used interactively like replace-buffer-contents but
you could omit narrowing yourself.  And a string wouldn't be interpreted
as a buffer name but literally which would be handy in the case where
you have the replacement already in your kill-ring.  However, the
interactive spec "B" makes it hard to enter a literal string because
space is bound to word completion...

Well, I guess that's not reason enough to make it interactive...


reply via email to

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