jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Update to my Jed macros page


On 14.10.05, Marko Mahnic wrote:
> G. Milde wrote:
> >
> >No, Word_Chars is a buffer local variable: While define_word() defines
> >word chars globally (i.e. for all buffers and modes), the buffer local
> >variable allows different settings for different modes.
> >
> 
> Do you think it would make sense to add another level of local variables --
> the mode-local variables. The search order for a variable would then be:
>   1. buffer local
>   2. mode local
>   3. global
> 
> (this search order could be coded into get_blocal_var or a new function
> could be added)
> 
> This way one could define Word_Chars for all buffers with the same mode
> and not just for the current buffer.

I experimented a lot with mode-local variables and functions but finally
gave it up.

Currently, I think a mode_hook is an efficient way to achieve this. All
well-behaved modes call a <modename>_mode_hook(), so nothing new is needed.

OTOH, jed 99.17 provides an extensible mode_info, while the old modeinfo
was restricted to 

     fold_info,			       %  folding.sl: beg\rend\r\beg1\r\end1
     dabbrev_word_chars,		       %  word chars for dabbrev mode
     init_mode_menu,
     chglog_get_item,
     use_dfa_syntax,

See modeinfo.sl. I did not test it, but can imagine to extend 
mark_word() to use mode_get_mode_info("word_chars").

Guenter

-- 
G.Milde web.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>.


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]