drop suffix from pref-file name

This commit is contained in:
Matthew Flatt 2010-04-26 15:33:58 -06:00
parent ed82cca998
commit 327408c12f
3 changed files with 10 additions and 38 deletions

View File

@ -1,28 +0,0 @@
#lang scheme/base
(provide nest)
;; A form that makes it easy to combine many "right-drifting" nested
;; expressions into a single one, sort of like a generalized version of the `*'
;; from `let*' and similar forms.
(define-syntax nest
(syntax-rules ()
[(nest () body0 body ...)
(let () body0 body ...)]
;; this allows putting definitions in the body
[(nest ([form forms ...]) body0 body ...)
(form forms ... (let () body0 body ...))]
[(nest ([form forms ...] . more) body0 body ...)
(form forms ... (nest more body0 body ...))]))
;; using this instead will allow splicing body expressions in the last form
;; whatever it happens to be, which can be (ab)used in strange ways
#;
(define-syntax nest
(syntax-rules ()
[(nest () body ...)
(begin body ...)]
[(nest ([form forms ...]) body ...)
(form forms ... body ...)]
[(nest ([form forms ...] . more) body ...)
(form forms ... (nest more body ...))]))

View File

@ -2541,7 +2541,7 @@ Scheme_Object *wxSchemeFindDirectory(int argc, Scheme_Object **argv)
if (which == id_init_file) if (which == id_init_file)
return append_path(home, return append_path(home,
scheme_make_path("\\gracketrc.rkt" + ends_in_slash)); scheme_make_path("\\gracketrc" + ends_in_slash));
if (which == id_setup_file) if (which == id_setup_file)
return append_path(home, return append_path(home,
scheme_make_path("\\gracket.ini" + ends_in_slash)); scheme_make_path("\\gracket.ini" + ends_in_slash));
@ -2584,7 +2584,7 @@ Scheme_Object *wxSchemeFindDirectory(int argc, Scheme_Object **argv)
if (which == id_init_file) if (which == id_init_file)
return append_path(home, return append_path(home,
scheme_make_path(":gracketrc.rkt" + ends_in_colon)); scheme_make_path(":gracketrc" + ends_in_colon));
if (which == id_setup_file) if (which == id_setup_file)
return append_path(home, return append_path(home,
scheme_make_path(":gracket.fnt" + ends_in_colon)); scheme_make_path(":gracket.fnt" + ends_in_colon));
@ -2778,9 +2778,9 @@ int wxGetPreference(const char *name, char *res, long len)
if (!ends_in_slash) if (!ends_in_slash)
s[l++] = '/'; s[l++] = '/';
# ifdef wx_mac # ifdef wx_mac
memcpy(s + l, "org.racket-lang.prefs.rkt", 24); memcpy(s + l, "org.racket-lang.prefs", 24);
# else # else
memcpy(s + l, "racket-prefs.rkt", 13); memcpy(s + l, "racket-prefs", 13);
# endif # endif
#endif #endif
@ -2796,7 +2796,7 @@ int wxGetPreference(const char *name, char *res, long len)
memcpy(s, home, l); memcpy(s, home, l);
if (!ends_in_slash) if (!ends_in_slash)
s[l++] = '\\'; s[l++] = '\\';
memcpy(s + l, "racket-prefs.rkt", 13); memcpy(s + l, "racket-prefs", 13);
#endif #endif
/*************** Mac OS Classic ***************/ /*************** Mac OS Classic ***************/
@ -2825,7 +2825,7 @@ int wxGetPreference(const char *name, char *res, long len)
memcpy(s, home, l); memcpy(s, home, l);
if (!ends_in_slash) if (!ends_in_slash)
s[l++] = ':'; s[l++] = ':';
memcpy(s + l, "org.racket-lang.prefs.rkt", 24); memcpy(s + l, "org.racket-lang.prefs", 24);
} }
#endif #endif

View File

@ -5839,9 +5839,9 @@ find_system_path(int argc, Scheme_Object **argv)
return append_path(home, scheme_make_path("/.racketrc" + ends_in_slash)); return append_path(home, scheme_make_path("/.racketrc" + ends_in_slash));
if (which == id_pref_file) { if (which == id_pref_file) {
#if defined(OS_X) && !defined(XONX) #if defined(OS_X) && !defined(XONX)
return append_path(home, scheme_make_path("/org.racket-lang.prefs.rkt" + ends_in_slash)); return append_path(home, scheme_make_path("/org.racket-lang.prefs" + ends_in_slash));
#else #else
return append_path(home, scheme_make_path("/racket-prefs.rkt" + ends_in_slash)); return append_path(home, scheme_make_path("/racket-prefs" + ends_in_slash));
#endif #endif
} }
} }
@ -5982,9 +5982,9 @@ find_system_path(int argc, Scheme_Object **argv)
} }
if (which == id_init_file) if (which == id_init_file)
return append_path(home, scheme_make_path("\\racketrc.rkt" + ends_in_slash)); return append_path(home, scheme_make_path("\\racketrc" + ends_in_slash));
if (which == id_pref_file) if (which == id_pref_file)
return append_path(home, scheme_make_path("\\racket-prefs.rkt" + ends_in_slash)); return append_path(home, scheme_make_path("\\racket-prefs" + ends_in_slash));
return home; return home;
} }
#endif #endif