Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a stop/0 function which doesn't halt the Erlang node. Right now…

… it does a init:restart/0, but it should probably do something nicer. Also, added some info in the TOUR file.
  • Loading branch information...
commit 0ea1b66b7b6fe07836400dd14194160a78bc8d9a 1 parent 3e1d7c5
etnt authored
Showing with 25 additions and 0 deletions.
  1. +20 −0 lib/ermacs/doc/TOUR
  2. +5 −0 lib/ermacs/src/edit_lib.erl
View
20 lib/ermacs/doc/TOUR
@@ -106,6 +106,21 @@ Multiple buffers
You can use "C-x C-f" to open a new file, and then "C-x b" back here
as you would in emacs (but without the completions).
+
+The ~/.ermacs file
+------------------
+
+Works similar to the ~/.erlang file, i.e you can put erlang
+code there to be evaluated. For example, if you want to redefine
+the global keymap so that "C-x C-c" doesn't halt the Erlang node,
+the add a line such as:
+
+ edit_keymap:global_set_key("C-x C-c", {edit_lib, stop, []}).
+
+to your ~/.ermacs file.
+(make sure that you make a newline after the dot)
+
+
Other stuff
-----------
@@ -113,3 +128,8 @@ To see what else there is, look in the keymap definition:
C-x C-f ../src/edit_globalmap.erl RET
+If you want to change the foreground/background colors, you
+can set the COLORFGBG environment variable like this:
+
+ export COLORFGBG="green;black"
+
View
5 lib/ermacs/src/edit_lib.erl
@@ -588,6 +588,11 @@ quit(State) ->
?EDIT_TERMINAL:teardown(),
halt().
+-command({stop, [], "Exit the editor process, without halting Erlang."}).
+stop(State) ->
+ ?EDIT_TERMINAL:teardown(),
+ init:restart(). % FIXME , should do something nicer... (tobbe)
+
-command({printf, [{string, "String:"}],
"Print a string to standard output (the file edit.out)"}).
Please sign in to comment.
Something went wrong with that request. Please try again.