1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 10:31:37 -08:00

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).
This commit is contained in:
Kevin Brubeck Unhammer 2020-08-05 11:13:51 +02:00 committed by Lars Ingebrigtsen
parent a59296d998
commit c72b734c91

View file

@ -1630,9 +1630,10 @@ symbol, it may have these values:
(and (erc-server-buffer-p) (and (erc-server-buffer-p)
(not (erc-server-process-alive))))) (not (erc-server-process-alive)))))
;; Channel buffer; check that it's from the right server. ;; Channel buffer; check that it's from the right server.
(with-current-buffer (get-buffer candidate) (and target
(and (string= erc-session-server server) (with-current-buffer (get-buffer candidate)
(erc-port-equal erc-session-port port))))) (and (string= erc-session-server server)
(erc-port-equal erc-session-port port))))))
(setq buffer-name candidate))) (setq buffer-name candidate)))
;; if buffer-name is unset, neither candidate worked out for us, ;; if buffer-name is unset, neither candidate worked out for us,
;; fallback to the old <N> uniquification method: ;; fallback to the old <N> uniquification method: