]> git.eshelyaron.com Git - emacs.git/commit
Avoid overriding completion table when reading buffers
authorEshel Yaron <me@eshelyaron.com>
Mon, 11 Dec 2023 20:39:20 +0000 (21:39 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 11 Dec 2023 20:39:20 +0000 (21:39 +0100)
commit8e7efa7a253968afc041b4bd23205889e0169e13
tree2545b7202cf4e9c29c024333397c7f7e72835e58
parent6982f629fe5374959963a853084b42f9a9cab477
Avoid overriding completion table when reading buffers

This fixes Bug#53604, and allows 'read-buffer-function' to check if it
is being called by 'read-buffer-to-switch', and react accordingly, for
example immediately by showing the *Completions* buffer.

* lisp/window.el (read-buffer-to-switch-current-buffer): New var.
(read-buffer-to-switch): Use it.
* lisp/minibuffer.el (buffers-except-current-if-switching): New fun.
* src/minibuf.c (Fread_buffer): Use it.

* etc/NEWS: Announce 'read-buffer-to-switch-current-buffer'.
etc/NEWS
lisp/minibuffer.el
lisp/window.el
src/minibuf.c