From: Chris Hanson Date: Wed, 24 Sep 2003 01:57:52 +0000 (+0000) Subject: Eliminate OS/FILE-TYPE-TO-MAJOR-MODE; use single list for all systems. X-Git-Tag: 20090517-FFI~1802 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3d4fd978a5f4044c68dd6d6cc4db67725022ed46;p=mit-scheme.git Eliminate OS/FILE-TYPE-TO-MAJOR-MODE; use single list for all systems. --- diff --git a/v7/src/edwin/dosfile.scm b/v7/src/edwin/dosfile.scm index f4a79c2b1..81d993fd4 100644 --- a/v7/src/edwin/dosfile.scm +++ b/v7/src/edwin/dosfile.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: dosfile.scm,v 1.43 2003/07/14 20:23:43 cph Exp $ +$Id: dosfile.scm,v 1.44 2003/09/24 01:57:39 cph Exp $ Copyright 1995,1996,1999,2000,2002,2003 Massachusetts Institute of Technology @@ -425,38 +425,8 @@ Switches may be concatenated, e.g. `-lt' is equivalent to `-l -t'." (lambda (extension) (string-suffix? extension filename)))))) -(define (os/file-type-to-major-mode) - (alist-copy - `(("article" . text) - ("asm" . midas) - ("bat" . text) - ("bib" . text) - ("c" . c) - ("cc" . c) - ("h" . c) - ("htm" . html) - ("html" . html) - ("inc" . php) - ("java" . java) - ("pas" . pascal) - ("php" . php) - ("php3" . php) - ("s" . scheme) - ("scm" . scheme) - ("text" . text) - ("txi" . texinfo) - ("txt" . text) - ("xht" . html) - ("xhtml" . html) - ("xml" . html) - ("xsl" . html) - ("y" . c)))) - -(define (os/init-file-name) - "~/edwin.ini") - -(define (os/abbrev-file-name) - "~/abbrevs.scm") +(define (os/init-file-name) "~/edwin.ini") +(define (os/abbrev-file-name) "~/abbrevs.scm") (define (os/find-file-initialization-filename pathname) (or (and (equal? "scm" (pathname-type pathname)) diff --git a/v7/src/edwin/fileio.scm b/v7/src/edwin/fileio.scm index afa509e18..b58ae6a97 100644 --- a/v7/src/edwin/fileio.scm +++ b/v7/src/edwin/fileio.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: fileio.scm,v 1.161 2003/02/14 18:28:12 cph Exp $ +$Id: fileio.scm,v 1.162 2003/09/24 01:57:48 cph Exp $ Copyright 1986,1989,1991,1992,1993,1994 Massachusetts Institute of Technology Copyright 1995,1997,1999,2000,2001,2002 Massachusetts Institute of Technology @@ -334,7 +334,36 @@ Visiting a file whose name matches REGEXP causes MODE to be used." "Specifies the major mode for new buffers based on file type. This is an alist, the cars of which are pathname types, and the cdrs of which are major modes." - (os/file-type-to-major-mode) + (alist-copy + `(("article" . text) + ("asm" . midas) + ("bat" . text) + ("bib" . text) + ("c" . c) + ("cc" . c) + ("dtd" . html) + ("h" . c) + ("htm" . html) + ("html" . html) + ("inc" . php) + ("java" . java) + ("pas" . pascal) + ("php" . php) + ("php3" . php) + ("s" . scheme) + ("scm" . scheme) + ("text" . text) + ("texi" . texinfo) + ("texinfo" . texinfo) + ("txi" . texinfo) + ("txt" . text) + ("xht" . html) + ("xhtml" . html) + ("xml" . html) + ("xsl" . html) + ("y" . c) + ,@(os/file-type-to-major-mode))) + string->mode-alist?) ;;;; Local Variable Initialization diff --git a/v7/src/edwin/unix.scm b/v7/src/edwin/unix.scm index fab55b796..9110c52e4 100644 --- a/v7/src/edwin/unix.scm +++ b/v7/src/edwin/unix.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: unix.scm,v 1.116 2003/07/14 20:23:47 cph Exp $ +$Id: unix.scm,v 1.117 2003/09/24 01:57:52 cph Exp $ Copyright 1989,1991,1992,1993,1994,1995 Massachusetts Institute of Technology Copyright 1996,1997,1999,2000,2002,2003 Massachusetts Institute of Technology @@ -308,35 +308,6 @@ Includes the new backup. Must be > 0." (and (string? extension) (not (string-null? extension)))))))) -(define (os/file-type-to-major-mode) - (alist-copy - `(("article" . text) - ("asm" . midas) - ("bat" . text) - ("bib" . text) - ("c" . c) - ("cc" . c) - ("h" . c) - ("htm" . html) - ("html" . html) - ("inc" . php) - ("java" . java) - ("pas" . pascal) - ("php" . php) - ("php3" . php) - ("s" . scheme) - ("scm" . scheme) - ("text" . text) - ("texi" . texinfo) - ("texinfo" . texinfo) - ("txi" . texinfo) - ("txt" . text) - ("xht" . html) - ("xhtml" . html) - ("xml" . html) - ("xsl" . html) - ("y" . c)))) - (define (os/init-file-name) "~/.edwin") (define (os/abbrev-file-name) "~/.abbrev_defs")