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.
This commit is contained in:
parent
9349e5f767
commit
9445f99bd6
3 changed files with 51 additions and 60 deletions
|
@ -1,5 +1,8 @@
|
||||||
2013-06-18 Glenn Morris <rgm@gnu.org>
|
2013-06-18 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
* generic-x.el (bat-generic-mode, rc-generic-mode, rul-generic-mode):
|
||||||
|
Replace obsolete function generic-make-keywords with its expansion.
|
||||||
|
|
||||||
* progmodes/python.el (ffap-alist): Declare.
|
* progmodes/python.el (ffap-alist): Declare.
|
||||||
|
|
||||||
* textmodes/reftex.el (bibtex-mode-map): Declare.
|
* textmodes/reftex.el (bibtex-mode-map): Declare.
|
||||||
|
|
|
@ -44,11 +44,8 @@
|
||||||
;; end at the end of the line.) Emacs does not support comment
|
;; end at the end of the line.) Emacs does not support comment
|
||||||
;; strings of more than two characters in length.
|
;; strings of more than two characters in length.
|
||||||
;;
|
;;
|
||||||
;; * List of keywords to font-lock. Each keyword should be a string.
|
;; * List of keywords to font-lock in `font-lock-keyword-face'.
|
||||||
;; If you have additional keywords which should be highlighted in a
|
;; Each keyword should be a string.
|
||||||
;; face different from `font-lock-keyword-face', you can use the
|
|
||||||
;; convenience function `generic-make-keywords-list' (which see),
|
|
||||||
;; and add the result to the following list:
|
|
||||||
;;
|
;;
|
||||||
;; * Additional expressions to font-lock. This should be a list of
|
;; * Additional expressions to font-lock. This should be a list of
|
||||||
;; expressions, each of which should be of the same form as those in
|
;; expressions, each of which should be of the same form as those in
|
||||||
|
|
|
@ -483,38 +483,30 @@ like an INI file. You can add this hook to `find-file-hook'."
|
||||||
;; are frequently used in simple text, we punt.)
|
;; are frequently used in simple text, we punt.)
|
||||||
;; In `generic-bat-mode-setup-function' we make the keywords
|
;; In `generic-bat-mode-setup-function' we make the keywords
|
||||||
;; case-insensitive
|
;; case-insensitive
|
||||||
(generic-make-keywords-list
|
'("^[@ \t]*\\_<\\(for\\|if\\)\\_>" 1 font-lock-keyword-face)
|
||||||
'("for"
|
|
||||||
"if")
|
|
||||||
font-lock-keyword-face "^[@ \t]*")
|
|
||||||
;; These keywords can be anywhere on a line
|
;; These keywords can be anywhere on a line
|
||||||
;; In `generic-bat-mode-setup-function' we make the keywords
|
;; In `generic-bat-mode-setup-function' we make the keywords
|
||||||
;; case-insensitive
|
;; case-insensitive
|
||||||
(generic-make-keywords-list
|
(list (regexp-opt '("do" "exist" "errorlevel" "goto" "not") 'symbols)
|
||||||
'("do"
|
1 font-lock-keyword-face)
|
||||||
"exist"
|
|
||||||
"errorlevel"
|
|
||||||
"goto"
|
|
||||||
"not")
|
|
||||||
font-lock-keyword-face)
|
|
||||||
;; These are built-in commands. Only frequently-used ones are listed.
|
;; These are built-in commands. Only frequently-used ones are listed.
|
||||||
(generic-make-keywords-list
|
(list (concat "[ \t|\n]"
|
||||||
'("CALL" "call" "Call"
|
(regexp-opt '("CALL" "call" "Call"
|
||||||
"CD" "cd" "Cd"
|
"CD" "cd" "Cd"
|
||||||
"CLS" "cls" "Cls"
|
"CLS" "cls" "Cls"
|
||||||
"COPY" "copy" "Copy"
|
"COPY" "copy" "Copy"
|
||||||
"DEL" "del" "Del"
|
"DEL" "del" "Del"
|
||||||
"ECHO" "echo" "Echo"
|
"ECHO" "echo" "Echo"
|
||||||
"MD" "md" "Md"
|
"MD" "md" "Md"
|
||||||
"PATH" "path" "Path"
|
"PATH" "path" "Path"
|
||||||
"PAUSE" "pause" "Pause"
|
"PAUSE" "pause" "Pause"
|
||||||
"PROMPT" "prompt" "Prompt"
|
"PROMPT" "prompt" "Prompt"
|
||||||
"RD" "rd" "Rd"
|
"RD" "rd" "Rd"
|
||||||
"REN" "ren" "Ren"
|
"REN" "ren" "Ren"
|
||||||
"SET" "set" "Set"
|
"SET" "set" "Set"
|
||||||
"START" "start" "Start"
|
"START" "start" "Start"
|
||||||
"SHIFT" "shift" "Shift")
|
"SHIFT" "shift" "Shift") 'symbols))
|
||||||
font-lock-builtin-face "[ \t|\n]")
|
1 font-lock-builtin-face)
|
||||||
'("^[ \t]*\\(:\\sw+\\)" 1 font-lock-function-name-face t)
|
'("^[ \t]*\\(:\\sw+\\)" 1 font-lock-function-name-face t)
|
||||||
'("\\(%\\sw+%\\)" 1 font-lock-variable-name-face t)
|
'("\\(%\\sw+%\\)" 1 font-lock-variable-name-face t)
|
||||||
'("\\(%[0-9]\\)" 1 font-lock-variable-name-face t)
|
'("\\(%[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'."
|
||||||
;; the choice of face for each token group
|
;; the choice of face for each token group
|
||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(list
|
(list
|
||||||
(generic-make-keywords-list
|
(list (regexp-opt '("FILEFLAGSMASK"
|
||||||
'("FILEFLAGSMASK"
|
"FILEFLAGS"
|
||||||
"FILEFLAGS"
|
"FILEOS"
|
||||||
"FILEOS"
|
"FILESUBTYPE"
|
||||||
"FILESUBTYPE"
|
"FILETYPE"
|
||||||
"FILETYPE"
|
"FILEVERSION"
|
||||||
"FILEVERSION"
|
"PRODUCTVERSION") 'symbols)
|
||||||
"PRODUCTVERSION")
|
1 font-lock-type-face)
|
||||||
font-lock-type-face)
|
(list (regexp-opt '("BEGIN" "BLOCK" "END" "VALUE") 'symbols)
|
||||||
(generic-make-keywords-list
|
1 font-lock-function-name-face)
|
||||||
'("BEGIN"
|
|
||||||
"BLOCK"
|
|
||||||
"END"
|
|
||||||
"VALUE")
|
|
||||||
font-lock-function-name-face)
|
|
||||||
'("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face)
|
'("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face)
|
||||||
'("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face)
|
'("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face)
|
||||||
'("^#[ \t]*\\(elif\\|if\\)\\>"
|
'("^#[ \t]*\\(elif\\|if\\)\\>"
|
||||||
|
@ -1470,21 +1457,25 @@ like an INI file. You can add this hook to `find-file-hook'."
|
||||||
(1 font-lock-keyword-face)
|
(1 font-lock-keyword-face)
|
||||||
(2 font-lock-constant-face nil t))
|
(2 font-lock-constant-face nil t))
|
||||||
;; system variables
|
;; system variables
|
||||||
(generic-make-keywords-list
|
(list (concat "[^_]"
|
||||||
installshield-system-variables-list
|
(regexp-opt installshield-system-variables-list 'symbols)
|
||||||
font-lock-variable-name-face "[^_]" "[^_]")
|
"[^_]")
|
||||||
|
1 font-lock-variable-name-face)
|
||||||
;; system functions
|
;; system functions
|
||||||
(generic-make-keywords-list
|
(list (concat "[^_]"
|
||||||
installshield-system-functions-list
|
(regexp-opt installshield-system-functions-list 'symbols)
|
||||||
font-lock-function-name-face "[^_]" "[^_]")
|
"[^_]")
|
||||||
|
1 font-lock-function-name-face)
|
||||||
;; type keywords
|
;; type keywords
|
||||||
(generic-make-keywords-list
|
(list (concat "[^_]"
|
||||||
installshield-types-list
|
(regexp-opt installshield-types-list 'symbols)
|
||||||
font-lock-type-face "[^_]" "[^_]")
|
"[^_]")
|
||||||
|
1 font-lock-type-face)
|
||||||
;; function argument constants
|
;; function argument constants
|
||||||
(generic-make-keywords-list
|
(list (concat "[^_]"
|
||||||
installshield-funarg-constants-list
|
(regexp-opt installshield-funarg-constants-list 'symbols)
|
||||||
font-lock-variable-name-face "[^_]" "[^_]"))) ; is this face the best choice?
|
"[^_]")
|
||||||
|
1 font-lock-variable-name-face))) ; is this face the best choice?
|
||||||
'("\\.[rR][uU][lL]\\'")
|
'("\\.[rR][uU][lL]\\'")
|
||||||
'(generic-rul-mode-setup-function)
|
'(generic-rul-mode-setup-function)
|
||||||
"Generic mode for InstallShield RUL files.")
|
"Generic mode for InstallShield RUL files.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue