]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename the newly added -ref- faces to -use-
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 28 Feb 2023 02:07:55 +0000 (04:07 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 28 Feb 2023 02:08:55 +0000 (04:08 +0200)
* lisp/font-lock.el (font-lock-variable-use-face)
(font-lock-property-use-face): Rename from font-lock-variable-ref-face
and font-lock-property-ref-face.  Update all references (bug#61655).

18 files changed:
doc/lispref/modes.texi
etc/NEWS
lisp/cus-theme.el
lisp/font-lock.el
lisp/progmodes/c-ts-mode.el
lisp/progmodes/cmake-ts-mode.el
lisp/progmodes/csharp-mode.el
lisp/progmodes/go-ts-mode.el
lisp/progmodes/java-ts-mode.el
lisp/progmodes/js.el
lisp/progmodes/json-ts-mode.el
lisp/progmodes/python.el
lisp/progmodes/ruby-ts-mode.el
lisp/progmodes/rust-ts-mode.el
lisp/progmodes/typescript-ts-mode.el
lisp/textmodes/css-mode.el
lisp/textmodes/toml-ts-mode.el
lisp/textmodes/yaml-ts-mode.el

index 11892aaa40eced4932c2d27c206133355238a2e9..fedb2804f261a2a6606d557d0413fee26633906f 100644 (file)
@@ -3688,8 +3688,8 @@ default, from @code{font-lock-function-name-face}.
 @vindex font-lock-variable-name-face
 for the name of a variable being defined or declared.
 
-@item font-lock-variable-ref-face
-@vindex font-lock-variable-ref-face
+@item font-lock-variable-use-face
+@vindex font-lock-variable-use-face
 for the name of a variable being referenced.  This face inherits, by
 default, from @code{font-lock-variable-name-face}.
 
@@ -3772,8 +3772,8 @@ for properties of an object, such as the declaration of fields in a
 struct.  This face inherits, by default, from
 @code{font-lock-variable-name-face}.
 
-@item font-lock-property-ref-face
-@vindex font-lock-property-ref-face
+@item font-lock-property-use-face
+@vindex font-lock-property-use-face
 for properties of an object, such as use of fields in a struct.  This
 face inherits, by default, from @code{font-lock-property-name-face}.
 
index 5a244285efab82c54cd0602b21b4bb2b385d0bcb..b5e67d470379fd1b79b59c710da5c1b44000d07a 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -832,8 +832,8 @@ These faces are primarily meant for use with tree-sitter.  They are:
 'font-lock-escape-face', 'font-lock-function-call-face',
 'font-lock-misc-punctuation-face', 'font-lock-number-face',
 'font-lock-operator-face', 'font-lock-property-name-face',
-'font-lock-property-ref-face', 'font-lock-punctuation-face',
-'font-lock-regexp-face', and 'font-lock-variable-ref-face'.
+'font-lock-property-use-face', 'font-lock-punctuation-face',
+'font-lock-regexp-face', and 'font-lock-variable-use-face'.
 
 +++
 ** New face 'variable-pitch-text'.
index 46e41dd046ce08afff2ca144b9da0ec151fdecdd..5d3f25859763ee1262b75804d8808ac29a45d840 100644 (file)
@@ -73,11 +73,11 @@ Do not call this mode function yourself.  It is meant for internal use."
   font-lock-keyword-face font-lock-negation-char-face
   font-lock-number-face font-lock-misc-punctuation-face
   font-lock-operator-face font-lock-preprocessor-face
-  font-lock-property-name-face font-lock-property-ref-face
+  font-lock-property-name-face font-lock-property-use-face
   font-lock-punctuation-face
   font-lock-regexp-grouping-backslash font-lock-regexp-grouping-construct
   font-lock-string-face font-lock-type-face font-lock-variable-name-face
-  font-lock-variable-ref-face
+  font-lock-variable-use-face
   font-lock-warning-face button link link-visited fringe
   header-line tooltip mode-line mode-line-buffer-id
   mode-line-emphasis mode-line-highlight mode-line-inactive
index b82b764879768b70e03160298fd26891a4881179..f8815c1698ab1141d89248ca7a86c12b4b34f728 100644 (file)
@@ -2046,7 +2046,7 @@ as the constructs of Haddock, Javadoc and similar systems."
   "Font Lock mode face used to highlight variable names."
   :group 'font-lock-faces)
 
-(defface font-lock-variable-ref-face
+(defface font-lock-variable-use-face
   '((t :inherit font-lock-variable-name-face))
   "Font Lock mode face used to highlight variable references."
   :group 'font-lock-faces
@@ -2134,7 +2134,7 @@ For example, the declaration of fields in a struct."
   :group 'font-lock-faces
   :version "29.1")
 
-(defface font-lock-property-ref-face
+(defface font-lock-property-use-face
   '((t :inherit font-lock-property-name-face))
   "Font Lock mode face used to highlight property references.
 For example, property lookup of fields in a struct."
index 2cb6c2709ccd1407b9b21a922cd24b5621c0519f..4b66824c44fa8916e26cb35407c3ced2b04c498a 100644 (file)
@@ -547,7 +547,7 @@ MODE is either `c' or `cpp'."
    '((assignment_expression
       left: (identifier) @font-lock-variable-name-face)
      (assignment_expression
-      left: (field_expression field: (_) @font-lock-property-ref-face))
+      left: (field_expression field: (_) @font-lock-property-use-face))
      (assignment_expression
       left: (pointer_expression
              (identifier) @font-lock-variable-name-face))
@@ -583,7 +583,7 @@ MODE is either `c' or `cpp'."
 
    :language mode
    :feature 'property
-   '((field_identifier) @font-lock-property-ref-face)
+   '((field_identifier) @font-lock-property-use-face)
 
    :language mode
    :feature 'bracket
@@ -660,7 +660,7 @@ OVERRIDE, START, END, and ARGS, see `treesit-font-lock-rules'."
                     "call_expression"))
     (treesit-fontify-with-override
      (treesit-node-start node) (treesit-node-end node)
-     'font-lock-variable-ref-face override start end)))
+     'font-lock-variable-use-face override start end)))
 
 (defun c-ts-mode--fontify-defun (node override start end &rest _)
   "Correctly fontify the DEFUN macro.
index a3f9279ec1ce9be717d0b02e7b801b33ac7f89a2..d83a956af21275c2ef9a50c9f7ac7e687cafaee1 100644 (file)
    :language 'cmake
    :feature 'variable
    :override t
-   '((variable) @font-lock-variable-ref-face)
+   '((variable) @font-lock-variable-use-face)
 
    :language 'cmake
    :feature 'error
index 31c8717128126f76868804bbdea50bf430aa8711..47cd13e7fdbd6492f5850ec2362fa9f9165f1944 100644 (file)
@@ -708,9 +708,9 @@ compilation and evaluation time conflicts."
   (treesit-font-lock-rules
    :language 'c-sharp
    :feature 'expression
-   '((conditional_expression (identifier) @font-lock-variable-ref-face)
-     (postfix_unary_expression (identifier)* @font-lock-variable-ref-face)
-     (initializer_expression (assignment_expression left: (identifier) @font-lock-variable-ref-face)))
+   '((conditional_expression (identifier) @font-lock-variable-use-face)
+     (postfix_unary_expression (identifier)* @font-lock-variable-use-face)
+     (initializer_expression (assignment_expression left: (identifier) @font-lock-variable-use-face)))
 
    :language 'c-sharp
    :feature 'bracket
@@ -739,8 +739,8 @@ compilation and evaluation time conflicts."
    :language 'c-sharp
    :override t
    :feature 'property
-   `((attribute (identifier) @font-lock-property-ref-face (attribute_argument_list))
-     (attribute (identifier) @font-lock-property-ref-face))
+   `((attribute (identifier) @font-lock-property-use-face (attribute_argument_list))
+     (attribute (identifier) @font-lock-property-use-face))
 
    :language 'c-sharp
    :override t
@@ -878,23 +878,23 @@ compilation and evaluation time conflicts."
    :override t
    '((if_directive
       "if" @font-lock-preprocessor-face
-      (identifier) @font-lock-variable-ref-face)
+      (identifier) @font-lock-variable-use-face)
      (elif_directive
       "elif" @font-lock-preprocessor-face
-      (identifier) @font-lock-variable-ref-face)
+      (identifier) @font-lock-variable-use-face)
      (else_directive) @font-lock-preprocessor-face
      (endif_directive) @font-lock-preprocessor-face
      (define_directive
       "define" @font-lock-preprocessor-face
-      (identifier) @font-lock-variable-ref-face)
+      (identifier) @font-lock-variable-use-face)
      (nullable_directive) @font-lock-preprocessor-face
      (pragma_directive) @font-lock-preprocessor-face
      (region_directive) @font-lock-preprocessor-face
      (endregion_directive) @font-lock-preprocessor-face
      (region_directive
-      (preproc_message) @font-lock-variable-ref-face)
+      (preproc_message) @font-lock-variable-use-face)
      (endregion_directive
-      (preproc_message) @font-lock-variable-ref-face))))
+      (preproc_message) @font-lock-variable-use-face))))
 
 ;;;###autoload
 (add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode))
index d4bafdb577bbc72366b4ef78312b7ba3e31ce256..e8f93d147448f67f7e616dbe6ddd44e2ae82d5e4 100644 (file)
 
    :language 'go
    :feature 'property
-   '((selector_expression field: (field_identifier) @font-lock-property-ref-face)
-     (keyed_element (_ (identifier) @font-lock-property-ref-face)))
+   '((selector_expression field: (field_identifier) @font-lock-property-use-face)
+     (keyed_element (_ (identifier) @font-lock-property-use-face)))
 
    :language 'go
    :feature 'variable
-   '((identifier) @font-lock-variable-ref-face)
+   '((identifier) @font-lock-variable-use-face)
 
    :language 'go
    :feature 'escape-sequence
index a1f3ad692c25e6c3522837c4c6e28b5de16cb701..827d38e30c24fb3b112daddaf55e6f82ff53181b 100644 (file)
       name: (identifier) @font-lock-variable-name-face)
 
      (element_value_pair
-      key: (identifier) @font-lock-property-ref-face)
+      key: (identifier) @font-lock-property-use-face)
 
      (formal_parameter
       name: (identifier) @font-lock-variable-name-face)
    :override t
    :feature 'expression
    '((method_invocation
-      object: (identifier) @font-lock-variable-ref-face)
+      object: (identifier) @font-lock-variable-use-face)
 
      (method_invocation
       name: (identifier) @font-lock-function-call-face)
 
      (argument_list (identifier) @font-lock-variable-name-face)
 
-     (expression_statement (identifier) @font-lock-variable-ref-face))
+     (expression_statement (identifier) @font-lock-variable-use-face))
 
    :language 'java
    :feature 'bracket
index e53a80bd499945ea52e39abbaa5e7abd74ca7cd6..52ed19cc68272a1775d87c9fdfc14ad3bf4ab4a3 100644 (file)
@@ -3563,13 +3563,13 @@ This function is intended for use in `after-change-functions'."
 
    :language 'javascript
    :feature 'property
-   '(((property_identifier) @font-lock-property-ref-face
+   '(((property_identifier) @font-lock-property-use-face
       (:pred js--treesit-property-not-function-p
-             @font-lock-property-ref-face))
+             @font-lock-property-use-face))
 
-     (pair value: (identifier) @font-lock-variable-ref-face)
+     (pair value: (identifier) @font-lock-variable-use-face)
 
-     ((shorthand_property_identifier) @font-lock-property-ref-face))
+     ((shorthand_property_identifier) @font-lock-property-use-face))
 
    :language 'javascript
    :feature 'assignment
@@ -3681,8 +3681,8 @@ For OVERRIDE, START, END, see `treesit-font-lock-rules'."
     (treesit-fontify-with-override
      (treesit-node-start node) (treesit-node-end node)
      (pcase (treesit-node-type node)
-       ("identifier" 'font-lock-variable-ref-face)
-       ("property_identifier" 'font-lock-property-ref-face))
+       ("identifier" 'font-lock-variable-use-face)
+       ("property_identifier" 'font-lock-property-use-face))
      override start end)))
 
 (defun js--treesit-defun-name (node)
index 72f90d5c997993dc26c8acb956a32d8d916cc028..6272c0073e1c1037b2b5e4541fe33ba74a49de51 100644 (file)
    :language 'json
    :feature 'pair
    :override t ; Needed for overriding string face on keys.
-   '((pair key: (_) @font-lock-property-ref-face))
+   '((pair key: (_) @font-lock-property-use-face))
    :language 'json
    :feature 'error
    :override t
index 5aab31c3ea81bd181513a070ba93ab547b95098e..1f970633bfcf9e9bc2458e3fbe81264e2541d7f2 100644 (file)
@@ -1147,7 +1147,7 @@ fontified."
                  @font-lock-variable-name-face)
      (assignment left: (attribute
                         attribute: (identifier)
-                        @font-lock-property-ref-face))
+                        @font-lock-property-use-face))
      (pattern_list (identifier)
                    @font-lock-variable-name-face)
      (tuple_pattern (identifier)
@@ -1184,12 +1184,12 @@ fontified."
    :feature 'property
    :language 'python
    '((attribute
-      attribute: (identifier) @font-lock-property-ref-face)
+      attribute: (identifier) @font-lock-property-use-face)
      (class_definition
       body: (block
              (expression_statement
               (assignment left:
-                          (identifier) @font-lock-property-ref-face)))))
+                          (identifier) @font-lock-property-use-face)))))
 
    :feature 'operator
    :language 'python
index fedba200f832b3038162ef432caf4c5bb4b44eb8..fa1d8626f14a024a9f3eb2c0e4d36d0d78b544b2 100644 (file)
@@ -292,11 +292,11 @@ values of OVERRIDE"
 
    :language language
    :feature 'global
-   '((global_variable) @font-lock-variable-ref-face)
+   '((global_variable) @font-lock-variable-use-face)
 
    :language language
    :feature 'instance
-   '((instance_variable) @font-lock-variable-ref-face)
+   '((instance_variable) @font-lock-variable-use-face)
 
    :language language
    :feature 'method-definition
index a46d442a0e50818557b477efeb28352ff4d13075..2d5c3211c1ac2c2211d9c10def7a82a20f89fa43 100644 (file)
 
    :language 'rust
    :feature 'property
-   '((field_identifier) @font-lock-property-ref-face
-     (shorthand_field_initializer (identifier) @font-lock-property-ref-face))
+   '((field_identifier) @font-lock-property-use-face
+     (shorthand_field_initializer (identifier) @font-lock-property-use-face))
 
    ;; Must be under type, otherwise some imports can be highlighted as constants.
    :language 'rust
 
    :language 'rust
    :feature 'variable
-   '((arguments (identifier) @font-lock-variable-ref-face)
-     (array_expression (identifier) @font-lock-variable-ref-face)
-     (assignment_expression right: (identifier) @font-lock-variable-ref-face)
-     (binary_expression left: (identifier) @font-lock-variable-ref-face)
-     (binary_expression right: (identifier) @font-lock-variable-ref-face)
-     (block (identifier) @font-lock-variable-ref-face)
-     (compound_assignment_expr right: (identifier) @font-lock-variable-ref-face)
-     (field_expression value: (identifier) @font-lock-variable-ref-face)
-     (field_initializer value: (identifier) @font-lock-variable-ref-face)
-     (if_expression condition: (identifier) @font-lock-variable-ref-face)
-     (let_condition value: (identifier) @font-lock-variable-ref-face)
-     (let_declaration value: (identifier) @font-lock-variable-ref-face)
-     (match_arm value: (identifier) @font-lock-variable-ref-face)
-     (match_expression value: (identifier) @font-lock-variable-ref-face)
-     (reference_expression value: (identifier) @font-lock-variable-ref-face)
-     (return_expression (identifier) @font-lock-variable-ref-face)
-     (tuple_expression (identifier) @font-lock-variable-ref-face)
-     (unary_expression (identifier) @font-lock-variable-ref-face)
-     (while_expression condition: (identifier) @font-lock-variable-ref-face))
+   '((arguments (identifier) @font-lock-variable-use-face)
+     (array_expression (identifier) @font-lock-variable-use-face)
+     (assignment_expression right: (identifier) @font-lock-variable-use-face)
+     (binary_expression left: (identifier) @font-lock-variable-use-face)
+     (binary_expression right: (identifier) @font-lock-variable-use-face)
+     (block (identifier) @font-lock-variable-use-face)
+     (compound_assignment_expr right: (identifier) @font-lock-variable-use-face)
+     (field_expression value: (identifier) @font-lock-variable-use-face)
+     (field_initializer value: (identifier) @font-lock-variable-use-face)
+     (if_expression condition: (identifier) @font-lock-variable-use-face)
+     (let_condition value: (identifier) @font-lock-variable-use-face)
+     (let_declaration value: (identifier) @font-lock-variable-use-face)
+     (match_arm value: (identifier) @font-lock-variable-use-face)
+     (match_expression value: (identifier) @font-lock-variable-use-face)
+     (reference_expression value: (identifier) @font-lock-variable-use-face)
+     (return_expression (identifier) @font-lock-variable-use-face)
+     (tuple_expression (identifier) @font-lock-variable-use-face)
+     (unary_expression (identifier) @font-lock-variable-use-face)
+     (while_expression condition: (identifier) @font-lock-variable-use-face))
 
    :language 'rust
    :feature 'escape-sequence
index 5b49b8f50a8fc5bf42e6b3e9252f4f16940892b4..65fba72373c61162fffc6eab5c99bd07806cc027 100644 (file)
@@ -249,9 +249,9 @@ Argument LANGUAGE is either `typescript' or `tsx'."
      (public_field_definition
       name: (property_identifier) @font-lock-property-name-face)
 
-     (pair key: (property_identifier) @font-lock-property-ref-face)
+     (pair key: (property_identifier) @font-lock-property-use-face)
 
-     ((shorthand_property_identifier) @font-lock-property-ref-face))
+     ((shorthand_property_identifier) @font-lock-property-use-face))
 
    :language language
    :feature 'expression
@@ -272,7 +272,7 @@ Argument LANGUAGE is either `typescript' or `tsx'."
    :language language
    :feature 'pattern
    `((pair_pattern
-      key: (property_identifier) @font-lock-property-ref-face
+      key: (property_identifier) @font-lock-property-use-face
       value: [(identifier) @font-lock-variable-name-face
               (assignment_pattern left: (identifier) @font-lock-variable-name-face)])
 
index 39e38179359b6542a6705598f51c6b5b4e19aaf4..f51edfb4c80a83cc8efd8d33e5d6d4a0920480a6 100644 (file)
@@ -1399,8 +1399,8 @@ for determining whether point is within a selector."
 
    :feature 'query
    :language 'css
-   '((keyword_query) @font-lock-property-ref-face
-     (feature_name) @font-lock-property-ref-face)
+   '((keyword_query) @font-lock-property-use-face
+     (feature_name) @font-lock-property-use-face)
 
    :feature 'bracket
    :language 'css
index 2ff9d07d13bcbb4a36dcbfb294118c1c5ba86445..2c49103437228bfd6e7f3aeb5b9cd2c5d4da895e 100644 (file)
@@ -92,8 +92,8 @@
    :language 'toml
    :feature 'pair
    :override t            ; Needed for overriding string face on keys.
-   '((bare_key) @font-lock-property-ref-face
-     (quoted_key) @font-lock-property-ref-face
+   '((bare_key) @font-lock-property-use-face
+     (quoted_key) @font-lock-property-use-face
      (table ("[" @font-lock-bracket-face
              (_) @font-lock-type-face
              "]" @font-lock-bracket-face))
index dc0fa00df2709646dbfdb153c1e1c8f2dcd0e41a..dfa8d22fb3475968c2f5cb86081775b2fa1bfe7d 100644 (file)
    :feature 'property
    :override t
    '((block_mapping_pair
-      key: (flow_node (plain_scalar (string_scalar) @font-lock-property-ref-face)))
+      key: (flow_node (plain_scalar (string_scalar) @font-lock-property-use-face)))
      (block_mapping_pair
       key: (flow_node
-            [(double_quote_scalar) (single_quote_scalar)] @font-lock-property-ref-face))
+            [(double_quote_scalar) (single_quote_scalar)] @font-lock-property-use-face))
      (flow_mapping
-      (_ key: (flow_node (plain_scalar (string_scalar) @font-lock-property-ref-face))))
+      (_ key: (flow_node (plain_scalar (string_scalar) @font-lock-property-use-face))))
      (flow_mapping
       (_ key:
          (flow_node
-          [(double_quote_scalar) (single_quote_scalar)] @font-lock-property-ref-face)))
+          [(double_quote_scalar) (single_quote_scalar)] @font-lock-property-use-face)))
      (flow_sequence
-      (_ key: (flow_node (plain_scalar (string_scalar) @font-lock-property-ref-face))))
+      (_ key: (flow_node (plain_scalar (string_scalar) @font-lock-property-use-face))))
      (flow_sequence
       (_ key:
          (flow_node
-          [(double_quote_scalar) (single_quote_scalar)] @font-lock-property-ref-face))))
+          [(double_quote_scalar) (single_quote_scalar)] @font-lock-property-use-face))))
 
    :language 'yaml
    :feature 'error