From ab0c5d33e728d34a6c701ca35bacc420c694c4f6 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 9 Dec 2023 20:04:23 +0100 Subject: [PATCH] ; lisp/window.el: (read-buffer-to-switch): Don't override table. --- lisp/window.el | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/lisp/window.el b/lisp/window.el index fbdcd611068..848f93dbbe4 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8871,21 +8871,8 @@ Return the name of the buffer as a string. This function is intended for the `switch-to-buffer' family of commands since these need to omit the name of the current buffer from the list of completions and default values." - (let ((rbts-completion-table (internal-complete-buffer-except))) - (minibuffer-with-setup-hook - (lambda () - (setq-local minibuffer-completion-table rbts-completion-table) - ;; Since rbts-completion-table is built dynamically, we - ;; can't just add it to the default value of - ;; icomplete-with-completion-tables, so we add it - ;; here manually. - (if (and (boundp 'icomplete-with-completion-tables) - (listp icomplete-with-completion-tables)) - (setq-local icomplete-with-completion-tables - (cons rbts-completion-table - icomplete-with-completion-tables)))) - (read-buffer prompt (other-buffer (current-buffer)) - (confirm-nonexistent-file-or-buffer))))) + (read-buffer prompt (other-buffer (current-buffer)) + (confirm-nonexistent-file-or-buffer))) (defun window-normalize-buffer-to-switch-to (buffer-or-name) "Normalize BUFFER-OR-NAME argument of buffer switching functions. -- 2.39.2