]> git.eshelyaron.com Git - emacs.git/commitdiff
Ignore all-whitespace topics in erc
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Apr 2018 18:37:09 +0000 (20:37 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 Apr 2018 18:37:09 +0000 (20:37 +0200)
* lisp/erc/erc.el (erc-cmd-TOPIC): Ignore all-whitespace topics
(bug#25153).

lisp/erc/erc.el

index 63228516be71b726a9791cef13c6f5217ae547c4..f1e21c9a96f92f402b3c487af9c25c1ac60251f5 100644 (file)
@@ -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)