* riece-message.el (riece-display-message): When filter-function
[riece] / lisp / riece-message.el
index 0ed4602..c943e50 100644 (file)
                  (riece-message-target message))))
     (unless (riece-identity-member target riece-current-channels)
       (riece-join-channel target)
-      ;; If you are not joined any channel,
+      ;; If you are not joined to any channel,
       ;; switch to the target immediately.
       (unless riece-current-channel
        (riece-switch-to-channel target)))
@@ -181,7 +181,7 @@ Normally they are *Dialogue* and/or *Others*."
   "Display MESSAGE object."
   (let ((functions riece-message-filter-functions))
     (setq message (copy-sequence message))
-    (while functions
+    (while (and functions message)
       (setq message (funcall (car functions) message)
            functions (cdr functions)))
     (if message