Function: etc-passwd-generic-mode
etc-passwd-generic-mode is an interactive and byte-compiled function
defined in generic-x.el.gz.
Signature
(etc-passwd-generic-mode)
Documentation
Etc-Passwd-Generic mode.
This a generic mode defined with define-generic-mode.
It runs etc-passwd-generic-mode-hook as the last thing it does.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/generic-x.el.gz
(define-generic-mode etc-passwd-generic-mode
nil ;; No comment characters
'("root") ;; Only one keyword
(eval-when-compile
(list
(list
(concat
"^"
;; User name -- Never blank!
"\\([^:]+\\)"
":"
;; Password, UID and GID
(mapconcat
#'identity
(make-list 3 "\\([^:]+\\)")
":")
":"
;; GECOS/Name -- might be blank
"\\([^:]*\\)"
":"
;; Home directory and shell
"\\([^:]+\\)"
":?"
"\\([^:]*\\)"
"$")
'(1 font-lock-type-face)
'(5 font-lock-variable-name-face)
'(6 font-lock-constant-face)
'(7 font-lock-warning-face))
'("^\\([^:]+\\):\\([^:]*\\):\\([0-9]+\\):\\(.*\\)$"
(1 font-lock-type-face)
(4 font-lock-variable-name-face))))
;; /etc/passwd- is a backup file for /etc/passwd, so is group- and shadow-
'("/etc/passwd-?\\'" "/etc/group-?\\'" "/etc/shadow-?\\'")
(list
(lambda ()
(setq imenu-generic-expression
'((nil "^\\([-A-Za-z0-9_]+\\):" 1))))))