From: Ian T Zimmerman <itz@transbay.net>
To: caml-list@inria.fr
Subject: Re: Toplevel script mode
Date: 06 Apr 1999 01:43:20 -0700 [thread overview]
Message-ID: <m2yak62l7b.fsf@kronstadt.transbay.net> (raw)
Right after sending off my preceding message I stepped into the shower
and immediately I had another brilliant idea :-) Why not make the
initfile name mutable, then user extensions can load a different one
(if they change the ref in the files they link).
Patch is cummulative:
--- /home/itz/toploop.ml Tue Apr 6 00:57:59 1999
+++ /usr/src/ocaml-2.02/toplevel/toploop.ml Tue Apr 6 01:32:49 1999
@@ -271,8 +271,11 @@
Clflags.thread_safe := true;
Compile.init_path()
+let initfile_name =
+ ref ".ocamlinit"
+
let load_ocamlinit () =
- if Sys.file_exists ".ocamlinit" then ignore(use_silently ".ocamlinit")
+ if Sys.file_exists !initfile_name then ignore(use_silently !initfile_name)
(* The interactive loop *)
@@ -311,7 +314,7 @@
(* Execute a script *)
let run_script name =
- Compile.init_path();
toplevel_env := Compile.initial_env();
Format.set_formatter_out_channel stderr;
+ load_ocamlinit ();
use_silently name
--
Ian T Zimmerman <itz@transbay.net>
I came to the conclusion that what was wrong about the guillotine
was that the condemned man had no chance at all, absolutely none.
Albert Camus, _The Outsider_
next reply other threads:[~1999-04-06 16:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-06 8:43 Ian T Zimmerman [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-04-06 8:07 Ian T Zimmerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2yak62l7b.fsf@kronstadt.transbay.net \
--to=itz@transbay.net \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox