From: Chris Hanson Date: Wed, 9 May 2001 21:03:05 +0000 (+0000) Subject: Fix bug in M-x dired-create-directory: PROMPT-FOR-DIRECTORY recently X-Git-Tag: 20090517-FFI~2833 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=58b22478bb74227012f94f7b45bcf676c985541a;p=mit-scheme.git Fix bug in M-x dired-create-directory: PROMPT-FOR-DIRECTORY recently changed so that it always returns the result as a directory pathname with no file part. The code here was assuming that the name part was always present. --- diff --git a/v7/src/edwin/dired.scm b/v7/src/edwin/dired.scm index 03c6e1ebe..5d33d3468 100644 --- a/v7/src/edwin/dired.scm +++ b/v7/src/edwin/dired.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: dired.scm,v 1.182 2000/04/30 22:17:01 cph Exp $ +;;; $Id: dired.scm,v 1.183 2001/05/09 21:03:05 cph Exp $ ;;; -;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology +;;; Copyright (c) 1986, 1989-2001 Massachusetts Institute of Technology ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License as @@ -16,7 +16,8 @@ ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with this program; if not, write to the Free Software -;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;;; 02111-1307, USA. ;;;; Directory Editor ;; package: (edwin dired) @@ -524,13 +525,15 @@ With a prefix argument you can edit the current listing switches instead." "Create a directory named DIRECTORY." "DCreate directory" (lambda (directory) - (make-directory directory) - (let ((lstart (mark-right-inserting-copy (line-start (current-point) 0)))) - (with-read-only-defeated lstart - (lambda () - (insert-dired-entry! directory lstart))) - (set-dired-point! lstart) - (mark-temporary! lstart)))) + (let ((directory (directory-pathname-as-file directory))) + (make-directory directory) + (let ((lstart + (mark-right-inserting-copy (line-start (current-point) 0)))) + (with-read-only-defeated lstart + (lambda () + (insert-dired-entry! directory lstart))) + (set-dired-point! lstart) + (mark-temporary! lstart))))) (define-command dired-do-copy "Copy all marked (or next ARG) files, or copy the current file.