From xemacs-m  Wed Sep 24 18:35:01 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id SAA10397
	for <xemacs-beta@xemacs.org>; Wed, 24 Sep 1997 18:35:00 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.7/8.8.7) id QAA21779;
	Wed, 24 Sep 1997 16:41:08 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: 20.3-b23 behavior of find-file
References: <14500.875112352@rtp.ericsson.se>
X-Face: (:YAD@JS'&Kz'M}n7eX7gEvPR6U1mJ-kt;asEc2qAv;h{Yw7ckz<7+X_SYeTNAaPui:e~x$
 ,A=gkt*>UPL/}\a/#C~v2%ETiAY_sx;xve0yL??JWTtX_-NUzXyP38UdW#cmN1\4(X!c3m#%IbtB-3
 Z-!xpZi!`E.s{(;aP=b11"!3wQu]1j@^V|;n=B|{l<bZV1.AI`zWV%kPCnUhcgEe\(}/_kNd6,*3ZJ
 Q3o<YQ3^u;7jS=:p0--u3msQO
X-Attribution: sb
From: SL Baur <steve@xemacs.org>
In-Reply-To: Raymond Toy's message of "Wed, 24 Sep 1997 10:45:52 -0400"
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=US-ASCII
Date: 24 Sep 1997 16:41:08 -0700
Message-ID: <m2u3fajn57.fsf@altair.xemacs.org>
Lines: 73
X-Mailer: Quassia Gnus v0.10/XEmacs 20.3(beta24) - "Ljubljana"

Raymond Toy <toy@rtp.ericsson.se> writes:

> I see that the behavior of find-file now is different from 20.2 and
> earlier with respect to creating the directory if it doesn't already
> exist.  I hate it.  Do what I mean, damn it, I know it doesn't exist
> so ask me to create it!

> Any way to get the old behavior back?

I did some more digging to attempt to figure out what you meant and
found this patch 20.3-beta1 -> 20.3-beta2:

Index: lisp/prim/files.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/prim/files.el,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- files.el	1997/05/18 03:40:15	1.11
+++ files.el	1997/05/23 01:36:38	1.12
@@ -1019,6 +1023,7 @@
 NOAUTO means don't mess with auto-save mode.
 Fourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER non-nil
  means this call was from `revert-buffer'.
+Fifth arg NOMODES non-nil means don't alter the file's modes.
 Finishes by calling the functions in `find-file-hooks'."
   (setq buffer-read-only (not (file-writable-p buffer-file-name)))
   (if noninteractive
@@ -1032,9 +1037,9 @@
 		   (if (and warn
 			    (file-newer-than-file-p (make-auto-save-file-name)
 						    buffer-file-name))
-	       (gettext "Auto save file is newer; consider M-x recover-file")
+		       (format "%s has auto save data; consider M-x recover-file"
 		     (setq not-serious t)
-		     (if error (gettext "(New file)") nil)))
+		     (if error (gettext "(New file)") nil))))
 		  ((not error)
 		   (setq not-serious t)
 		   (gettext "Note: file is write protected"))
@@ -1048,23 +1053,18 @@
 		   ;; than when we save the buffer, because we want
 		   ;; autosaving to work.
 		   (setq buffer-read-only nil)
-		   (or (file-exists-p (file-name-directory buffer-file-name))
-		       (if (yes-or-no-p
-			    (format
-		       "The directory containing %s does not exist.  Create? "
-			     (abbreviate-file-name buffer-file-name)))
-			   (make-directory (file-name-directory
-                                             buffer-file-name)
-                                           t)))
-		   nil))))
+		   (if (file-exists-p (file-name-directory (directory-file-name (file-name-directory buffer-file-name))))
+		       "Use M-x make-dir RET RET to create the directory"
+		     "Use C-u M-x make-dir RET RET to create directory and its parents")))))
       (if msg
 	  (progn
 	    (message msg)
 	    (or not-serious (sit-for 1 t)))))
     (if (and auto-save-default (not noauto))
 	(auto-save-mode t)))
-  (normal-mode t)
-  (run-hooks 'find-file-hooks))
+  (unless nomodes
+    (normal-mode t)
+    (run-hooks 'find-file-hooks)))
 
 (defun normal-mode (&optional find-file)
   "Choose the major mode for this buffer automatically.


This patch synchs `after-find-file' with Emacs 20.

