From xemacs-m  Thu Sep 25 23:25:59 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 XAA13963
	for <xemacs-beta@xemacs.org>; Thu, 25 Sep 1997 23:25:57 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.7/8.8.7) id VAA04818;
	Thu, 25 Sep 1997 21:31:59 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: Saving graces and "M-X make-dir RET RET" 20.3 "Sarajevo" XEmacs  Lucid (beta23)
References: <m0xEZjP-00002WC@tanko.sk.tsukuba.ac.jp>
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: "Stephen J. Turnbull"'s message of "Fri, 26 Sep 1997 21:42:51 +0900 (JST)"
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=US-ASCII
Date: 25 Sep 1997 21:31:59 -0700
Message-ID: <m2afh0puf4.fsf@altair.xemacs.org>
Lines: 56
X-Mailer: Quassia Gnus v0.10/XEmacs 20.3(beta24) - "Ljubljana"

This can't be a coincidence ...

Stephen J Turnbull <turnbull@sk.tsukuba.ac.jp> writes:

> I just used the customize interface for the first time on an account
> where I had not yet migrated .emacs to ~/.xemacs/init.el.  When saving
> the option, customize complained about the missing directory, and
> offered to make the directory with the usual message `to make the
> directory use "M-X make-dir RET RET"'.

> Unfortunately, when I typed `M-X make-dir RET' it offered `~/' as the
> default.

> To reproduce:
 ...
> I don't have time to try to come up with a patch, and it's not clear
> to me that it's entirely trivial....

It might be.  If I revert the change in `after-find-file' as Raymond
Toy suggested this morning, this problem will go away.

[There are other changes elided from this version of the patch, so the 
line numbers probably won't match]

1997-09-25  SL Baur  <steve@altair.xemacs.org>

	* prim/files.el (after-find-file): Revert synch to Emacs 20 and
	restore old directory creation behavior.

Index: lisp/prim/files.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/prim/files.el,v
retrieving revision 1.28
diff -u -r1.28 files.el
--- lisp/prim/files.el	1997/09/20 22:15:16	1.28
+++ lisp/prim/files.el	1997/09/26 04:29:14
@@ -1116,9 +1136,16 @@
 		   ;; than when we save the buffer, because we want
 		   ;; autosaving to work.
 		   (setq buffer-read-only 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")))))
+		   ;; XEmacs
+		   (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 msg
 	  (progn
 	    (message msg)

