From 97fa7ea4bbeb2d62106f0052f5bdca2754d03147 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 24 Jul 1995 22:08:39 +0000 Subject: [PATCH] Fix bug in INSERT-DIRECTORY that caused Dired buffer to get scrambled when using M-x dired-do-rename. --- v7/src/edwin/os2.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/v7/src/edwin/os2.scm b/v7/src/edwin/os2.scm index 87111b824..1e0ae6b07 100644 --- a/v7/src/edwin/os2.scm +++ b/v7/src/edwin/os2.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: os2.scm,v 1.19 1995/07/11 23:10:34 cph Exp $ +;;; $Id: os2.scm,v 1.20 1995/07/24 22:08:39 cph Exp $ ;;; ;;; Copyright (c) 1994-95 Massachusetts Institute of Technology ;;; @@ -464,7 +464,10 @@ Includes the new backup. Must be > 0." (define (insert-directory! file switches mark type) ;; Insert directory listing for FILE at MARK. ;; SWITCHES are examined for the presence of "t". - type + ;; TYPE can have one of three values: + ;; 'WILDCARD means treat FILE as shell wildcard. + ;; 'DIRECTORY means FILE is a directory and a full listing is expected. + ;; 'FILE means FILE itself should be listed, and not its contents. (let ((mark (mark-left-inserting-copy mark))) (call-with-current-continuation (lambda (k) @@ -498,7 +501,9 @@ Includes the new backup. Must be > 0." (map (lambda (pathname) (cons (file-namestring pathname) (file-attributes pathname))) - (directory-read file #f)) + (if (eq? 'FILE type) + (list file) + (directory-read file #f))) cdr) (if (string-find-next-char switches #\t) (lambda (x y) -- 2.25.1