diff options
| author | Peter Breton | 2000-10-04 04:45:55 +0000 |
|---|---|---|
| committer | Peter Breton | 2000-10-04 04:45:55 +0000 |
| commit | 7aeb9d6fd75b82dcebe62edca4b8f71e10449eb4 (patch) | |
| tree | 154034b74b9b74388d673e538d2aebdd6bb88663 | |
| parent | 82d11a0b0e66b7e36df397c7c28ea9b1f7c755b6 (diff) | |
| download | emacs-7aeb9d6fd75b82dcebe62edca4b8f71e10449eb4.tar.gz emacs-7aeb9d6fd75b82dcebe62edca4b8f71e10449eb4.zip | |
* generic-x.el (apache-conf-generic-mode):
Regexp now allows leading whitespace.
(rc-generic-mode): Added eval-when-compile
around generic-make-keywords-list.
Deleted duplicate regexp
(rul-generic-mode): Added eval-when-compile
around generic-make-keywords-list.
(etc-fstab-generic-mode): New generic mode.
| -rw-r--r-- | lisp/generic-x.el | 108 |
1 files changed, 72 insertions, 36 deletions
diff --git a/lisp/generic-x.el b/lisp/generic-x.el index ebf874b387c..807d4a17144 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el | |||
| @@ -163,7 +163,7 @@ you must reload generic-x to enable the specified modes." | |||
| 163 | (define-generic-mode 'apache-conf-generic-mode | 163 | (define-generic-mode 'apache-conf-generic-mode |
| 164 | (list ?#) | 164 | (list ?#) |
| 165 | nil | 165 | nil |
| 166 | '(("^\\(<.*>\\)" 1 'font-lock-constant-face) | 166 | '(("^\\s-*\\(<.*>\\)" 1 'font-lock-constant-face) |
| 167 | ("^\\(\\sw+\\)\\s-" 1 'font-lock-variable-name-face)) | 167 | ("^\\(\\sw+\\)\\s-" 1 'font-lock-variable-name-face)) |
| 168 | (list "srm\\.conf\\'" "httpd\\.conf\\'" "access\\.conf\\'") | 168 | (list "srm\\.conf\\'" "httpd\\.conf\\'" "access\\.conf\\'") |
| 169 | (list | 169 | (list |
| @@ -813,30 +813,32 @@ you must reload generic-x to enable the specified modes." | |||
| 813 | ;; as is the choice of which value tokens are included, as | 813 | ;; as is the choice of which value tokens are included, as |
| 814 | ;; the choice of face for each token group | 814 | ;; the choice of face for each token group |
| 815 | (list | 815 | (list |
| 816 | (generic-make-keywords-list | 816 | (eval-when-compile |
| 817 | (list | 817 | (generic-make-keywords-list |
| 818 | "FILEFLAGSMASK" | 818 | (list |
| 819 | "FILEFLAGS" | 819 | "FILEFLAGSMASK" |
| 820 | "FILEOS" | 820 | "FILEFLAGS" |
| 821 | "FILESUBTYPE" | 821 | "FILEOS" |
| 822 | "FILETYPE" | 822 | "FILESUBTYPE" |
| 823 | "FILEVERSION" | 823 | "FILETYPE" |
| 824 | "PRODUCTVERSION" | 824 | "FILEVERSION" |
| 825 | ) 'font-lock-type-face) | 825 | "PRODUCTVERSION" |
| 826 | (generic-make-keywords-list | 826 | ) 'font-lock-type-face)) |
| 827 | (list | 827 | (eval-when-compile |
| 828 | "BEGIN" | 828 | (generic-make-keywords-list |
| 829 | "BLOCK" | 829 | (list |
| 830 | "END" | 830 | "BEGIN" |
| 831 | "VALUE" | 831 | "BLOCK" |
| 832 | ) 'font-lock-function-name-face) | 832 | "END" |
| 833 | '("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face) | 833 | "VALUE" |
| 834 | '("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face) | 834 | ) 'font-lock-function-name-face)) |
| 835 | '("^#[ \t]*\\(elif\\|if\\)\\>" | 835 | '("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face) |
| 836 | ("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil | 836 | '("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face) |
| 837 | '("^#[ \t]*\\(elif\\|if\\)\\>" | ||
| 838 | ("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil | ||
| 839 | (1 font-lock-constant-face) (2 font-lock-variable-name-face nil t))) | ||
| 840 | '("^#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?" | ||
| 837 | (1 font-lock-constant-face) (2 font-lock-variable-name-face nil t))) | 841 | (1 font-lock-constant-face) (2 font-lock-variable-name-face nil t))) |
| 838 | '("^#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?" | ||
| 839 | (1 font-lock-constant-face) (2 font-lock-variable-name-face nil t))) | ||
| 840 | (list "\\.[rR][cC]$") | 842 | (list "\\.[rR][cC]$") |
| 841 | nil | 843 | nil |
| 842 | "Generic mode for MS-Windows Resource files.")) | 844 | "Generic mode for MS-Windows Resource files.")) |
| @@ -1417,21 +1419,25 @@ you must reload generic-x to enable the specified modes." | |||
| 1417 | (1 font-lock-keyword-face) | 1419 | (1 font-lock-keyword-face) |
| 1418 | (2 font-lock-constant-face nil t)) | 1420 | (2 font-lock-constant-face nil t)) |
| 1419 | ;; system variables | 1421 | ;; system variables |
| 1420 | (generic-make-keywords-list | 1422 | (eval-when-compile |
| 1421 | installshield-system-variables-list | 1423 | (generic-make-keywords-list |
| 1422 | 'font-lock-variable-name-face "[^_]" "[^_]") | 1424 | installshield-system-variables-list |
| 1425 | 'font-lock-variable-name-face "[^_]" "[^_]")) | ||
| 1423 | ;; system functions | 1426 | ;; system functions |
| 1424 | (generic-make-keywords-list | 1427 | (eval-when-compile |
| 1425 | installshield-system-functions-list | 1428 | (generic-make-keywords-list |
| 1426 | 'font-lock-function-name-face "[^_]" "[^_]") | 1429 | installshield-system-functions-list |
| 1430 | 'font-lock-function-name-face "[^_]" "[^_]")) | ||
| 1427 | ;; type keywords | 1431 | ;; type keywords |
| 1428 | (generic-make-keywords-list | 1432 | (eval-when-compile |
| 1429 | installshield-types-list | 1433 | (generic-make-keywords-list |
| 1430 | 'font-lock-type-face "[^_]" "[^_]") | 1434 | installshield-types-list |
| 1435 | 'font-lock-type-face "[^_]" "[^_]")) | ||
| 1431 | ;; function argument constants | 1436 | ;; function argument constants |
| 1432 | (generic-make-keywords-list | 1437 | (eval-when-compile |
| 1433 | installshield-funarg-constants-list | 1438 | (generic-make-keywords-list |
| 1434 | 'font-lock-variable-name-face "[^_]" "[^_]") ; is this face the best choice? | 1439 | installshield-funarg-constants-list |
| 1440 | 'font-lock-variable-name-face "[^_]" "[^_]")) ; is this face the best choice? | ||
| 1435 | ) | 1441 | ) |
| 1436 | (list "\\.[rR][uU][lL]$") | 1442 | (list "\\.[rR][uU][lL]$") |
| 1437 | (list | 1443 | (list |
| @@ -1596,6 +1602,36 @@ you must reload generic-x to enable the specified modes." | |||
| 1596 | ) | 1602 | ) |
| 1597 | ) | 1603 | ) |
| 1598 | 1604 | ||
| 1605 | ;; Fstab | ||
| 1606 | (and | ||
| 1607 | (memq 'etc-fstab-generic-mode generic-extras-enable-list) | ||
| 1608 | |||
| 1609 | (define-generic-mode 'etc-fstab-generic-mode | ||
| 1610 | (list ?#) | ||
| 1611 | (list | ||
| 1612 | "ext2" | ||
| 1613 | "fd" | ||
| 1614 | "iso9660" | ||
| 1615 | "nfs" | ||
| 1616 | "proc" | ||
| 1617 | "swap" | ||
| 1618 | "ufs" | ||
| 1619 | ) | ||
| 1620 | '( | ||
| 1621 | ("^\\([/-A-Za-z0-9_]+\\)\\s-+\\([/-A-Za-z0-9_]+\\)" | ||
| 1622 | (1 'font-lock-type-face) | ||
| 1623 | (2 'font-lock-variable-name-face) | ||
| 1624 | ) | ||
| 1625 | ) | ||
| 1626 | '("/etc/[v]*fstab\\'") | ||
| 1627 | (list | ||
| 1628 | (function | ||
| 1629 | (lambda () | ||
| 1630 | (setq imenu-generic-expression | ||
| 1631 | '((nil "^\\([/-A-Za-z0-9_]+\\)\\s-+" 1))) | ||
| 1632 | ))) | ||
| 1633 | ) | ||
| 1634 | ) | ||
| 1599 | 1635 | ||
| 1600 | ;; From Jacques Duthen <jacques.duthen@sncf.fr> | 1636 | ;; From Jacques Duthen <jacques.duthen@sncf.fr> |
| 1601 | (defvar show-tabs-generic-mode-font-lock-defaults-1 | 1637 | (defvar show-tabs-generic-mode-font-lock-defaults-1 |