reddit / emacs

Why append-to-buffer function is written like that:

Equal-Jelly-3543 · 2022-12-31 11:48
>(interactive > >(list (read-buffer "Append to buffer: " (other-buffer (current-buffer) t)) > > (region-beginning) (region-end))) ​ Is >(other-buffer (current-buffer) t)) part necessary? ​ Why it can't be >(list (read-buffer "Append to buffer: ") > >(region-beginning) (region-end))) alone?
7890yuiop · 2022-12-31 12:03
That would behave differently. Read the docs to `read-buffer` and do some simple testing if you don't understand how it's different. (In general, you can answer most questions like this for yourself by reading the docs.)
lastnamebird · 2022-12-31 13:40
You can also evaluate the change you propose and see what difference it makes.