emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113041: Replace obsolete generic-make-keywords call


From: Glenn Morris
Subject: [Emacs-diffs] trunk r113041: Replace obsolete generic-make-keywords calls
Date: Tue, 18 Jun 2013 07:44:07 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113041
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2013-06-18 00:43:46 -0700
message:
  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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/generic.el     generic.el-20091113204419-o5vbwnq5f7feedwu-3402
  lisp/generic-x.el              
genericx.el-20091113204419-o5vbwnq5f7feedwu-1268
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-06-18 07:17:58 +0000
+++ b/lisp/ChangeLog    2013-06-18 07:43:46 +0000
@@ -1,5 +1,8 @@
 2013-06-18  Glenn Morris  <address@hidden>
 
+       * 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.
 
        * textmodes/reftex.el (bibtex-mode-map): Declare.

=== modified file 'lisp/emacs-lisp/generic.el'
--- a/lisp/emacs-lisp/generic.el        2013-06-11 21:26:00 +0000
+++ b/lisp/emacs-lisp/generic.el        2013-06-18 07:43:46 +0000
@@ -44,11 +44,8 @@
 ;;   end at the end of the line.)  Emacs does not support comment
 ;;   strings of more than two characters in length.
 ;;
-;; * List of keywords to font-lock.  Each keyword should be a string.
-;;   If you have additional keywords which should be highlighted in a
-;;   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:
+;; * List of keywords to font-lock in `font-lock-keyword-face'.
+;;   Each keyword should be a string.
 ;;
 ;; * Additional expressions to font-lock.  This should be a list of
 ;;   expressions, each of which should be of the same form as those in

=== modified file 'lisp/generic-x.el'
--- a/lisp/generic-x.el 2013-05-06 07:18:36 +0000
+++ b/lisp/generic-x.el 2013-06-18 07:43:46 +0000
@@ -483,38 +483,30 @@
      ;; are frequently used in simple text, we punt.)
      ;; In `generic-bat-mode-setup-function' we make the keywords
      ;; case-insensitive
-     (generic-make-keywords-list
-      '("for"
-       "if")
-      font-lock-keyword-face "^[@ \t]*")
+     '("^[@ \t]*\\_<\\(for\\|if\\)\\_>" 1 font-lock-keyword-face)
      ;; These keywords can be anywhere on a line
      ;; In `generic-bat-mode-setup-function' we make the keywords
      ;; case-insensitive
-     (generic-make-keywords-list
-      '("do"
-       "exist"
-       "errorlevel"
-       "goto"
-       "not")
-      font-lock-keyword-face)
+     (list (regexp-opt '("do" "exist" "errorlevel" "goto" "not") 'symbols)
+          1 font-lock-keyword-face)
      ;; These are built-in commands.  Only frequently-used ones are listed.
-     (generic-make-keywords-list
-      '("CALL"     "call"       "Call"
-       "CD"        "cd"         "Cd"
-       "CLS"       "cls"        "Cls"
-       "COPY"      "copy"       "Copy"
-       "DEL"       "del"        "Del"
-       "ECHO"      "echo"       "Echo"
-       "MD"        "md"         "Md"
-       "PATH"      "path"       "Path"
-       "PAUSE"     "pause"      "Pause"
-       "PROMPT"    "prompt"     "Prompt"
-       "RD"        "rd"         "Rd"
-       "REN"       "ren"        "Ren"
-       "SET"       "set"        "Set"
-       "START"     "start"      "Start"
-       "SHIFT"     "shift"      "Shift")
-      font-lock-builtin-face "[ \t|\n]")
+     (list (concat "[ \t|\n]"
+                  (regexp-opt '("CALL"     "call"       "Call"
+                                "CD"       "cd"         "Cd"
+                                "CLS"      "cls"        "Cls"
+                                "COPY"     "copy"       "Copy"
+                                "DEL"      "del"        "Del"
+                                "ECHO"     "echo"       "Echo"
+                                "MD"       "md"         "Md"
+                                "PATH"     "path"       "Path"
+                                "PAUSE"    "pause"      "Pause"
+                                "PROMPT"   "prompt"     "Prompt"
+                                "RD"       "rd"         "Rd"
+                                "REN"      "ren"        "Ren"
+                                "SET"      "set"        "Set"
+                                "START"    "start"      "Start"
+                                "SHIFT"    "shift"      "Shift") 'symbols))
+          1 font-lock-builtin-face)
      '("^[ \t]*\\(:\\sw+\\)"         1 font-lock-function-name-face t)
      '("\\(%\\sw+%\\)"               1 font-lock-variable-name-face t)
      '("\\(%[0-9]\\)"                1 font-lock-variable-name-face t)
@@ -841,21 +833,16 @@
   ;; the choice of face for each token group
   (eval-when-compile
     (list
-     (generic-make-keywords-list
-      '("FILEFLAGSMASK"
-       "FILEFLAGS"
-       "FILEOS"
-       "FILESUBTYPE"
-       "FILETYPE"
-       "FILEVERSION"
-       "PRODUCTVERSION")
-      font-lock-type-face)
-     (generic-make-keywords-list
-      '("BEGIN"
-       "BLOCK"
-       "END"
-       "VALUE")
-      font-lock-function-name-face)
+     (list (regexp-opt '("FILEFLAGSMASK"
+                        "FILEFLAGS"
+                        "FILEOS"
+                        "FILESUBTYPE"
+                        "FILETYPE"
+                        "FILEVERSION"
+                        "PRODUCTVERSION") 'symbols)
+          1 font-lock-type-face)
+     (list (regexp-opt '("BEGIN" "BLOCK" "END" "VALUE") 'symbols)
+          1 font-lock-function-name-face)
      '("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face)
      '("^#[ \t]*define[ \t]+\\(\\sw+\\)("       1 font-lock-function-name-face)
      '("^#[ \t]*\\(elif\\|if\\)\\>"
@@ -1470,21 +1457,25 @@
        (1 font-lock-keyword-face)
        (2 font-lock-constant-face nil t))
      ;; system variables
-     (generic-make-keywords-list
-      installshield-system-variables-list
-      font-lock-variable-name-face "[^_]" "[^_]")
+     (list (concat "[^_]"
+                  (regexp-opt installshield-system-variables-list 'symbols)
+                  "[^_]")
+          1 font-lock-variable-name-face)
      ;; system functions
-     (generic-make-keywords-list
-      installshield-system-functions-list
-      font-lock-function-name-face "[^_]" "[^_]")
+     (list (concat "[^_]"
+                  (regexp-opt installshield-system-functions-list 'symbols)
+                  "[^_]")
+          1 font-lock-function-name-face)
      ;; type keywords
-     (generic-make-keywords-list
-      installshield-types-list
-      font-lock-type-face "[^_]" "[^_]")
+     (list (concat "[^_]"
+                  (regexp-opt installshield-types-list 'symbols)
+                  "[^_]")
+          1 font-lock-type-face)
      ;; function argument constants
-     (generic-make-keywords-list
-      installshield-funarg-constants-list
-      font-lock-variable-name-face "[^_]" "[^_]"))) ; is this face the best 
choice?
+     (list (concat "[^_]"
+                  (regexp-opt installshield-funarg-constants-list 'symbols)
+                  "[^_]")
+          1 font-lock-variable-name-face))) ; is this face the best choice?
   '("\\.[rR][uU][lL]\\'")
   '(generic-rul-mode-setup-function)
   "Generic mode for InstallShield RUL files.")


reply via email to

[Prev in Thread] Current Thread [Next in Thread]