GNU bug report logs -
#38257
27.0.50; ERC does not match or highlight nick surrounded by parens
Previous Next
Reported by: Amin Bandali <bandali <at> gnu.org>
Date: Mon, 18 Nov 2019 15:41:02 UTC
Severity: minor
Tags: patch
Merged with 38366
Found in versions 25.1, 27.0.50
Fixed in version 27.1
Done: Amin Bandali <bandali <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 38257 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Here’s a v2 that fixes the issue for
apostrophes as well, with a slightly tweaked
commit message.
[0001-Improve-ERC-s-matching-of-nicks-bug-38257.patch (text/x-diff, inline)]
From 1185e528641cbce618db93aa6604899e79300522 Mon Sep 17 00:00:00 2001
From: Amin Bandali <bandali <at> 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
This bug report was last modified 5 years and 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.