jed-users mailing list

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

Re: C-mode & color customization in FAQ


John Price <jp_jed@xxxxxxxx> wrote:
>I see comments about defining a c_set_style_hook, but what should
>it do?  Is there an example?  This would make a great FAQ!

As far as I know, this is the first time anyone has asked about it.
If c_set_style_hook exists, it will get called with the name of the
"style".   Here is an example:

   public define c_set_style_hook (style)
   {
      if (style == "Prince")
        {
	  C_INDENT = 2;
	  C_BRACE = 3;
	  C_BRA_NEWLINE = 1;
	  C_CONTINUED_OFFSET = 1;
	  C_Colon_Offset = 2;
	  C_Class_Offset = 2;
	  return;
        }
      if (style == "whatever")
        {
	   .
	   .
	 return;
        }
   }

This will allow you to do:

   c_set_style ("Prince");

--John
	
				      

--------------------------
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]