aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Goerzen2018-04-14 20:10:53 +0200
committerLars Ingebrigtsen2018-04-14 20:10:53 +0200
commitcdefc045893a7fed57856ac385ab41c71f61c09f (patch)
tree8c7f4641d49f18beca9de3b2cce898c6282a5e6a
parent369cb30d8cc9b2c1eee8ed21cca89e0277f8d61d (diff)
downloademacs-cdefc045893a7fed57856ac385ab41c71f61c09f.tar.gz
emacs-cdefc045893a7fed57856ac385ab41c71f61c09f.zip
Subject: Fix problem with erc buffer renames after reconnect
* lisp/erc/erc.el (erc-generate-new-buffer-name): Solve problem with renamed buffers on different servers after reconnect (bug#30639). Copyright-paperwork-exempt: yes
-rw-r--r--lisp/erc/erc.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 550800c57f2..63228516be7 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1608,18 +1608,18 @@ symbol, it may have these values:
1608 (dolist (candidate (list buf-name (concat buf-name "/" server))) 1608 (dolist (candidate (list buf-name (concat buf-name "/" server)))
1609 (if (and (not buffer-name) 1609 (if (and (not buffer-name)
1610 erc-reuse-buffers 1610 erc-reuse-buffers
1611 (get-buffer candidate) 1611 (or (not (get-buffer candidate))
1612 (or target 1612 (or target
1613 (with-current-buffer (get-buffer candidate)
1614 (and (erc-server-buffer-p)
1615 (not (erc-server-process-alive)))))
1613 (with-current-buffer (get-buffer candidate) 1616 (with-current-buffer (get-buffer candidate)
1614 (and (erc-server-buffer-p) 1617 (and (string= erc-session-server server)
1615 (not (erc-server-process-alive))))) 1618 (erc-port-equal erc-session-port port)))))
1616 (with-current-buffer (get-buffer candidate)
1617 (and (string= erc-session-server server)
1618 (erc-port-equal erc-session-port port))))
1619 (setq buffer-name candidate))) 1619 (setq buffer-name candidate)))
1620 ;; if buffer-name is unset, neither candidate worked out for us, 1620 ;; if buffer-name is unset, neither candidate worked out for us,
1621 ;; fallback to the old <N> uniquification method: 1621 ;; fallback to the old <N> uniquification method:
1622 (or buffer-name (generate-new-buffer-name buf-name)) )) 1622 (or buffer-name (generate-new-buffer-name (concat buf-name "/" server)))))
1623 1623
1624(defun erc-get-buffer-create (server port target) 1624(defun erc-get-buffer-create (server port target)
1625 "Create a new buffer based on the arguments." 1625 "Create a new buffer based on the arguments."