* riece-display.el (riece-inhibit-update-buffers): New variable.
[elisp/riece.git] / lisp / riece-identity.el
index 3f7e2a1..f56e62c 100644 (file)
@@ -83,22 +83,13 @@ RFC2812, 2.2 \"Character codes\" says:
   "Return non-nil if an identity ELT is an element of LIST."
   (catch 'found
     (while list
-      (if (and (vectorp (car list))
+      (if (and (vectorp (car list))    ;needed because
+                                       ;riece-current-channels
+                                       ;contains nil.
               (riece-identity-equal (car list) elt))
          (throw 'found list)
        (setq list (cdr list))))))
 
-(defun riece-identity-member-no-server (elt list)
-  "Return non-nil if an identity ELT is an element of LIST.
-The only difference with `riece-identity-member', this function doesn't
-take server names into account."
-  (catch 'found
-    (while list
-      (if (and (vectorp (car list))
-              (riece-identity-equal-no-server (car list) elt))
-         (throw 'found list)
-       (setq list (cdr list))))))
-
 (defun riece-identity-assoc (elt alist)
   "Return non-nil if an identity ELT matches the car of an element of ALIST."
   (catch 'found
@@ -132,7 +123,7 @@ take server names into account."
      (if process
         (with-current-buffer (process-buffer process)
           ,@body)
-       (error "Server closed."))))
+       (error "Server closed"))))
 
 (put 'riece-with-identity-buffer 'lisp-indent-function 1)
 
@@ -160,9 +151,10 @@ take server names into account."
   (let* ((decoded
          (completing-read
           prompt
-          (delq nil (mapcar (lambda (channel)
-                              (list (riece-decode-identity channel)))
-                            (or channels riece-current-channels)))
+          (mapcar (lambda (channel)
+                    (list (riece-decode-identity channel)))
+                  (delq nil (copy-sequence (or channels
+                                               riece-current-channels))))
           predicate must-match))
         (encoded
          (riece-encode-identity decoded)))