]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid "shadows" warning from erc-button--nick slots
authorF. Jason Park <jp@neverwas.me>
Sun, 25 Jun 2023 13:15:11 +0000 (06:15 -0700)
committerF. Jason Park <jp@neverwas.me>
Sun, 25 Jun 2023 23:27:58 +0000 (16:27 -0700)
* lisp/erc/erc-button.el (erc-button-nick): Rename slots that share
names with user options to avoid "lexical argument shadows the dynamic
variable" warning.
(erc-button-add-nickname-buttons): Remove "erc-button-" namespace from
slot accessors.

lisp/erc/erc-button.el

index 08610860630f92ec5a6bab1172f29aae04236b58..0c616a6026d5896f011592cf9a997bb8bb147215 100644 (file)
@@ -355,11 +355,11 @@ specified by `erc-button-alist'."
   ( cuser nil :type (or null erc-channel-user)
     ;; The CDR of a value from an `erc-channel-users' table.
     :documentation "A possibly nil `erc-channel-user'.")
-  ( erc-button-face erc-button-face :type symbol
+  ( face erc-button-face :type symbol
     :documentation "Temp `erc-button-face' while buttonizing.")
-  ( erc-button-nickname-face erc-button-nickname-face :type symbol
+  ( nickname-face erc-button-nickname-face :type symbol
     :documentation "Temp `erc-button-nickname-face' while buttonizing.")
-  ( erc-button-mouse-face erc-button-mouse-face :type symbol
+  ( mouse-face erc-button-mouse-face :type symbol
     :documentation "Temp `erc-button-mouse-face' while buttonizing."))
 
 ;; This variable is intended to serve as a "core" to be wrapped by
@@ -463,11 +463,11 @@ retrieve it during buttonizing via
                         (setq bounds (erc-button--nick-bounds obj)
                               data (erc-button--nick-data obj)
                               erc-button-mouse-face
-                              (erc-button--nick-erc-button-mouse-face obj)
+                              (erc-button--nick-mouse-face obj)
                               erc-button-nickname-face
-                              (erc-button--nick-erc-button-nickname-face obj)
+                              (erc-button--nick-nickname-face obj)
                               erc-button-face
-                              (erc-button--nick-erc-button-face obj))))
+                              (erc-button--nick-face obj))))
               (erc-button-add-button (car bounds) (cdr bounds)
                                      fun t data))))))))