emacs-devel
[Top][All Lists]
Advanced

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

Re: [RFC]: replace-region-contents


From: Stefan Monnier
Subject: Re: [RFC]: replace-region-contents
Date: Sat, 02 Feb 2019 11:17:12 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>       (atomic-change-group

Why?  AFAICT only replace-buffer-contents modifies the buffer and it
only does it atomically.

> The current buffer is narrowed to the region between BEG and END,
> then EXTRACT-FN is called in order to extract some value.
> Thereafter, INJECT-FN is called with that value in a temporary
> buffer which it should populate.

Why 2 separate functions?


        Stefan


PS: I wish replace-buffer-contents interpreted a string as the text to
use as replacement rather than as a buffer name (which I find almost
always to be a misfeature: better call `get-buffer` explicitly when we
need to convert a string to a buffer).  I think we should start by
deprecating this "can be a buffer name" usage ASAP.



reply via email to

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