[syslog-ng]A JED syntax highlighting mode

Shane Lahey s.lahey@roadrunner.nf.net
Sun, 27 Oct 2002 00:56:21 -0230


This is a multi-part message in MIME format.

------=_NextPart_000_0002_01C27D53.AB57A2C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Here is a simple JED mode for syntax highlighting of your
syslog-ng.conf file(s).

To use it simply add this to your ~/.jedrc file:
Autoload ("syslog_ng_mode", "syslog-ng");

Then add the following line as the first line of your 'syslog-ng.conf'
file:
# -*- mode: syslog-ng; -*-

please send any suggestions/bugs/comments to s.lahey [at]
roadrunner.nf.net

---
This email has been scanned for viruses and is considered
Virus-Free.(Please note that this would not include new/undiscovered
viruses)Which would be impossible to detect as they are ...unknown... :)
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/02
 
  

------=_NextPart_000_0002_01C27D53.AB57A2C0
Content-Type: application/octet-stream;
	name="syslog-ng.sl"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="syslog-ng.sl"

% -*- slang -*-=0A=
=0A=
%--------------------------------------------------------------=0A=
%  This file provides a mode for editing syslog-ng.conf file.=0A=
%=0A=
%  Written by Shane Lahey <s.lahey@roadrunner.nf.net>=0A=
%  Basic syntax highligting, nothing else.=0A=
%  Last updated: October 26, 2002=0A=
%  syslog-ng version: 1.5.21+=0A=
%=0A=
%--------------------------------------------------------------=0A=
=0A=
$1 =3D "syslog-ng";=0A=
=0A=
!if (keymap_p ($1)) make_keymap ($1);=0A=
=0A=
% Now create and initialize a syntax table.=0A=
create_syntax_table ($1);=0A=
=0A=
define_syntax ("#", "", '%', $1);		% comments=0A=
define_syntax ("([", ")]", '(',$1);		% parentheses=0A=
define_syntax ('"','"',$1);			% strings=0A=
%define_syntax ('\\','\\',$1);			% escape character=0A=
define_syntax ("0-9a-zA-Z_",'w',$1);		% identifiers=0A=
define_syntax ("0-9a-fA-F.xXL",'0',$1);		% numbers=0A=
define_syntax (",;",',',$1);	        	% delimiters=0A=
define_syntax ("+-*/%=3D.&|^~<>!?@:#",'+',$1);	% operators=0A=
=0A=
=0A=
define syslog_ng_revision( )=0A=
{=0A=
   message("$Revision: 1.5.21 $");=0A=
}=0A=
=0A=
=0A=
define syslog_ng_insert_ket()=0A=
{=0A=
   parse_to_point();=0A=
   variable line =3D what_line();=0A=
   push_spot();=0A=
   skip_white();=0A=
   push_spot();=0A=
   =0A=
   if ((1 =3D=3D find_matching_delimiter('}')) and (line =3D=3D =
what_line()))=0A=
     {=0A=
	pop_spot();=0A=
	pop_spot();=0A=
	insert("}");=0A=
	trim();=0A=
	blink_match();=0A=
	return;=0A=
     }=0A=
=0A=
   pop_spot();=0A=
   bskip_white();=0A=
   if (bolp(), pop_spot())=0A=
     {=0A=
	trim();=0A=
	insert("}");=0A=
     }=0A=
   else=0A=
     {=0A=
	eol();=0A=
	insert("}");=0A=
     }=0A=
   eol();=0A=
   blink_match();=0A=
}=0A=
=0A=
=0A=
definekey ("syslog_ng_insert_ket", "}", $1);=0A=
=0A=
% keywords=0A=
() =3D define_keywords_n ($1, "noon", 2, 0);=0A=
() =3D define_keywords_n ($1, "DAYMINMSGSECTAGanderrloglprnotoffyes", 3, =
0);=0A=
() =3D define_keywords_n ($1, =
"DATEHOSTHOURYEARauthcritcroninfokernmailnewsuserwarn", 4, 0);=0A=
() =3D define_keywords_n ($1, "LEVELMONTHemergfinal", 5, 0);=0A=
() =3D define_keywords_n ($1, =
"daemonfilterlocal0local1local2local3local4local5local6local7noticesource=
", 6, 0);=0A=
() =3D define_keywords_n ($1, "ISODATEMESSAGEPROGRAMWEEKDAYoptions", 7, =
0);=0A=
() =3D define_keywords_n ($1, =
"FACILITYFULLDATEFULLHOSTPRIORITYauthprivcatchallfallback", 8, 0);=0A=
() =3D define_keywords_n ($1, "destination", 11, 0);=0A=
=0A=
% functions=0A=
() =3D define_keywords_n ($1, "tcpudp", 3, 1);=0A=
() =3D define_keywords_n ($1, "doorfifofilehostmarkpermpipeportsync", 4, =
1);=0A=
() =3D define_keywords_n ($1, "flagsfsyncgrouplevelmatchownerstats", 5, =
1);=0A=
() =3D define_keywords_n ($1, "encryptlocalipprogramuse_dnsusertty", 7, =
1);=0A=
() =3D define_keywords_n ($1, =
"compressdestportdir_permfacilityinternalprioritytemplateuse_fqdn", 8, =
1);=0A=
() =3D define_keywords_n ($1, =
"dir_groupdir_ownerdns_cachelocalportsync_freqtime_reap", 9, 1);=0A=
() =3D define_keywords_n ($1, =
"log_prefixkeep-alivesun-streamunix-dgram", 10, 1);=0A=
() =3D define_keywords_n ($1, =
"create_dirstime_reopensub-streamsunix-stream", 11, 1);=0A=
() =3D define_keywords_n ($1, "log_msg_size", 12, 1);=0A=
() =3D define_keywords_n ($1, "keep_hostnamelog_fifo_size", 13, 1);=0A=
() =3D define_keywords_n ($1, =
"dns_cache_sizelong_hostnamesuse_time_recvd", 14, 1);=0A=
() =3D define_keywords_n ($1, =
"chain_hostnamesmax-connectionsremove_if_oldertemplate_escape", 15, 1);=0A=
() =3D define_keywords_n ($1, "dns_cache_expire", 16, 1);=0A=
() =3D define_keywords_n ($1, "gc_busy_thresholdgc_idle_threshold", 17, =
1);=0A=
() =3D define_keywords_n ($1, "dns_cache_expire_failed", 23, 1);=0A=
=0A=
define syslog_ng_mode()=0A=
{=0A=
   variable kmap =3D $1;=0A=
   set_mode (kmap,4);=0A=
   use_keymap (kmap);=0A=
   use_syntax_table (kmap);=0A=
}=0A=
=0A=

------=_NextPart_000_0002_01C27D53.AB57A2C0--