- Subject: modeline hook
- From: Francesc Rocher <f.rocher@xxxxxxxxxxxx>
- Date: Sun, 7 Jul 2002 11:59:42 +0000 (UTC)
Hi all,
Here you have a patch for site.sl to make 'modeline_hook' recognize
four new options:
-*- gnu-c -*-
-*- k&r-c -*-
-*- linux-c -*-
-*- bsd-c -*-
-*- jed-c -*-
You can use one of them to autmatically select C-mode and the
corresponding C style.
---8<--- cut here ---8<--- site.sl.patch ---8<---
--- site.sl.orig Sun Jul 7 10:51:27 2002
+++ site.sl Sun Jul 7 10:56:05 2002
@@ -1616,6 +1616,20 @@
if ( strlen(mode) )
{
variable mstr = "_mode";
+ variable style = "";
+
+ if (mode == "gnu-c") style = "gnu";
+ if (mode == "k&r-c") style = "k&r";
+ if (mode == "linux-c") style = "linux";
+ if (mode == "bsd-c") style = "bsd";
+ if (mode == "jed-c") style = "jed";
+ if (strlen(style))
+ {
+ c_mode();
+ c_set_style (style);
+ return 1;
+ }
+
mode = strtrans (mode, "-", "_");
!if (is_substr (mode, mstr)) mode += "_mode"; %mode = strcat (mode, "_mode" );
---8<--- cur here ---8<--- site.sl.patch ---8<---
Apply it as usual in your jed lib directory.
Later,
---
Francesc Rocher
--------------------------
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]