diff options
author | Kevin Brubeck Unhammer <unhammer@fsfe.org> | 2020-08-05 11:13:51 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-08-05 11:13:51 +0200 |
commit | c72b734c917f635fac09f691e91d3391b00b96f2 (patch) | |
tree | bb21e0c8733da4d96d7f8e400fdea444076938af | |
parent | a59296d9984023960453322ff7d664ec79250f7a (diff) | |
download | emacs-c72b734c917f635fac09f691e91d3391b00b96f2.tar.gz |
Further fix for erc-generate-new-buffer-name
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fix buffer name
generation when there's two networks on the same
server:port (bug#40121).
-rw-r--r-- | lisp/erc/erc.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 927546abc30..62aa76d25c8 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1630,9 +1630,10 @@ symbol, it may have these values: (and (erc-server-buffer-p) (not (erc-server-process-alive))))) ;; Channel buffer; check that it's from the right server. - (with-current-buffer (get-buffer candidate) - (and (string= erc-session-server server) - (erc-port-equal erc-session-port port))))) + (and target + (with-current-buffer (get-buffer candidate) + (and (string= erc-session-server server) + (erc-port-equal erc-session-port port)))))) (setq buffer-name candidate))) ;; if buffer-name is unset, neither candidate worked out for us, ;; fallback to the old <N> uniquification method: |