Initial Commit
[packages] / xemacs-packages / text-modes / apache-mode.el
1 ;;; apache-mode.el --- major mode for editing Apache configuration files
2
3 ;; Keywords:    languages, faces
4 ;; Author:      Jonathan Marten  <jonathan.marten@uk.sun.com> or
5 ;; Last edit:   12-May-2002      <rendhalver@xemacs.org>
6
7 ;; This file is an add-on for XEmacs or GNU Emacs (not tested with the latter).
8 ;;
9 ;; It is free software; you can redistribute it and/or modify it
10 ;; under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 2, or (at your option)
12 ;; any later version.
13 ;;
14 ;; It is distributed in the hope that it will be useful, but
15 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 ;; General Public License for more details.
18 ;;
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with your copy of Emacs; see the file COPYING.  If not, write
21 ;; to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ;; Boston, MA 02111-1307, USA.
23
24 ;;; Commentary:
25 ;;
26 ;; There isn't really much to say.  The list of keywords was derived from
27 ;; the documentation for Apache 1.3; there may be some errors or omissions.
28 ;;
29 ;; There are currently no local keybindings defined, but the hooks are
30 ;; there in the event that anyone gets around to adding any.
31 ;;
32
33 ;; PB: hopefully this will no longer be needed :)
34 ;;
35 ;; no longer need to hack auto-mode-alist :)
36
37 ;; To enable automatic selection of this mode when appropriate files are
38 ;; visited, add the following to your favourite site or personal Emacs
39 ;; configuration file:
40 ;;
41 ;;   (autoload 'apache-mode "apache-mode" "autoloaded" t)
42 ;;   (add-to-list 'auto-mode-alist '("\\.htaccess$"   . apache-mode))
43 ;;   (add-to-list 'auto-mode-alist '("httpd\\.conf$"  . apache-mode))
44 ;;   (add-to-list 'auto-mode-alist '("srm\\.conf$"    . apache-mode))
45 ;;   (add-to-list 'auto-mode-alist '("access\\.conf$" . apache-mode))
46 ;;
47
48 ;;; Change Log:
49 ;;
50 ;; Version 1.0, October 1999    First public release
51
52 ;; Version 1.1, April 2002      changed var's to use customise
53 ;;                              updated the keywords to apache 1.3.24
54 ;;                              added apache-file-patterns to save having to hack
55 ;;                              auto-mode-alist, added autoloaded function to add
56 ;;                              apache-file-patterns to auto-mode-alist on autoload
57 ;;
58 ;; Version 1.2, April 2002      Added mod_ssl 2.8.8, Apache-SSL 1.47 and
59 ;;                              mod_perl 1.26 keywords.
60
61 ;; Version 1.2.1, May 2002      separated apache directives into sections
62 ;;                              for easier updating
63
64 ;; Version 1.3, May 2002        updated keywords to include new directives in 
65 ;;                              apache 2
66
67 ;;; Code:
68
69 ;; Requires
70 (require 'font-lock)
71 (require 'regexp-opt)
72 (require 'custom)
73
74 ;; Variables
75
76 ;;;###autoload
77 (defgroup apache nil
78   "Major mode for editing Apache configuration files."
79   :prefix "apache-"
80   :group 'languages)
81
82 (defcustom apache-manual-url "http://httpd.apache.org/"
83   "*URL at which to find the Apache manual."
84   :type 'string
85   :group 'apache)
86
87 ;;;###autoload
88 (defcustom apache-file-patterns
89   (list "\\.htaccess\\(\\.default\\)?$" "httpd\\.conf\\(\\.default\\)?$"
90         "srm\\.conf\\(\\.default\\)?$" "access\\.conf\\(\\.default\\)?$")
91   "*List of file patterns for which to automatically invoke `apache-mode'."
92   :type '(repeat (regexp :tag "Pattern"))
93   :group 'apache)
94
95 (defcustom apache-mode-hook nil
96   "*List of hook functions run by `apache-mode' (see `run-hooks')."
97   :type 'hook
98   :group 'apache)
99
100 (defvar apache-mode-map nil
101   "Keymap used in `apache-mode' buffers.")
102
103 (defvar apache-mode-syntax-table nil
104   "Syntax table for `apache-mode'.")
105
106 ;;; blatently pinched and hacked from php-mode
107 ;;; hey if it works use it
108 ;;
109 ;; Make apache-mode the default mode for apache config buffers.
110 ;;;###autoload
111 (let ((apache-file-patterns-temp apache-file-patterns))
112   (while apache-file-patterns-temp
113     (add-to-list 'auto-mode-alist
114                   (cons (car apache-file-patterns-temp) 'apache-mode))
115     (setq apache-file-patterns-temp (cdr apache-file-patterns-temp))))
116
117
118 ;; Font lock
119 (defconst apache-font-lock-keywords
120   (purecopy
121    (list
122     (list "^\\s-*#.*$" 0 'font-lock-comment-face t)
123
124     (list (concat                                       ; sections
125            "^\\s-*</?\\("
126            (regexp-opt
127             '("Directory" "DirectoryMatch" "Files" "FilesMatch"
128               "IfDefine" "IfModule" "Limit" "LimitExcept" "Location"
129               "LocationMatch" "VirtualHost"
130               ;; mod_perl
131               "Perl"
132               ))
133            "\\)\\(>\\|\\s-\\)")
134           1 'font-lock-function-name-face)
135
136     (list (concat                                       ; keywords
137            "^\\s-*\\("
138            (regexp-opt
139             (delete-duplicates
140              '(
141                ;; core directives
142                "AcceptFilter" "AcceptMutex" "AccessConfig" "AccessFileName" "AddDefaultCharset"
143                "AddModule" "AllowOverride" "AuthName" "AuthType" "BindAddress"
144                "BS2000Account" "ClearModuleList" "ContentDigest" "CoreDumpDirectory"
145                "DefaultType" "DocumentRoot" "EBCDICConvert" "EBCDICConvertByType"
146                "EBCDICKludge" "ErrorDocument" "ErrorLog" "FileETag" "Group"
147                "HostnameLookups" "IdentityCheck" "Include" "KeepAlive" "KeepAliveTimeout"
148                "LimitRequestBody" "LimitRequestFields" "LimitRequestFieldsize"
149                "LimitRequestLine" "Listen" "ListenBacklog" "LockFile" "LogLevel"
150                "MaxClients" "MaxKeepAliveRequests" "MaxRequestsPerChild" "MaxSpareServers"
151                "MinSpareServers" "NameVirtualHost" "Options" "PidFile" "Port" "Require"
152                "ResourceConfig" "RLimitCPU" "RLimitMEM" "RLimitNPROC" "Satisfy"
153                "ScoreBoardFile" "ScriptInterpreterSource" "SendBufferSize" "ServerAdmin"
154                "ServerAlias" "ServerName" "ServerPath" "ServerRoot" "ServerSignature"
155                "ServerTokens" "ServerType" "StartServers" "ThreadsPerChild"
156                "ThreadStackSize" "TimeOut" "UseCanonicalName" "User"
157                ;; apache2 core directives
158                "AcceptPathInfo" "ForceType" "LimitXMLRequestBody" "Require"
159                "SetHandler" "SetInputFilter" "SetOutputFilter"
160                ;; apache2 mpm_common
161                "CoreDumpDirectory" "Group" "Listen" "ListenBackLog" "LockFile"
162                "MaxClients" "MaxRequestsPerChild" "MaxSpareThreads"
163                "MaxThreadsPerChild" "MinSpareThreads" "NumServers" "PidFile"
164                "ScoreBoardFile" "SendBufferSize" "ServerLimit" "StartServers"
165                "StartThreads" "ThreadLimit" "ThreadsPerChild" "User"
166                ;; mpm_netware
167                "Listen" "ListenBacklog" "MaxRequestsPerChild" "MaxSpareThreads"
168                "MaxThreads" "MinSpareThreads" "SendBufferSize" "StartThreads"
169                "ThreadStackSize"
170                ;; mpm_winnt
171                "CoreDumpDirectory" "Listen" "ListenBacklog"
172                "MaxRequestsPerChild" "PidFile" "SendBufferSize" "ThreadsPerChild"
173                ;; mpm_perchild
174                "AssignUserId" "ChildPerUserId" "CoreDumpDirectory" "Group"
175                "Listen" "ListenBacklog" "LockFile" "MaxRequestsPerChild"
176                "MaxSpareThreads" "MaxThreadsPerChild" "MinSpareThreads"
177                "NumServers" "PidFile" "ScoreBoardFile" "SendBufferSize"
178                "StartThreads" "User"
179                ;; mpm_prefork
180                "AcceptMutex" "CoreDumpDirectory" "Listen" "ListenBacklog"
181                "LockFile" "MaxRequestsPerChild" "MaxSpareServers"
182                "MaxSpareServers" "MinSpareServers" "MinSpareServers"
183                "PidFile" "ScoreBoardFile" "SendBufferSize"
184                "ServerLimit" "StartServers" "User"
185                ;; mpm_worker
186                "CoreDumpDirectory" "Group" "Listen" "ListenBacklog"
187                "LockFile" "MaxClients" "MaxRequestsPerChild"
188                "MaxSpareThreads" "MinSpareThreads" "PidFile"
189                "ScoreBoardFile" "SendBufferSize" "ServerLimit"
190                "StartServers" "ThreadLimit" "ThreadsPerChild" "User"
191                ;; Environment Creation directives
192                ;; mod_env 
193                "PassEnv" "SetEnv" "UnsetEnv"
194                ;; mod_setenvif
195                "BrowserMatch" "BrowserMatchNoCase" "SetEnvIf" "SetEnvIfNoCase"
196                ;; Content Type Decisions
197                ;; mod_mime
198                "AddCharset" "AddEncoding" "AddHandler" "AddLanguage" "AddType"
199                "DefaultLanguage" "ForceType" "RemoveEncoding" "RemoveHandler"
200                "RemoveType" "SetHandler" "TypesConfig"
201                ;; apache2 mod_mime
202                "AddInputFilter" "AddOutputFilter" "MultiviewsMatch"
203                "RemoveCharset" "RemoveInputFilter" "RemoveLanguage"
204                "RemoveOutputFilter"
205                ;; mod_mime_magic
206                "MimeMagicFile"
207                ;; mod_negotiation
208                "CacheNegotiatedDocs" "LanguagePriority"
209                ;; apache2 mod_negotiation
210                "ForceLangaugePriority"
211                ;; URL Mapping
212                ;; mod_alias
213                "Alias" "AliasMatch" "Redirect" "RedirectMatch" "RedirectTemp"
214                "RedirectPermanent" "ScriptAlias" "ScriptAliasMatch"
215                ;; mod_rewrite
216                "RewriteEngine" "RewriteOptions" "RewriteLog" "RewriteLogLevel"
217                "RewriteLock" "RewriteMap" "RewriteBase" "RewriteCond" "RewriteRule"
218                ;; mod_userdir
219                "UserDir"
220                ;; mod_speling
221                "CheckSpelling"
222                ;; mod_vhost_alias
223                "VirtualDocumentRoot" "VirtualDocumentRootIP" "VirtualScriptAlias"
224                "VirtualScriptAliasIP"
225                ;; Directory Handling
226                ;; mod_dir
227                "DirectoryIndex"
228                ;; mod_autoindex
229                "AddAlt" "AddAltByEncoding" "AddAltByType" "AddDescription" "AddIcon"
230                "AddIconByEncoding" "AddIconByType" "DefaultIcon" "FancyIndexing"
231                "HeaderName" "IndexIgnore" "IndexOptions" "IndexOrderDefault" "ReadmeName"
232                ;; Access Control
233                ;; mod_access
234                "Allow" "Deny" "Order"
235                ;; mod_auth
236                "AuthGroupFile" "AuthUserFile" "AuthAuthoritative"
237                ;; mod_auth_dbm
238                "AuthDBMGroupFile" "AuthDBMUserFile" "AuthDBMAuthoritative"
239                ;; apache2 mod_auth_dbm
240                "AuthDBMType"
241                ;; mod_auth_db
242                "AuthDBGroupFile" "AuthDBUserFile" "AuthDBAuthoritative"
243                ;; mod_auth_anon
244                "Anonymous" "Anonymous_Authoritative" "Anonymous_LogEmail"
245                "Anonymous_MustGiveEmail" "Anonymous_NoUserID" "Anonymous_VerifyEmail"
246                ;; mod_auth_digest
247                "AuthDigestFile" "AuthDigestGroupFile" "AuthDigestQop"
248                "AuthDigestNonceLifetime" "AuthDigestNonceFormat" "AuthDigestNcCheck"
249                "AuthDigestAlgorithm" "AuthDigestDomain"
250                ;; apache2 mod_auth_digest
251                "AuthDigestAlgorithm" "AuthDigestNcCheck" "AuthDigestNonceFormat"
252                "AuthDigestNonceLifetime"
253                ;; mod_digest
254                "AuthDigestFile"
255                ;; HTTP Response
256                ;; mod_headers
257                "Header"
258                ;; apache2 mod_headers
259                "RequestHeader"
260                ;; mod_cern_meta
261                "MetaFiles" "MetaDir" "MetaSuffix"
262                ;; mod_expires
263                "ExpiresActive" "ExpiresByType" "ExpiresDefault"
264                ;; Dynamic Content
265                ;; mod_include
266                "XBitHack"
267                ;; apache2 mod_include
268                "SSIEndTag" "SSIErrorMsg" "SSIStartTag" "SSITimeFormat"
269                "SSIUndefinedEcho"
270                ;; mod_cgi
271                "ScriptLog" "ScriptLogLength" "ScriptLogBuffer"
272                ;; mod_actions
273                "Action" "Script" 
274                ;; mod_isapi WIN32 only
275                "ISAPIReadAheadBuffer" "ISAPILogNotSupported" "ISAPIAppendLogToErrors"
276                "ISAPIAppendLogToQuery"
277                ;; apache2 mod_isapi
278                "ISAPIFileChache"
279                ;; Internal Content Handlers
280                ;; mod_status
281                "ExtendedStatus" 
282                ;; mod_info
283                "AddModuleInfo"
284                ;; Logging
285                ;; mod_log_config
286                "CookieLog" "CustomLog" "LogFormat" "TransferLog"
287                ;; mod_log_agent
288                "AgentLog"
289                ;; mod_log_referer
290                "RefererIgnore" "RefererLog"
291                ;; mod_usertrack
292                "CookieDomain" "CookieExpires" "CookieName" "CookieStyle" "CookieTracking"
293                ;; Miscellaneous
294                ;; mod_imap
295                "ImapMenu" "ImapDefault" "ImapBase"
296                ;; mod_proxy
297                "ProxyRequests" "ProxyRemote" "ProxyPass" "ProxyPassReverse" "ProxyBlock"
298                "AllowCONNECT" "ProxyReceiveBufferSize" "ProxyIOBufferSize" "NoProxy"
299                "ProxyDomain" "ProxyVia" "CacheRoot" "CacheSize" "CacheMaxExpire"
300                "CacheDefaultExpire" "CacheLastModifiedFactor" "CacheGcInterval"
301                "CacheDirLevels" "CacheDirLength" "CacheForceCompletion" "NoCache"
302                ;; apache2 mod_proxy
303                "ProxyErrorOverride" "ProxyMaxForwards" "ProxyPreserveHost"
304                "ProxyRemote" "ProxyTimeout"
305                ;; mod_so
306                "LoadFile" "LoadModule" 
307                ;; mod_mmap_static
308                "MMapFile"
309                ;; Development
310                ;; mod_example
311                "Example"
312                ;; Obsolete directives
313                ;; mod_browser
314                "BrowserMatch" "BrowserMatchNoCase"
315                ;; mod_cookies
316                "CookieLog"
317                ;; mod_dld
318                "LoadFile" "LoadModule"
319                ;; mod_log_common
320                "TransferLog"
321                ;; other stuff that i dont know which mod they belong in
322                "DefaultMode" "HTTPLogFile" "HTMLDir" "PrivateDir"
323                "TopSites" "TopURLs" "LastURLs" "HeadPrefix" "HeadSuffix"
324                "DocTitle" "DocTrailer" "HideURL" "HideSys"
325                ;;; apache2 extra builtin modules
326                ;; mod_charset_lite
327                "CharsetDefault" "CharsetOptions" "CharsetSourceEnc"
328                ;; mod_auth_ldap
329                "AuthLDAPAuthoritative" "AuthLDAPBindDN" "AuthLDAPBindPassword"
330                "AuthLDAPCompareDNOnServer" "AuthLDAPDereferenceAliases"
331                "AuthLDAPEnabled" "AuthLDAPFrontPageHack" "AuthLDAPGroupAttribute"
332                "AuthLDAPGroupAttributeIsDN" "AuthLDAPRemoteUserIsDN"
333                "AuthLDAPStartTLS" "AuthLDAPUrl"
334                ;; mod_cgid
335                "ScriptLog" "ScriptLogBuffer" "ScriptLogLength" "ScriptSock"
336                ;; mod_ext_filter
337                "ExtFilterDefine" "ExtFilterOptions"
338                ;; mod_suexec
339                "SuexecUserGroup"
340                ;; mod_file_cache
341                "CacheFile" "MMapFile"
342                ;; mod_cache
343                "CacheDefaultExpire" "CacheDisable" "CacheEnable"
344                "CacheIgnoreCacheControl" "CacheIgnoreNoLastMod"
345                "CacheLastModifiedFactor" "CacheMaxExpire" "CacheOn"
346                ;; mod_dav
347                "Dav" "DavDepthInfinity" "DavLockDB" "DavMinTimeout"
348                ;; mod_deflate
349                "DeflateFilterNote" "DeflateMemLevel" "DeflateWindowSize"
350                ;; mod_ssl
351                "SSLCACertificateFile" "SSLCACertificatePath" "SSLCARevocationFile"
352                "SSLCARevocationPath" "SSLCertificateChainFile"
353                "SSLCertificateFile" "SSLCertificateKeyFile" "SSLCipherSuite"
354                "SSLEngine" "SSLLog" "SSLLogLevel" "SSLMutex" "SSLOptions"
355                "SSLPassPhraseDialog" "SSLProtocol" "SSLRandomSeed"
356                "SSLRequire" "SSLRequireSSL" "SSLSessionCache" 
357                "SSLSessionCacheTimeout" "SSLVerifyClient" "SSLVerifyDepth"
358                ;; mod_ldap
359                "LDAPCacheEntries" "LDAPCacheTTL" "LDAPCertDBPath"
360                "LDAPOpCacheEntries" "LDAPOpCacheTTL" "LDAPSharedCacheSize"
361
362                ;;; non builtin apache modules 
363                ;; mod_ssl
364                "SSLPassPhraseDialog" "SSLMutex" "SSLRandomSeed"
365                "SSLSessionCache" "SSLSessionCacheTimeout" "SSLEngine"
366                "SSLProtocol" "SSLCipherSuite" "SSLCertificateFile"
367                "SSLCertificateKeyFile" "SSLCertificateChainFile"
368                "SSLCACertificatePath" "SSLCACertificateFile"
369                "SSLCARevocationPath" "SSLCARevocationFile"
370                "SSLVerifyClient" "SSLVerifyDepth" "SSLLog"
371                "SSLLogLevel" "SSLOptions" "SSLRequireSSL"
372                "SSLRequire"
373
374                ;; Apache-SSL
375                "SSLBanCipher" "SSLCACertificateFile"
376                "SSLCACertificatePath" "SSLCacheServerPath"
377                "SSLCacheServerPort" "SSLCacheServerRunDir"
378                "SSLCertificateFile" "SSLCertificateKeyFile"
379                "SSLCheckClientDN" "SSLDenySSL" "SSLDisable"
380                "SSLEnable" "SSLEngineID" "SSLExportClientCertificates"
381                "SSLFakeBasicAuth" "SSLKeyNoteTrustedAssertion"
382                "SSLKeyNoteTrustedIssuerTemplate" "SSLNoCAList"
383                "SSLRandomFile" "SSLRandomFilePerConnection"
384                "SSLRequireCipher" "SSLRequireSSL" "SSLRequiredCiphers"
385                "SSLSessionCacheTimeout" "SSLVerifyClient"
386                "SSLVerifyDepth"
387
388                ;; mod_perl 1 and 2
389                "PerlAccessHandler" "PerlAddVar" "PerlAuthenHandler"
390                "PerlAuthzHandler" "PerlChildExitHandler"
391                "PerlChildInitHandler" "PerlCleanupHandler"
392                "PerlFixupHandler" "PerlHeaderParserHandler"
393                "PerlInitHandler" "PerlLogHandler" "PerlModule"
394                "PerlPassEnv" "PerlPostReadRequestHandler"
395                "PerlRequire" "PerlSetEnv" "PerlSetVar"
396                "PerlTypeHandler"
397
398                ;; mod_perl 1
399                "PerlDispatchHandler" "PerlFreshRestart"
400                "PerlHandler" "PerlOpmask" "PerlRestartHandler"
401                "PerlScript" "PerlSendHeader" "PerlSetupEnv"
402                "PerlTaintCheck" "PerlTransHandler" "PerlWarn"
403
404                ;; mod_perl 2
405                "PerlLoadModule" "PerlOptions" "PerlSwitches"
406                "PerlOpenLogsHandler" "PerlPostConfigHandler"
407                "PerlPreConnectionHandler" "PerlProcessConnectionHandler"
408                "PerlInputFilterHandler" "PerlOutputFilterHandler"
409                "PerlSetInputFilter" "PerlSetOutputFilter"
410                "PerlResponseHandler" "PerlInterpStart"
411                "PerlInterpMax" "PerlInterpMinSpare"
412                "PerlInterpMaxSpare" "PerlInterpMaxRequests"
413                "PerlInterpScope" "PerlTrace"
414
415                ;; mod_python
416                "PythonAccessHandler" "PythonAuthenHandler"
417                "PythonAuthzHandler" "PythonAutoReload"
418                "PythonCleanupHandler" "PythonConnectionHandler"
419                "PythonDebug" "PythonEnablePdb" "PythonFixupHandler"
420                "PythonHandler" "PythonHandlerModule"
421                "PythonHeaderParserHandler" "PythonImport"
422                "PythonInitHandler" "PythonInputFilter"
423                "PythonInterpPerDirective" "PythonInterpPerDirectory"
424                "PythonInterpreter" "PythonLogHandler" "PythonOptimize"
425                "PythonOption" "PythonOutputFilter" "PythonPath"
426                "PythonPostReadRequestHandler" "PythonTransHandler"
427                "PythonTypeHandler"
428
429                ) :test 'string=))
430            "\\)\\s-")
431           1 'font-lock-keyword-face)
432
433     (list (concat                                       ; values
434            "\\(?:^\\|\\W\\)\\("
435            (regexp-opt
436             (delete-duplicates
437              '("allow" "deny" "on" "valid-user" "inetd" "standalone"
438                "off" "user" "group" "any" "env" "mutual-failure" "full"
439                "email" "force-response-1.0" "downgrade-1.0" "nokeepalive"
440                "permanent" "temporary" "seeother" "gone" "All" "Options"
441                "FileInfo" "AuthConfig" "Limit" "from" "None" "Basic"
442                "Digest" "FancyIndexing" "IconsAreLinks" "ScanHTMLTitles"
443                "SuppressLastModified" "SuppressSize" "SuppressDescription"
444                "Minimal" "OS" "Full" "set" "append" "add" "unset" "none"
445                "formatted" "semi-formatted" "unformatted" "error" "nocontent"
446                "map" "referer" "URL" "inherit" "double" "GET" "PUT" "POST"
447                "DELETE" "CONNECT" "OPTIONS" "Options" "Indexes" "Includes"
448                "ExecCGI" "FollowSymLinks" "MultiViews" "IncludesNOEXEC"
449                "SymLinksIfOwnerMatch"
450                "uslock" "pthread" "sysvsem" "fcntl" "flock" "os2sem"
451                "tpfcore" "default" "INode" "MTime"
452
453                ;; mod_ssl
454                "builtin" "exec" "none" "file" "sem" "egd" "dbm" "on" "off"
455                "shm" "shmht" "shmcb"
456                "SSLv2" "SSLv3" "TLSv1" "All" "startup" "connect"
457                "optional" "require" "optional_no_ca" "ssl-unclean-shutdown"
458                "error" "warn" "info" "trace" "debug"
459                "StdEnvVars" "CompatEnvVars" "ExportCertData" "FakeBasicAuth"
460                "StrictRequire" "OptRenegotiate"
461                "ssl-accurate-shutdown" "ssl-unclean-shutdown"
462                ;; cipher stuff
463                "kRSA" "kDHr" "kDHd" "kEDH" "aNULL" "aRSA" "aDSS" "aDH" "eNULL"
464                "DES" "3DES" "RC4" "RC2" "IDEA" "MD5" "SHA1" "SHA" "EXP"
465                "EXPORT40" "EXPORT56" "LOW" "MEDIUM" "HIGH" "RSA" "DH" "EDH"
466                "ADH" "DSS" "NULL"
467                "DES-CBC3-SHA" "DES-CBC3-MD5" "IDEA-CBC-SHA" "RC4-SHA" "RC4-MD5"
468                "IDEA-CBC-MD5" "RC2-CBC-MD5" "RC4-MD5" "DES-CBC-SHA"
469                "RC4-64-MD5" "DES-CBC-MD5" "EXP-DES-CBC-SHA" "EXP-RC2-CBC-MD5"
470                "EXP-RC4-MD5" "EXP-RC2-CBC-MD5" "EXP-RC4-MD5" "NULL-SHA"
471                "NULL-MD5" "ADH-DES-CBC3-SHA" "ADH-DES-CBC-SHA" "ADH-RC4-MD5"
472                "EDH-RSA-DES-CBC3-SHA" "EDH-DSS-DES-CBC3-SHA"
473                "EDH-RSA-DES-CBC-SHA" "EDH-DSS-DES-CBC-SHA"
474                "EXP-EDH-RSA-DES-CBC-SHA" "EXP-EDH-DSS-DES-CBC-SHA"
475                "EXP-ADH-DES-CBC-SHA" "EXP-ADH-RC4-MD5"
476
477                ;; Apache-SSL
478                "file" "egd" "0" "1" "2" "3"
479                ;; cipher stuff
480                "IDEA-CBC-SHA" "NULL-MD5" "NULL-SHA" "EXP-RC4-MD5" "RC4-MD5"
481                "RC4-SHA" "EXP-RC2-CBC-MD5" "IDEA-CBC-MD5" "EXP-DES-CBC-SHA"
482                "DES-CBC-SHA" "DES-CBC3-SHA" "EXP-DH-DSS-DES-CBC-SHA"
483                "DH-DSS-DES-CBC-SHA" "DH-DSS-DES-CBC3-SHA"
484                "EXP-DH-RSA-DES-CBC-SHA" "DH-RSA-DES-CBC-SHA"
485                "DH-RSA-DES-CBC3-SHA" "EXP-EDH-DSS-DES-CBC-SHA"
486                "EDH-DSS-DES-CBC-SHA" "EDH-DSS-DES-CBC3-SHA"
487                "EXP-EDH-RSA-DES-CBC" "EDH-RSA-DES-CBC-SHA"
488                "EDH-RSA-DES-CBC3-SHA" "EXP-ADH-RC4-MD5" "ADH-RC4-MD"
489                "EXP-ADH-DES-CBC-SHA" "ADH-DES-CBC-SHA" "ADH-DES-CBC3-SHA"
490                "FZA-NULL-SHA" "FZA-FZA-CBC-SHA" "FZA-RC4-SHA" "DES-CFB-M1"
491                "RC2-CBC-MD5" "DES-CBC-MD5" "DES-CBC3-MD5" "RC4-64-MD5" "NULL"
492
493                ;; mod_asis
494                "send-as-is"
495                ;; mod_cgi
496                "cgi-script"
497                ;; mod_imap
498                "imap-file"
499                ;; mod_info
500                "server-info"
501                ;; mod_isapi
502                "isapi-isa"
503                ;; mod_ldap
504                "ldap-status"
505                ;; mod_status
506                "server-status"
507
508                ;; mod_perl
509                "On" "Off" "perl-script"
510
511                ;; mod_python
512                "On" "Off" "python-program"
513
514                ) :test 'string=))
515            "\\)\\W")
516           1 'font-lock-type-face)))
517   "Expressions to highlight in `apache-mode' buffers.")
518
519 (put 'apache-mode 'font-lock-defaults
520      '(apache-font-lock-keywords nil t
521                                  ((?_ . "w")
522                                   (?- . "w"))))
523 ;; Syntax table
524 (if apache-mode-syntax-table
525     nil
526   (setq apache-mode-syntax-table (copy-syntax-table nil))
527   (modify-syntax-entry ?_   "_"     apache-mode-syntax-table)
528   (modify-syntax-entry ?-   "_"     apache-mode-syntax-table)
529   (modify-syntax-entry ?\(  "(\)"   apache-mode-syntax-table)
530   (modify-syntax-entry ?\)  ")\("   apache-mode-syntax-table)
531   (modify-syntax-entry ?\<  "(\>"   apache-mode-syntax-table)
532   (modify-syntax-entry ?\>  ")\<"   apache-mode-syntax-table)
533   (modify-syntax-entry ?\"   "\""   apache-mode-syntax-table))
534
535
536 ;;;###autoload
537 (defun apache-mode ()
538   "Major mode for editing Apache configuration files.
539
540 \\{apache-mode-map}
541
542 \\[apache-mode] runs the hook `apache-mode-hook'."
543   (interactive)
544   (kill-all-local-variables)
545   (use-local-map apache-mode-map)
546   (set-syntax-table apache-mode-syntax-table)
547   (make-local-variable 'comment-start)
548   (setq comment-start "# ")
549   (make-local-variable 'comment-start-skip)
550   (setq comment-start-skip "#\\W*")
551   (make-local-variable 'comment-column)
552   (setq comment-column 48)
553   (setq mode-name "Apache")
554   (setq major-mode 'apache-mode)
555   (run-hooks 'apache-mode-hook))
556
557
558 ;; Provides
559 (provide 'apache-mode)
560
561 ;;; apache-mode.el ends here