Added os/auto-save-filename? to replace dependent code in dired.scm.
authorHenry M. Wu <edu/mit/csail/zurich/mhwu>
Wed, 22 Apr 1992 20:26:56 +0000 (20:26 +0000)
committerHenry M. Wu <edu/mit/csail/zurich/mhwu>
Wed, 22 Apr 1992 20:26:56 +0000 (20:26 +0000)
v7/src/edwin/dired.scm
v7/src/edwin/unix.scm

index 639ebf15464513bdb2bf58d1c90fb666cc85d95f..f34e0b3ccca4bde3d818f074dd48aa782df27706 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/dired.scm,v 1.123 1992/04/18 16:38:49 bal Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/dired.scm,v 1.124 1992/04/22 20:26:56 mhwu Exp $
 ;;;
 ;;;    Copyright (c) 1986, 1989-92 Massachusetts Institute of Technology
 ;;;
@@ -498,9 +498,8 @@ CANNOT contain the 'F' option."
       (lambda ()
        (for-each-file-line (current-buffer)
          (lambda (lstart)
-           (if (match-forward "#"
-                              (dired-filename-start lstart)
-                              (line-end lstart 0))
+           (if (os/auto-save-filename?
+                (region->string (dired-filename-region lstart)))
                (dired-mark-1 lstart #\D))))))))
 
 (define-command dired-flag-backup-files
index f91db1140cc96752f6086e605b99a39ce1686e5e..89d123b634f46687dc1b5e937c58d3153805ed71 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/unix.scm,v 1.24 1992/04/21 17:27:25 mhwu Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/unix.scm,v 1.25 1992/04/22 20:26:41 mhwu Exp $
 ;;;
 ;;;    Copyright (c) 1989-92 Massachusetts Institute of Technology
 ;;;
@@ -279,6 +279,7 @@ Includes the new backup.  Must be > 0."
          (substring filename (+ index 1) end)
          filename))))
 \f
+
 (define unix/encoding-pathname-types
   '("Z"))
 
@@ -349,6 +350,13 @@ Includes the new backup.  Must be > 0."
             (merge-pathnames ".edwin-ffi" (directory-pathname pathname))))
        (and (file-exists? pathname)
             pathname))))
+
+(define (os/auto-save-filename? filename)
+  ;; This could be more sophisticated, but is what the edwin
+  ;; code was originally doing.
+  (and (string? filename)
+       (string-find-next-char filename #\#)))
+       
 \f
 (define (os/read-file-methods)
   (list maybe-read-compressed-file