- Subject: Re: hooks and modes
- From: Duke Normandin <dukeofperl@xxxxxxx>
- Date: Thu, 13 Nov 2008 05:45:52 -0700 (MST)
On Wed, 12 Nov 2008, G. Milde wrote:
> On 11.11.08, Duke Normandin wrote:
>
> > I want to install Jed's HTML mode. To that end, I've RTFM - as far as
> > that goes, as well as Googling to death "mode, hook, jed, etc"
>
> > html.sl does exist in the JEDROOT/lib/
>
> So it is already installed. Did you want to install one of the alternative
> implementations?
Yes to both!
> > I think that my problem is that I do not yet understand the
> > relationship between a mode and its "hook". Do I need a hook for every
> > mode that I use?
>
> No, the mode-hook (in this case the SLang function html_mode_hook() is
> called by the html_mode() function and allows custimisation. If you are
> content with the defaults, you do not need it.
I see! So in summary blah_mode_hook()s are used _only_ when
blah_mode.sl needs to be customised. So what is the syntax for writing
a xxxxx_mode_hook()?
> > At any rate, I have no syntax highlighting and no HTML mode.
>
> What did you do up to this point?
>
> Does M-x html-mode help?
>
> There is a coupling of file-extension and mode, normally html-mode
> should be called whenever you open a file *.hmtl. Do you have a
> different naming scheme?
>
html-mode now appears to be working automatically. I'm using Jed on an
OS X Leopard box, so maybe some of the Terminal setting were a bit
off. I fiddled with the settings and I now have one-color syntax
highlighting - red - for the html tags. Not great, but better than
nothing.
I will soon be interested in writing a "mode" for a language that I'm
learning - Mumps (or M Technology as it's currently called). If I take
an existing .sl mode-type file in JED_ROOT and modify it, that could
be a good start? Then I can call it up automatically in my .jedrc file
using () = evalfile("mumps.sl")? or from jed using S-lang () = blah
blah. How would I set up the M-x mumps-mode thing? TIA....
--
Duke Normandin
dukeofperl(at)ml1(dot)net
edit my email address
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2008 date index]
[2008 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]