Added OS/COMPLETION-IGNORE-FILENAME? to unix.scm
authorHenry M. Wu <edu/mit/csail/zurich/mhwu>
Tue, 21 Apr 1992 17:27:36 +0000 (17:27 +0000)
committerHenry M. Wu <edu/mit/csail/zurich/mhwu>
Tue, 21 Apr 1992 17:27:36 +0000 (17:27 +0000)
v7/src/edwin/filcom.scm
v7/src/edwin/unix.scm

index ca97f00bfd268eccc110ef4989d24c7589e895f3..f7e1e99522962915371413a555a23a9ebfadda45 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/filcom.scm,v 1.166 1992/04/08 17:57:43 cph Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/filcom.scm,v 1.167 1992/04/21 17:27:36 mhwu Exp $
 ;;;
 ;;;    Copyright (c) 1986, 1989-92 Massachusetts Institute of Technology
 ;;;
@@ -665,19 +665,7 @@ If a file with the new name already exists, confirmation is requested first."
     (if (os/file-directory? (os/make-filename directory (car filenames)))
        (set-car! filenames (os/filename-as-directory (car filenames)))))
   (sort filenames string<?))
-\f
-(define (completion-ignore-filename? filename)
-  (and (not (os/file-directory? filename))
-       (there-exists? (ref-variable completion-ignored-extensions)
-        (lambda (extension)
-          (string-suffix? extension filename)))))
-
-(define-variable completion-ignored-extensions
-  "Completion ignores filenames ending in any string in this list."
-  (os/completion-ignored-extensions)
-  (lambda (extensions)
-    (and (list? extensions)
-        (for-all? extensions
-          (lambda (extension)
-            (and (string? extension)
-                 (not (string-null? extension))))))))
\ No newline at end of file
+
+(define-integrable (completion-ignore-filename? filename)
+  (os/completion-ignore-filename? filename))
+
index 0fb9c20ac881ef07c622cc641a5bf301b3560a76..f91db1140cc96752f6086e605b99a39ce1686e5e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/unix.scm,v 1.23 1992/04/06 20:25:27 bal Exp $
+;;;    $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 $
 ;;;
 ;;;    Copyright (c) 1989-92 Massachusetts Institute of Technology
 ;;;
@@ -299,12 +299,28 @@ Includes the new backup.  Must be > 0."
        (pathname-type (->namestring (pathname-new-type pathname false)))
        type)))
 
+(define (os/completion-ignore-filename? filename)
+  (and (not (os/file-directory? filename))
+       (there-exists? (ref-variable completion-ignored-extensions)
+         (lambda (extension)
+          (string-suffix? extension filename)))))
+
 (define (os/completion-ignored-extensions)
   (append '(".o" ".elc" ".bin" ".lbin" ".fasl"
                 ".dvi" ".toc" ".log" ".aux"
                 ".lof" ".blg" ".bbl" ".glo" ".idx" ".lot")
          (list-copy unix/backup-suffixes)))
 
+(define-variable completion-ignored-extensions
+  "Completion ignores filenames ending in any string in this list."
+  (os/completion-ignored-extensions)
+  (lambda (extensions)
+    (and (list? extensions)
+        (for-all? extensions
+          (lambda (extension)
+            (and (string? extension)
+                 (not (string-null? extension))))))))
+\f
 (define (os/file-type-to-major-mode)
   (alist-copy
    `(("article" . text)