X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/76ee7bd5140d78c00bb1998e07c3e238d1d14027..9d14503e34bd7b3e2ab8aa8e8acc999778aab3d1:/lisp/generic-x.el diff --git a/lisp/generic-x.el b/lisp/generic-x.el index b60c59c0f7..cc8a34ac75 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el @@ -1,7 +1,7 @@ ;;; generic-x.el --- A collection of generic modes ;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ;; Author: Peter Breton ;; Created: Tue Oct 08 1996 @@ -9,10 +9,10 @@ ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,9 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; @@ -221,6 +219,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 +382,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 +446,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 +1735,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 (when (memq 'show-tabs-generic-mode generic-extras-enable-list) @@ -1976,5 +1996,5 @@ like an INI file. You can add this hook to `find-file-hook'." (provide 'generic-x) -;;; arch-tag: cde692a5-9ff6-4506-9999-c67999c2bdb5 +;; arch-tag: cde692a5-9ff6-4506-9999-c67999c2bdb5 ;;; generic-x.el ends here