Subject: bug#49690: 28.0.50; ERC makes a button of `let' but not `let*'

From: "J.P." <[email-masked]>
Date: Thu, 22 Jul 2021 05:28:14 -0700

Emanuel Berg <[email-masked]> writes:

> Maybe has something to do with asterisk? :)

Sounds reasonable to me.

As a quick experiment, adding the rest of the symbol constituents (of
the visible ASCII complement from `lisp-data-mode-syntax-table') to the
relevant `erc-button-alist' member's regexp appears to open things up.
At least it makes `let*' and `ring-insert+extend' light up, as well as
`-->' and `dash-expand:&hash?'. But who knows? Maybe folks more familiar
with this module will have brighter ideas.

(Also, it looks like this stuff touches every message, so we should
probably be somewhat careful.)

>From 005ba012f497d86ec2337bb484d3098df4001039 Mon Sep 17 00:00:00 2001
From: "F. Jason Park" <[email-masked]>
Date: Thu, 22 Jul 2021 04:13:42 -0700
Subject: [PATCH] Expand erc-button-list regexp for lisp symbols

* lisp/erc/erc-button.el (erc-button-list): Add additional
non-alphanumeric characters to elisp regexp so symbols like `let*' are
recognized.
---
 lisp/erc/erc-button.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index cb9af92ba1..272734785d 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -130,7 +130,8 @@ erc-button-alist
     ("<URL: *\\([^<> ]+\\) *>" 0 t browse-url-button-open-url 1)
 ;;; ("(\\(\\([^~\n \t@][^\n \t@]*\\)@\\([a-zA-Z0-9.:-]+\\)\\)" 1 t finger 2 3)
     ;; emacs internal
-    ("[`]\\([a-zA-Z][-a-zA-Z_0-9]+\\)[']" 1 t erc-button-describe-symbol 1)
+    ("[`]\\([-a-zA-Z!$%&*+./:<=>?@^_{|}~][-a-zA-Z_0-9!$%&*+./:<=>?@^_{|}~]+\\)[']"
+     1 t erc-button-describe-symbol 1)
     ;; pseudo links
     ("\\bInfo:[\"]\\([^\"]+\\)[\"]" 0 t Info-goto-node 1)
     ("\\b\\(Ward\\|Wiki\\|WardsWiki\\|TheWiki\\):\\([A-Z][a-z]+\\([A-Z][a-z]+\\)+\\)"
-- 
2.31.1