- Subject: Re: how to combine two modes
- From: Guenter Milde <G.Milde@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 May 2002 17:29:08 +0200 (CEST)
On Thu, 23 May 2002 09:48:22 +0200 wrote Joachim Schmitz <js@xxxxxxxxxxxxx>:
> Hi,
>
> I want to use the html-mode and the xml-mode together for editing xhtml.
> What is the easiest way to use both modes ?
Write a new one, based on the two?
Unfortunately, Slang is not object oriented, hence you cannot inherit
easily. There are, however, some functions that make it possible to have the
new mode using some goodis defined elsewhere:
require will load a mode-file (if this is not already done)
so you can use all of its (non-privat) functions
autoload declares a function to the interpreter and tells it where
to find the definition.
Tip: Use autoload if you need just one (or some)
function(s) as the defining file will only be loaded at
request (saving startup time). If you need additional
definitions and settings, use require.
copy_keymap will create a new keymap that is the copy of another one
modify this to your needs
add_keyword
add_keyword_n
add_keywords These allow the extension of the set of words to highlight
(if using the traditional (non DFA) highlighting scheme)
They are not defined by default, so you need autoload
statements as e.g.
autoload("add_keyword", "syntax");
Günter
--
G.Milde@xxxxxxxxxxxxxxxxxxxx
--------------------------
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]