- Subject: textmode, mode-guidelines
- From: Guenter Milde <milde@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Nov 2002 17:11:19 +0100 (CET)
Klaus Schmid" <klaus.schmid@xxxxxx> wrote
> Having edited a simple text file before, it was not possible to have a
> correct latex_mode:
>
> textmode.sl binds the tab-key to text_indent_relative in global keymap and
> latex_mode assumes binding to indent_line.
This is (IMHO) indeed a bug in text mode:
text_mode() changes a keybinding without creating/using a local keymap!!!
Try to overload with this version:
public define text_mode()
{
no_mode ();
set_mode("Text", 1);
set_buffer_hook ("indent_hook", "text_indent_relative");
set_buffer_hook ("newline_indent_hook", "text_newline_indent");
run_mode_hooks ("text_mode_hook");
}
and in the simplest case define
define text_newline_indent ()
{
bol_skip_white ();
variable ws = what_column - 1; % get number of leading spaces
newline;
whitespace(ws);
}
or use a more elaborated version of newline-indenting function for structured
text. (available on request)
> How about editing some mode guidlines?
A really good idea. I think something like a well commented mode_template.sl
would be a really nice thing to have. This should also include an example
for the use of mode-specific menues (To take up the idea from Guido G.
> since Jed got drop-down menus, it's become much easier to use even for
> beginners. I tried to get full advantage of menus in all the modes I wrote.
Maybe we could place such a thing in the JMR or ask for inclusion in the
standard-documentation.
Sincerely
Günter
--
Milde at ife.et.tu-dresden.de
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2002 date index]
[2002 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]