changeset 4649:3972966a4588

Kill buffer if directory name misspelled and user doesn't want to create it. Robert Delius Royar, Rodney Sparapani and I want this behaviour, as far as I can tell; Stephen Turnbull doesn't. lisp/ChangeLog addition: 2009-07-12 Aidan Kehoe <kehoea@parhasard.net> * files.el (after-find-file): If the answer to "The directory containing %s does not exist. Create?" is no, kill the current buffer, since the user probably just misspelled the directory name. Thank you Rodney Sparapani!
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 12 Jul 2009 14:20:55 +0100
parents 907697569a49
children 8905163c49c5
files lisp/ChangeLog lisp/files.el
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Jul 12 14:01:09 2009 +0100
+++ b/lisp/ChangeLog	Sun Jul 12 14:20:55 2009 +0100
@@ -1,3 +1,10 @@
+2009-07-12  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* files.el (after-find-file): 
+	If the answer to "The directory containing %s does not exist.
+	Create?" is no, kill the current buffer, since the user probably
+	just misspelled the directory name. Thank you Rodney Sparapani!
+
 2009-07-12  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* files.el (find-file-create-switch-thunk): 
--- a/lisp/files.el	Sun Jul 12 14:01:09 2009 +0100
+++ b/lisp/files.el	Sun Jul 12 14:20:55 2009 +0100
@@ -1561,7 +1561,8 @@
 			    (abbreviate-file-name buffer-file-name)))
 			  (make-directory (file-name-directory
 					   buffer-file-name)
-					  t))
+					  t)
+			(kill-buffer (current-buffer)))
 		    (quit
 		     (kill-buffer (current-buffer))
 		     (signal 'quit nil))))