Use symbol-matching for generic-mode keywords
2004-09-15 Miles Bader <miles@gnu.org>
* lisp/generic.el (generic-make-keywords-list): Use symbol rather than
word anchors in regexp.
(generic-ignore-files-regexp): New defcustom.
(generic-mode-find-file-hook): If the file's name matches the
regexp in `generic-ignore-files-regexp', don't enter
default-generic-mode. Doc fix.
`generic-mode' and then remove.
(generic-mode): Inline generic-read-type.
(define-generic-mode): Push the symbol name rather than the symbol
onto generic-mode-list.
Incorporates extensive cleanup and docfixes by
Stefan Monnier (monnier+gnu/emacs@flint.cs.yale.edu).
Uses cl compile-time macros.
(generic-mode-name, generic-comment-list,
generic-keywords-list, generic-font-lock-expressions,
generic-mode-function-list, generic-mode-syntax-table):
Removed variables.
(generic-mode-alist): Renamed to generic-mode-list.
(generic-find-file-regexp): Default changed to "^#".
(generic-read-type): Uses completing read on generic-mode-list.
(generic-mode-sanity-check): removed this function.
(generic-add-to-auto-mode): Removed this function
(generic-mode-internal): Binds mode-specific definitions
into function instead of putting them in alist.
(generic-mode-set-comments): Reworked extensively.
(generic-mode-find-file-hook): Simplified regexp searching
(generic-make-keywords-list): Omit extra pair of parens
(generic-use-find-file-hook): Changed from defvar to defcustom.
(generic-lines-to-scan): Changed from defvar to defcustom.
(generic-find-file-regexp): Changed from defvar to defcustom.