From: Lars Ingebrigtsen Date: Sat, 14 Apr 2018 18:37:09 +0000 (+0200) Subject: Ignore all-whitespace topics in erc X-Git-Tag: emacs-27.0.90~5217 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2f5d47b1df0248a6fd14b65889e564859cf305c8;p=emacs.git Ignore all-whitespace topics in erc * lisp/erc/erc.el (erc-cmd-TOPIC): Ignore all-whitespace topics (bug#25153). --- diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 63228516be7..f1e21c9a96f 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)