;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:41:45 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/generic.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`generic.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@50 Global defaults for font-lock in a generic mode.
(defvar generic-font-lock-defaults nil (#$ . 616))
(make-variable-buffer-local 'generic-font-lock-defaults)
#@131 A list of mode names for `generic-mode'.
Do not add entries to this list directly; use `define-generic-mode'
instead (which see).
(defvar generic-mode-list nil (#$ . 780))
(custom-declare-group 'generic nil "Define simple major modes with comment and font-lock support." :prefix "generic-" :group 'extensions)
#@173 *If non-nil, add a hook to enter default-generic-mode automatically.
This is done if the first few lines of a file in fundamental mode start
with a hash comment character.
(custom-declare-variable 'generic-use-find-file-hook 't '(#$ . -1097) :group 'generic :type 'boolean)
#@189 *Number of lines that `generic-mode-find-file-hook' looks at.
Relevant when deciding whether to enter `generic-mode' automatically.
This variable should be set to a small positive number.
(custom-declare-variable 'generic-lines-to-scan '3 '(#$ . -1378) :group 'generic :type 'integer)
#@313 *Regular expression used by `generic-mode-find-file-hook'.
Files in fundamental mode whose first few lines contain a match for
this regexp, should be put into `default-generic-mode' instead.
The number of lines tested for the matches is specified by the value
of the variable `generic-lines-to-scan', which see.
(custom-declare-variable 'generic-find-file-regexp '"^#" '(#$ . -1670) :group 'generic :type 'regexp)
#@316 *Regular expression used by `generic-mode-find-file-hook'.
Files whose names match this regular expression should not be put
into `default-generic-mode', even if they have lines which match the
regexp in `generic-find-file-regexp'.  If the value is nil,
`generic-mode-find-file-hook' does not check the file names.
(custom-declare-variable 'generic-ignore-files-regexp '"[Tt][Aa][Gg][Ss]\\'" '(#$ . -2091) :group 'generic :type '(choice (const :tag "Don't check file names" nil) regexp))
#@1372 Create a new generic mode with NAME.

Args: (NAME COMMENT-LIST KEYWORD-LIST FONT-LOCK-LIST AUTO-MODE-LIST
            FUNCTION-LIST &optional DESCRIPTION)

NAME should be a symbol; its string representation is used as the function
name. If DESCRIPTION is provided, it is used as the docstring for the new
function.

COMMENT-LIST is a list, whose entries are either a single character,
a one or two character string or a cons pair. If the entry is a character
or a one-character string, it is added to the mode's syntax table with
`comment-start' syntax.  If the entry is a cons pair, the elements of the
pair are considered to be `comment-start' and `comment-end' respectively.
Note that Emacs has limitations regarding comment characters.

KEYWORD-LIST is a list of keywords to highlight with `font-lock-keyword-face'.
Each keyword should be a string.

FONT-LOCK-LIST is a list of additional expressions to highlight. Each entry
in the list should have the same form as an entry in `font-lock-defaults-alist'

AUTO-MODE-LIST is a list of regular expressions to add to `auto-mode-alist'.
These regexps are added to `auto-mode-alist' as soon as `define-generic-mode'
is called; any old regexps with the same name are removed.

FUNCTION-LIST is a list of functions to call to do some additional setup.

See the file generic-x.el for some examples of `define-generic-mode'.
(defalias 'define-generic-mode #[(name comment-list keyword-list font-lock-list auto-mode-list function-list &optional description) "	\236\204 \306!C	B\n\307\211\203& \f@\310\311B\"\210\fA\211\204 *\312\313\307\2064 \314\306!P\315\316\317D\317D\317D\317D\317D\257\257\"\207" [name generic-mode-list auto-mode-list re #1=#:--dolist-temp--97269 description symbol-name nil add-to-list auto-mode-alist defalias lambda "Generic mode for type " (interactive) generic-mode-internal quote comment-list keyword-list font-lock-list function-list] 13 (#$ . 2587)])
#@32 Go into the generic-mode MODE.
(defalias 'generic-mode-internal #[(mode comments keywords font-lock-list funs) "\306\307!\310P!\307!\311\312\n\"\203 \n\313\211\224O\202 \n\314 \210\315!\316!\210\317\320\"\210\321\322!\210\323\317D\324\325\"\210\326	!+\207" [mode generic-mode-hooks modename name major-mode mode-name intern symbol-name "-hook" string-match "-mode\\'" 0 kill-all-local-variables capitalize generic-mode-set-comments nil generic-mode-set-font-lock make-local-variable font-lock-defaults generic-font-lock-defaults mapcar funcall run-hooks comments keywords font-lock-list funs] 3 (#$ . 4544)])
#@289 Basic comment and font-lock functionality for `generic' files.
(Files which are too small to warrant their own mode, but have
comment characters, keywords, and the like.)

To define a generic-mode, use the function `define-generic-mode'.
Some generic modes are defined in `generic-x.el'.
(defalias 'generic-mode #[(type) "\301! \207" [type intern] 2 (#$ . 5183) (list (completing-read "Generic Type: " generic-mode-list nil t))])
#@48 Set up comment functionality for generic mode.
(defalias 'generic-mode-set-comments #[(comment-list) "\306 \307\211\310\311!\210\310\312!\210\310\313!\210\307\211\203&@\314\315\"#\f:\2035 \fA\2060 ##\f@\316\f!\203? \317\f!\316#!\203L \317#!#	\203a \320\"\n\321\322\f!\323R\n\202z \f	#\324\230\203o \315\202q #\322\f!\323P\n\325\f\"A\206\215 \325#\"A\206\215 \"\"\f\"BB#\"BB\fG\326U\203\263 \327\330\f!\331\"P\n#\210\202\334 \f\332\234\f\326\234$\211%\325%	\"A\333PB	B$\325$	\"A\334\"PPB	B*#G\326U\203\363 \327\330#!\335\"P\n#\210\202#\332\234#\326\234$\211%\325%	\"A\336\"PPB	B$\325$	\"A\337PB	B**A\211\204 *	\237\307&\211'\203R'@&\327&@\317&@z!\340&AQ\n#\210'A\211'\2042*\341\n!+\207" [comstyles chars st comment-list start #1=#:--dolist-temp--97270 make-syntax-table nil make-local-variable comment-start comment-start-skip comment-end 10 "" char-valid-p char-to-string "b" "\\|" regexp-quote "+\\s-*" "\n" assoc 1 modify-syntax-entry string-to-char "< " 0 "1" "2" ">" "3" "4" " " set-syntax-table comstyle end c1 c0 cs #2=#:--dolist-temp--97271] 6 (#$ . 5620)])
#@50 Set up font-lock functionality for generic mode.
(defalias 'generic-mode-set-font-lock #[(keywords font-lock-expressions) "\304\205\n \305	\"C\n\"\211\207" [keywords font-lock-keyword-face font-lock-expressions generic-font-lock-defaults append generic-make-keywords-list] 4 (#$ . 6769)])
(defalias 'generic-bracket-support #[nil "\302\303\211\207" [imenu-generic-expression imenu-case-fold-search ((nil "^\\[\\(.*\\)\\]" 1)) t] 2])
(byte-code "\300\301\302C\303\211\211\211&\207" [define-generic-mode default-generic-mode 35 nil] 7)
#@461 Hook function to enter `default-generic-mode' automatically.
Done if the first few lines of a file in `fundamental-mode' start with
a match for the regexp in `generic-find-file-regexp', unless the
file's name matches the regexp which is the value of the variable
`generic-ignore-files-regexp'.
This hook will be installed if the variable
`generic-use-find-file-hook' is non-nil.  The variable
`generic-lines-to-scan' determines the number of lines to look at.
(defalias 'generic-mode-find-file-hook #[nil "\305=\205+ 	\203 \306	\307\n!\"?\205+ \212eb\210\310\212\fy\210`)\311#\205* eb\210\312 )\207" [major-mode generic-ignore-files-regexp buffer-file-name generic-find-file-regexp generic-lines-to-scan fundamental-mode string-match file-name-sans-versions re-search-forward t default-generic-mode] 4 (#$ . 7316)])
#@197 Hook function to enter default-generic-mode automatically for INI files.
Done if the first few lines of a file in `fundamental-mode' look like an
INI file.  This hook is NOT installed by default.
(defalias 'generic-mode-ini-file-find-file-hook #[nil "\301=\205 \212eb\210\302\303!\205 \304 )\207" [major-mode fundamental-mode looking-at "^\\s-*\\[.*\\]" ini-generic-mode] 2 (#$ . 8142)])
(byte-code "\203	 \301\302\303\"\210\301\207" [generic-use-find-file-hook add-hook find-file-hooks generic-mode-find-file-hook] 3)
#@104 Return a regular expression matching the specified KEYWORDS-LIST.
The regexp is highlighted with FACE.
(defalias 'generic-make-keywords-list #[(keywords-list face &optional prefix suffix) "<\204	 \304\305!\210	\306\307\310\"\311\n\260\312E\207" [keywords-list prefix suffix face error "Keywords argument must be a list of strings" "\\<" regexp-opt t "\\>" 1] 5 (#$ . 8672)])
(provide 'generic)
