]> git.eshelyaron.com Git - emacs.git/commitdiff
; lisp/window.el: (read-buffer-to-switch): Don't override table.
authorEshel Yaron <me@eshelyaron.com>
Sat, 9 Dec 2023 19:04:23 +0000 (20:04 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 9 Dec 2023 19:04:23 +0000 (20:04 +0100)
lisp/window.el

index fbdcd6110681b0b634ba9043c787b638d5d99e9f..848f93dbbe4e19535746f6e4c4a84f401ef556a0 100644 (file)
@@ -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.