emacs-devel
[Top][All Lists]
Advanced

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

Re: quit-window is broken


From: Stefan Monnier
Subject: Re: quit-window is broken
Date: Mon, 17 Nov 2008 16:59:42 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> it would help if there were a user option switch-to-buffer-create-new-buffer
> with values t (like it does not), nil (signal an error) and 'ask (ask for
> a confirmation).

I'd rather have it use the same new behavior as C-x C-f: if you type in
a non-existing buffer name, the completion requests confirmation.
Any objection to the patch below?


        Stefan


=== modified file 'lisp/files.el'
--- lisp/files.el       2008-11-15 03:29:10 +0000
+++ lisp/files.el       2008-11-17 21:58:51 +0000
@@ -1111,7 +1111,7 @@
   (let ((rbts-completion-table (internal-complete-buffer-except)))
     (minibuffer-with-setup-hook
         (lambda () (setq minibuffer-completion-table rbts-completion-table))
-      (read-buffer prompt (other-buffer (current-buffer))))))
+      (read-buffer prompt (other-buffer (current-buffer)) 'confirm-only))))
 
 (defun switch-to-buffer-other-window (buffer &optional norecord)
   "Select buffer BUFFER in another window.





reply via email to

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