]> git.eshelyaron.com Git - emacs.git/commitdiff
Backport: Avoid error when process-contact returns t in rcirc
authorLeo Liu <sdl.web@gmail.com>
Sun, 24 Jun 2012 02:34:52 +0000 (10:34 +0800)
committerLeo Liu <sdl.web@gmail.com>
Sun, 24 Jun 2012 02:34:52 +0000 (10:34 +0800)
lisp/ChangeLog
lisp/net/rcirc.el

index 6d51598a777bf2022adc200a884eb8752fd31815..3e75c2d718f069714388c8155b53af31c59b42bd 100644 (file)
@@ -1,5 +1,7 @@
 2012-06-24  Leo Liu  <sdl.web@gmail.com>
 
+       * net/rcirc.el (rcirc): Avoid error when process-contact returns t.
+
        * vc/diff-mode.el (diff-file-prev/next): Fix typo.
 
 2012-06-23  Leo Liu  <sdl.web@gmail.com>
index 1c74e6190dc4fdf75b3cae335393f70125e6f9b6..e34b7c79b3bae9df6b5598c0e517e04de9b79c19 100644 (file)
@@ -471,7 +471,8 @@ If ARG is non-nil, instead prompt for connection parameters."
                             rcirc-default-full-name))
              (channels (plist-get (cdr c) :channels))
               (password (plist-get (cdr c) :password))
-              (encryption (plist-get (cdr c) :encryption)))
+              (encryption (plist-get (cdr c) :encryption))
+              contact)
          (when server
            (let (connected)
              (dolist (p (rcirc-process-list))
@@ -483,10 +484,11 @@ If ARG is non-nil, instead prompt for connection parameters."
                                     full-name channels password encryption)
                    (quit (message "Quit connecting to %s" server)))
                (with-current-buffer (process-buffer connected)
-                 (setq connected-servers
-                       (cons (process-contact (get-buffer-process
-                                               (current-buffer)) :host)
-                             connected-servers))))))))
+                  (setq contact (process-contact
+                                 (get-buffer-process (current-buffer)) :host))
+                  (setq connected-servers
+                        (cons (if (stringp contact) contact server)
+                              connected-servers))))))))
       (when connected-servers
        (message "Already connected to %s"
                 (if (cdr connected-servers)