summaryrefslogtreecommitdiff
path: root/lisp/generic-x.el
diff options
context:
space:
mode:
authorReiner Steib <Reiner.Steib@gmx.de>2007-12-08 14:32:28 +0000
committerReiner Steib <Reiner.Steib@gmx.de>2007-12-08 14:32:28 +0000
commit5f33ef98e1ba8307bc12dbb739236df34056bf93 (patch)
treee55bca41e41ceb3959060e0961b518ddfbb8b80e /lisp/generic-x.el
parentcf944fa4ed344c5ad732b7e1218e399c8a173490 (diff)
downloademacs-5f33ef98e1ba8307bc12dbb739236df34056bf93.tar.gz
(etc-sudoers-generic-mode): New mode.
(generic-unix-modes): Add it.
Diffstat (limited to 'lisp/generic-x.el')
-rw-r--r--lisp/generic-x.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/generic-x.el b/lisp/generic-x.el
index f400b299b9e..f9f3b923f26 100644
--- a/lisp/generic-x.el
+++ b/lisp/generic-x.el
@@ -221,6 +221,7 @@ This hook will be installed if the variable
etc-modules-conf-generic-mode
etc-passwd-generic-mode
etc-services-generic-mode
+ etc-sudoers-generic-mode
fvwm-generic-mode
inetd-conf-generic-mode
mailagent-rules-generic-mode
@@ -1736,6 +1737,21 @@ like an INI file. You can add this hook to `find-file-hook'."
(setq imenu-generic-expression
'((nil "^\\([^# \t]+\\)\\s-+" 1))))))))
+;; /etc/sudoers
+(when (memq 'etc-sudoers-generic-mode generic-extras-enable-list)
+
+(define-generic-mode etc-sudoers-generic-mode
+ '(?#)
+ '("User_Alias" "Runas_Alias" "Host_Alias" "Cmnd_Alias"
+ "NOPASSWD" "PASSWD" "NOEXEC" "EXEC"
+ "ALL")
+ '(("\\<\\(root\\|su\\)\\>" 1 font-lock-warning-face)
+ ("\\(\\*\\)" 1 font-lock-warning-face)
+ ("\\<\\(%[A-Za-z0-9_]+\\)\\>" 1 font-lock-variable-name-face))
+ '("/etc/sudoers\\'")
+ nil
+ "Generic mode for sudoers configuration files."))
+
;; From Jacques Duthen <jacques.duthen@sncf.fr>
(when (memq 'show-tabs-generic-mode generic-extras-enable-list)