(Fset_window_parameter): Doc fix.
[bpt/emacs.git] / lisp / generic-x.el
index 3136889..cc8a34a 100644 (file)
@@ -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 <pbreton@cs.umb.edu>
 ;; 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
 ;; 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 <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 ;;
-;; This file contains a collection generic modes.
+;; This file contains a collection of generic modes.
 ;;
 ;; INSTALLATION:
 ;;
@@ -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
@@ -244,7 +243,7 @@ This hook will be installed if the variable
   (memq system-type '(windows-nt ms-dos))
   "*Non-nil means the modes in `generic-mswindows-modes' will be defined.
 This is a list of MS-Windows specific generic modes.  This variable
-only effects the default value of `generic-extras-enable-list'."
+only affects the default value of `generic-extras-enable-list'."
   :group 'generic-x
   :type 'boolean
   :version "22.1")
@@ -254,7 +253,7 @@ only effects the default value of `generic-extras-enable-list'."
   (not (memq system-type '(windows-nt ms-dos)))
   "*Non-nil means the modes in `generic-unix-modes' will be defined.
 This is a list of Unix specific generic modes.  This variable only
-effects the default value of `generic-extras-enable-list'."
+affects the default value of `generic-extras-enable-list'."
   :group 'generic-x
   :type 'boolean
   :version "22.1")
@@ -317,7 +316,7 @@ your changes into effect."
      (2 font-lock-variable-name-face)))
   '("access_log\\'")
   nil
-  "Mode for Apache log files"))
+  "Mode for Apache log files."))
 
 ;;; Samba
 (when (memq 'samba-generic-mode generic-extras-enable-list)
@@ -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)
 
@@ -522,7 +527,7 @@ like an INI file.  You can add this hook to `find-file-hook'."
   "Syntax table in use in `bat-generic-mode' buffers.")
 
 (defvar bat-generic-mode-keymap (make-sparse-keymap)
-  "Keymap for bet-generic-mode.")
+  "Keymap for `bat-generic-mode'.")
 
 (defun bat-generic-mode-compile ()
   "Run the current BAT file in a compilation buffer."
@@ -784,7 +789,7 @@ like an INI file.  You can add this hook to `find-file-hook'."
      (2 font-lock-constant-face)))
   '("[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF]\\'")
   nil
-  "Mode for Java Manifest files"))
+  "Mode for Java Manifest files."))
 
 ;; Java properties files
 (when (memq 'java-properties-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 <jacques.duthen@sncf.fr>
 (when (memq 'show-tabs-generic-mode generic-extras-enable-list)
 
@@ -1776,7 +1796,7 @@ like an INI file.  You can add this hook to `find-file-hook'."
   nil ;; no auto-mode-alist
   ;; '(show-tabs-generic-mode-hook-fun)
   nil
-  "Generic mode to show tabs and trailing spaces"))
+  "Generic mode to show tabs and trailing spaces."))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; DNS modes
@@ -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