jed-users mailing list

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

Re: syntax_table_p


On Fri, Jul 25, 2003 at 09:00:55PM +0000, Joerg Sommer wrote:
> begin  "Klaus Schmid" <klaus.schmid@xxxxxxx> wrote:
> > "Joerg Sommer" <joerg@xxxxxxxxxxxx> wrote:
> > 
> >> why there isn't a syntax_table_p() that checks, if the syntax_table  
> >> exists? Like keymap_p().
> > 
> > I assume to add something like this would not be a big issue --
> > there is just no requirement for that.
> > 
> > In which context would you need this function?
> 
> In the same context like keymap_p. I will switch to a buffer. If it
> doesn't exist, I create it. Before I can assign a syntax table to it, I
> must check if it exist and if not, I must create it.
> 
> One way is it, to create the table on file load, but then I create four
> or five mini table and keymaps, where I don't know, if I need them. "

How about
  
% use syntax_table, if non-existent, create it  
define _use_syntax_table(name)
{
   ERROR_BLOCK
     {
	_clear_error();
	create_syntax_table(name);
	use_syntax_table(name);
     }
   use_syntax_table(name);
}

untested!
  
Guenter
  
  
-- 
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>.


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