aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/edit.hrl
diff options
context:
space:
mode:
authorlukeg <lukeg>2003-02-21 19:01:14 +0000
committerlukeg <lukeg>2003-02-21 19:01:14 +0000
commite7d48fe500f6ed676ee1b212ebd61408bced1c5b (patch)
tree11a756c7bb4906f3e186c1cb8331cb7ed27bc69c /include/edit.hrl
downloadermacs-fork-e7d48fe500f6ed676ee1b212ebd61408bced1c5b.tar.gz
*** empty log message ***
Diffstat (limited to 'include/edit.hrl')
-rw-r--r--include/edit.hrl48
1 files changed, 48 insertions, 0 deletions
diff --git a/include/edit.hrl b/include/edit.hrl
new file mode 100644
index 0000000..2d7bcd5
--- /dev/null
+++ b/include/edit.hrl
@@ -0,0 +1,48 @@
+%% -*- comment-column: 33 -*-
+
+-ifndef(_EDIT_HRL).
+-define(_EDIT_HRL, true).
+
+-define(debug(F, A),
+ io:format("[~s:~p] " ++ F, [?MODULE, ?LINE | A])
+ ).
+
+%% To use the GTK terminal, use the following definition.
+%% Requires that you have erlgtk and gterm in your path.
+%%-define(EDIT_TERMINAL, edit_terminal_gterm).
+-define(EDIT_TERMINAL, edit_terminal).
+
+-record(state,
+ {curwin, % current window
+ windows=[], % other windows
+ buffers=[], % list of buffers, most recently used at head
+ lastcmd, % {M, F, A} of the last command executed
+ %% for edit_extended
+ pending_cmd,
+ pending_win
+ }).
+
+%% Window: an area of the display used for viewing a particular
+%% buffer, just like an emacs window.
+-record(window,
+ {buffer, % buffer being viewed
+ y, % screen row that this window starts at
+ width, % width in characters
+ height, % height in characters
+ start_mark, % mark on start of display (unique to window)
+ goal_column=0,
+ active=true,
+ id, % ref() - unique id
+ minibuffer=false,
+ %% fields just for the minibuffer
+ status_text,
+ prefix=""
+ }).
+
+-record(mode, {name, % string
+ id, % atom
+ keymaps}).
+
+-define(EOL_CHAR, $$). % Character to indicate the line is chopped
+
+-endif.