diff options
| author | Glenn Morris | 2013-06-18 00:43:46 -0700 |
|---|---|---|
| committer | Glenn Morris | 2013-06-18 00:43:46 -0700 |
| commit | 9445f99bd69192de4a1d0f86f33410f4f7d64c4c (patch) | |
| tree | 3b202d70fcd1b7a7177aff54c22ed570b09ba842 | |
| parent | 9349e5f76716b44f92391fa722f5feba58898f27 (diff) | |
| download | emacs-9445f99bd69192de4a1d0f86f33410f4f7d64c4c.tar.gz emacs-9445f99bd69192de4a1d0f86f33410f4f7d64c4c.zip | |
Replace obsolete generic-make-keywords calls
* lisp/generic-x.el (bat-generic-mode, rc-generic-mode, rul-generic-mode):
Replace obsolete function generic-make-keywords with its expansion.
* lisp/emacs-lisp/generic.el: Update commentary.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/generic.el | 7 | ||||
| -rw-r--r-- | lisp/generic-x.el | 101 |
3 files changed, 51 insertions, 60 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 793f470493c..ab8868d600c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2013-06-18 Glenn Morris <rgm@gnu.org> | 1 | 2013-06-18 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * generic-x.el (bat-generic-mode, rc-generic-mode, rul-generic-mode): | ||
| 4 | Replace obsolete function generic-make-keywords with its expansion. | ||
| 5 | |||
| 3 | * progmodes/python.el (ffap-alist): Declare. | 6 | * progmodes/python.el (ffap-alist): Declare. |
| 4 | 7 | ||
| 5 | * textmodes/reftex.el (bibtex-mode-map): Declare. | 8 | * textmodes/reftex.el (bibtex-mode-map): Declare. |
diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el index cb86a554335..3eb64f9f7f0 100644 --- a/lisp/emacs-lisp/generic.el +++ b/lisp/emacs-lisp/generic.el | |||
| @@ -44,11 +44,8 @@ | |||
| 44 | ;; end at the end of the line.) Emacs does not support comment | 44 | ;; end at the end of the line.) Emacs does not support comment |
| 45 | ;; strings of more than two characters in length. | 45 | ;; strings of more than two characters in length. |
| 46 | ;; | 46 | ;; |
| 47 | ;; * List of keywords to font-lock. Each keyword should be a string. | 47 | ;; * List of keywords to font-lock in `font-lock-keyword-face'. |
| 48 | ;; If you have additional keywords which should be highlighted in a | 48 | ;; Each keyword should be a string. |
| 49 | ;; face different from `font-lock-keyword-face', you can use the | ||
| 50 | ;; convenience function `generic-make-keywords-list' (which see), | ||
| 51 | ;; and add the result to the following list: | ||
| 52 | ;; | 49 | ;; |
| 53 | ;; * Additional expressions to font-lock. This should be a list of | 50 | ;; * Additional expressions to font-lock. This should be a list of |
| 54 | ;; expressions, each of which should be of the same form as those in | 51 | ;; expressions, each of which should be of the same form as those in |
diff --git a/lisp/generic-x.el b/lisp/generic-x.el index 946b81992f8..1867759b549 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el | |||
| @@ -483,38 +483,30 @@ like an INI file. You can add this hook to `find-file-hook'." | |||
| 483 | ;; are frequently used in simple text, we punt.) | 483 | ;; are frequently used in simple text, we punt.) |
| 484 | ;; In `generic-bat-mode-setup-function' we make the keywords | 484 | ;; In `generic-bat-mode-setup-function' we make the keywords |
| 485 | ;; case-insensitive | 485 | ;; case-insensitive |
| 486 | (generic-make-keywords-list | 486 | '("^[@ \t]*\\_<\\(for\\|if\\)\\_>" 1 font-lock-keyword-face) |
| 487 | '("for" | ||
| 488 | "if") | ||
| 489 | font-lock-keyword-face "^[@ \t]*") | ||
| 490 | ;; These keywords can be anywhere on a line | 487 | ;; These keywords can be anywhere on a line |
| 491 | ;; In `generic-bat-mode-setup-function' we make the keywords | 488 | ;; In `generic-bat-mode-setup-function' we make the keywords |
| 492 | ;; case-insensitive | 489 | ;; case-insensitive |
| 493 | (generic-make-keywords-list | 490 | (list (regexp-opt '("do" "exist" "errorlevel" "goto" "not") 'symbols) |
| 494 | '("do" | 491 | 1 font-lock-keyword-face) |
| 495 | "exist" | ||
| 496 | "errorlevel" | ||
| 497 | "goto" | ||
| 498 | "not") | ||
| 499 | font-lock-keyword-face) | ||
| 500 | ;; These are built-in commands. Only frequently-used ones are listed. | 492 | ;; These are built-in commands. Only frequently-used ones are listed. |
| 501 | (generic-make-keywords-list | 493 | (list (concat "[ \t|\n]" |
| 502 | '("CALL" "call" "Call" | 494 | (regexp-opt '("CALL" "call" "Call" |
| 503 | "CD" "cd" "Cd" | 495 | "CD" "cd" "Cd" |
| 504 | "CLS" "cls" "Cls" | 496 | "CLS" "cls" "Cls" |
| 505 | "COPY" "copy" "Copy" | 497 | "COPY" "copy" "Copy" |
| 506 | "DEL" "del" "Del" | 498 | "DEL" "del" "Del" |
| 507 | "ECHO" "echo" "Echo" | 499 | "ECHO" "echo" "Echo" |
| 508 | "MD" "md" "Md" | 500 | "MD" "md" "Md" |
| 509 | "PATH" "path" "Path" | 501 | "PATH" "path" "Path" |
| 510 | "PAUSE" "pause" "Pause" | 502 | "PAUSE" "pause" "Pause" |
| 511 | "PROMPT" "prompt" "Prompt" | 503 | "PROMPT" "prompt" "Prompt" |
| 512 | "RD" "rd" "Rd" | 504 | "RD" "rd" "Rd" |
| 513 | "REN" "ren" "Ren" | 505 | "REN" "ren" "Ren" |
| 514 | "SET" "set" "Set" | 506 | "SET" "set" "Set" |
| 515 | "START" "start" "Start" | 507 | "START" "start" "Start" |
| 516 | "SHIFT" "shift" "Shift") | 508 | "SHIFT" "shift" "Shift") 'symbols)) |
| 517 | font-lock-builtin-face "[ \t|\n]") | 509 | 1 font-lock-builtin-face) |
| 518 | '("^[ \t]*\\(:\\sw+\\)" 1 font-lock-function-name-face t) | 510 | '("^[ \t]*\\(:\\sw+\\)" 1 font-lock-function-name-face t) |
| 519 | '("\\(%\\sw+%\\)" 1 font-lock-variable-name-face t) | 511 | '("\\(%\\sw+%\\)" 1 font-lock-variable-name-face t) |
| 520 | '("\\(%[0-9]\\)" 1 font-lock-variable-name-face t) | 512 | '("\\(%[0-9]\\)" 1 font-lock-variable-name-face t) |
| @@ -841,21 +833,16 @@ like an INI file. You can add this hook to `find-file-hook'." | |||
| 841 | ;; the choice of face for each token group | 833 | ;; the choice of face for each token group |
| 842 | (eval-when-compile | 834 | (eval-when-compile |
| 843 | (list | 835 | (list |
| 844 | (generic-make-keywords-list | 836 | (list (regexp-opt '("FILEFLAGSMASK" |
| 845 | '("FILEFLAGSMASK" | 837 | "FILEFLAGS" |
| 846 | "FILEFLAGS" | 838 | "FILEOS" |
| 847 | "FILEOS" | 839 | "FILESUBTYPE" |
| 848 | "FILESUBTYPE" | 840 | "FILETYPE" |
| 849 | "FILETYPE" | 841 | "FILEVERSION" |
| 850 | "FILEVERSION" | 842 | "PRODUCTVERSION") 'symbols) |
| 851 | "PRODUCTVERSION") | 843 | 1 font-lock-type-face) |
| 852 | font-lock-type-face) | 844 | (list (regexp-opt '("BEGIN" "BLOCK" "END" "VALUE") 'symbols) |
| 853 | (generic-make-keywords-list | 845 | 1 font-lock-function-name-face) |
| 854 | '("BEGIN" | ||
| 855 | "BLOCK" | ||
| 856 | "END" | ||
| 857 | "VALUE") | ||
| 858 | font-lock-function-name-face) | ||
| 859 | '("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face) | 846 | '("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face) |
| 860 | '("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face) | 847 | '("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face) |
| 861 | '("^#[ \t]*\\(elif\\|if\\)\\>" | 848 | '("^#[ \t]*\\(elif\\|if\\)\\>" |
| @@ -1470,21 +1457,25 @@ like an INI file. You can add this hook to `find-file-hook'." | |||
| 1470 | (1 font-lock-keyword-face) | 1457 | (1 font-lock-keyword-face) |
| 1471 | (2 font-lock-constant-face nil t)) | 1458 | (2 font-lock-constant-face nil t)) |
| 1472 | ;; system variables | 1459 | ;; system variables |
| 1473 | (generic-make-keywords-list | 1460 | (list (concat "[^_]" |
| 1474 | installshield-system-variables-list | 1461 | (regexp-opt installshield-system-variables-list 'symbols) |
| 1475 | font-lock-variable-name-face "[^_]" "[^_]") | 1462 | "[^_]") |
| 1463 | 1 font-lock-variable-name-face) | ||
| 1476 | ;; system functions | 1464 | ;; system functions |
| 1477 | (generic-make-keywords-list | 1465 | (list (concat "[^_]" |
| 1478 | installshield-system-functions-list | 1466 | (regexp-opt installshield-system-functions-list 'symbols) |
| 1479 | font-lock-function-name-face "[^_]" "[^_]") | 1467 | "[^_]") |
| 1468 | 1 font-lock-function-name-face) | ||
| 1480 | ;; type keywords | 1469 | ;; type keywords |
| 1481 | (generic-make-keywords-list | 1470 | (list (concat "[^_]" |
| 1482 | installshield-types-list | 1471 | (regexp-opt installshield-types-list 'symbols) |
| 1483 | font-lock-type-face "[^_]" "[^_]") | 1472 | "[^_]") |
| 1473 | 1 font-lock-type-face) | ||
| 1484 | ;; function argument constants | 1474 | ;; function argument constants |
| 1485 | (generic-make-keywords-list | 1475 | (list (concat "[^_]" |
| 1486 | installshield-funarg-constants-list | 1476 | (regexp-opt installshield-funarg-constants-list 'symbols) |
| 1487 | font-lock-variable-name-face "[^_]" "[^_]"))) ; is this face the best choice? | 1477 | "[^_]") |
| 1478 | 1 font-lock-variable-name-face))) ; is this face the best choice? | ||
| 1488 | '("\\.[rR][uU][lL]\\'") | 1479 | '("\\.[rR][uU][lL]\\'") |
| 1489 | '(generic-rul-mode-setup-function) | 1480 | '(generic-rul-mode-setup-function) |
| 1490 | "Generic mode for InstallShield RUL files.") | 1481 | "Generic mode for InstallShield RUL files.") |