diff options
Diffstat (limited to 'lisp/generic-x.el')
-rw-r--r-- | lisp/generic-x.el | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lisp/generic-x.el b/lisp/generic-x.el index acdddc77f90..3310c38adeb 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 @@ -383,6 +384,10 @@ your changes into effect." "Generic mode for HOSTS files.")) ;;; Windows INF files + +;; If i-g-m-f-f-h is defined, then so is i-g-m. +(declare-function ini-generic-mode "generic-x") + (when (memq 'inf-generic-mode generic-extras-enable-list) (define-generic-mode inf-generic-mode @@ -443,6 +448,8 @@ like an INI file. You can add this hook to `find-file-hook'." '((nil "^\\s-*\\(.*\\)\\s-*=" 1)))))) "Generic mode for MS-Windows Registry files.")) +(declare-function w32-shell-name "w32-fns" ()) + ;;; DOS/Windows BAT files (when (memq 'bat-generic-mode generic-extras-enable-list) @@ -1730,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) |