[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2f5d47b 1/3: Ignore all-whitespace topics in erc
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 2f5d47b 1/3: Ignore all-whitespace topics in erc |
Date: |
Sat, 14 Apr 2018 14:54:40 -0400 (EDT) |
branch: master
commit 2f5d47b1df0248a6fd14b65889e564859cf305c8
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Ignore all-whitespace topics in erc
* lisp/erc/erc.el (erc-cmd-TOPIC): Ignore all-whitespace topics
(bug#25153).
---
lisp/erc/erc.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 6322851..f1e21c9 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -3693,8 +3693,10 @@ be displayed."
((string-match "^\\s-*\\([&#+!]\\S-+\\)\\s-\\(.*\\)$" topic)
(let ((ch (match-string 1 topic))
(topic (match-string 2 topic)))
- (erc-log (format "cmd: TOPIC [%s]: %s" ch topic))
- (erc-server-send (format "TOPIC %s :%s" ch topic) nil ch))
+ ;; Ignore all-whitespace topics.
+ (unless (equal (string-trim topic) "")
+ (erc-log (format "cmd: TOPIC [%s]: %s" ch topic))
+ (erc-server-send (format "TOPIC %s :%s" ch topic) nil ch)))
t)
;; /topic #channel
((string-match "^\\s-*\\([&#+!]\\S-+\\)" topic)