]> code.delx.au - gnu-emacs/commitdiff
Better confirmation message in `find-alternate-file' (Bug#20830)
authorNicolas Petton <nicolas@petton.fr>
Tue, 16 Jun 2015 20:52:24 +0000 (22:52 +0200)
committerNicolas Petton <nicolas@petton.fr>
Tue, 16 Jun 2015 20:52:24 +0000 (22:52 +0200)
* lisp/files.el (find-alternate-file'): Improve the confirmation
message to show the buffer name.

lisp/files.el

index 26f9f706c1548253d5473c8e4ddcb7ae4c4b67a0..4656adac7b0dc99ffeb0e9b6a89ef10928ac7293 100644 (file)
@@ -1640,7 +1640,9 @@ killed."
   (unless (run-hook-with-args-until-failure 'kill-buffer-query-functions)
     (user-error "Aborted"))
   (and (buffer-modified-p) buffer-file-name
-       (not (yes-or-no-p "Kill and replace the buffer without saving it? "))
+       (not (yes-or-no-p
+             (format "Kill and replace buffer `%s' without saving it? "
+                     (buffer-name))))
        (user-error "Aborted"))
   (let ((obuf (current-buffer))
        (ofile buffer-file-name)