diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2011-10-14 01:49:24 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2011-10-14 01:49:24 +0200 |
commit | 90640c1aed302fd83a500bb9ccdfb6cf7b481112 (patch) | |
tree | daaec6345cc64a77b8cf815c4e08409de997be63 | |
parent | 190e6483ae66769e031c9b1ef0ca75d5fabe3e26 (diff) | |
download | ermacs-fork-90640c1aed302fd83a500bb9ccdfb6cf7b481112.tar.gz |
don't use now-incompatible file_gl for redirecting stdout to file
instead use the stderr group leader and redirect stderr on 'erl' invocation.
* let error_logger use its file logger handler
also let i:ii/1 use the list of modules to interpret directly. that way
'edit' can be debugged as well.
-rw-r--r-- | src/edit.erl | 8 | ||||
-rw-r--r-- | src/ermacs.in | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/edit.erl b/src/edit.erl index a1e0cbf..17e4f7a 100644 --- a/src/edit.erl +++ b/src/edit.erl @@ -34,13 +34,13 @@ start(Args) -> %% Another command-line entry function. Starts the editor with some %% modules loaded for debugging. debug() -> - lists:foreach(fun(Mod) -> i:ii(Mod) end, debug_modules()), + i:ii(debug_modules()), i:im(), sleep(1000), proc_lib:start_link(?MODULE, start, []). debug_modules() -> - [edit_display, edit_lib, ?EDIT_TERMINAL, edit_keymap, edit_buf, + [edit, edit_display, edit_lib, ?EDIT_TERMINAL, edit_keymap, edit_buf, edit_extended, edit_file, cord, edit_eval, edit_util, edit_text]. %% ---------------------------------------------------------------------- @@ -81,8 +81,8 @@ init() -> loop(State2). init_io_traps() -> - {ok, Leader} = file_gl:start_link("/tmp/edit.out"), - group_leader(Leader, self()), + group_leader(whereis(standard_error), self()), + ok = error_logger:logfile({open, "/tmp/ermacs-errors.log"}), error_logger:tty(false). %% Setup initial buffers (scratch and minibuffer) diff --git a/src/ermacs.in b/src/ermacs.in index cbb521f..accb10f 100644 --- a/src/ermacs.in +++ b/src/ermacs.in @@ -2,10 +2,8 @@ BASEDIR=%BASEDIR% -SLANG_EBIN_DIR=${BASEDIR}/../slang/ebin - -erl -pa ${SLANG_EBIN_DIR} -pa ${BASEDIR}/ebin -pa ${BASEDIR}/mods/ebin \ - -pa ${BASEDIR}/../msc/ebin -noshell -s edit start $* +erl -pa ${BASEDIR}/ebin -pa ${BASEDIR}/mods/ebin \ + -noshell -nouser -s edit start $* 2>/tmp/ermacs-misc.log # How do I get sh to run this in response to SIGINT? stty sane |