bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#38257: Acknowledgement (27.0.50; ERC does not match or highlight nic


From: Amin Bandali
Subject: bug#38257: Acknowledgement (27.0.50; ERC does not match or highlight nick surrounded by parens)
Date: Wed, 20 Nov 2019 01:04:33 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Here’s a v2 that fixes the issue for
apostrophes as well, with a slightly tweaked
commit message.

>From 1185e528641cbce618db93aa6604899e79300522 Mon Sep 17 00:00:00 2001
From: Amin Bandali <bandali@gnu.org>
Date: Mon, 18 Nov 2019 10:24:48 -0500
Subject: [PATCH v2] Improve ERC's matching of nicks (bug#38257)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/erc/erc-{button,match}.el (erc-{button,match}-syntax-table):
Omit (, ), and '; as they're not valid nick characters, per RFC 2812
section 2.3.1.  This enables correct matching/highlighting of nicks
when they’re surrounded by parens, like (nick), and when adjacent to
an apostrophy, like nick's.
---
 lisp/erc/erc-button.el | 3 ---
 lisp/erc/erc-match.el  | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index ec70260146..002b99520a 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -223,14 +223,11 @@ erc-button-keymap
 
 (defvar erc-button-syntax-table
   (let ((table (make-syntax-table)))
-    (modify-syntax-entry ?\( "w" table)
-    (modify-syntax-entry ?\) "w" table)
     (modify-syntax-entry ?\[ "w" table)
     (modify-syntax-entry ?\] "w" table)
     (modify-syntax-entry ?\{ "w" table)
     (modify-syntax-entry ?\} "w" table)
     (modify-syntax-entry ?` "w" table)
-    (modify-syntax-entry ?' "w" table)
     (modify-syntax-entry ?^ "w" table)
     (modify-syntax-entry ?- "w" table)
     (modify-syntax-entry ?_ "w" table)
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el
index e9ed735516..336040a374 100644
--- a/lisp/erc/erc-match.el
+++ b/lisp/erc/erc-match.el
@@ -246,14 +246,11 @@ erc-match-exclude-server-buffer
 ;; just put it in erc.el
 (defvar erc-match-syntax-table
   (let ((table (make-syntax-table)))
-    (modify-syntax-entry ?\( "w" table)
-    (modify-syntax-entry ?\) "w" table)
     (modify-syntax-entry ?\[ "w" table)
     (modify-syntax-entry ?\] "w" table)
     (modify-syntax-entry ?\{ "w" table)
     (modify-syntax-entry ?\} "w" table)
     (modify-syntax-entry ?` "w" table)
-    (modify-syntax-entry ?' "w" table)
     (modify-syntax-entry ?^ "w" table)
     (modify-syntax-entry ?- "w" table)
     (modify-syntax-entry ?_ "w" table)
-- 
2.23.0


reply via email to

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