diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index e4f65895de9..b21b0cf827e 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,5 +1,10 @@ 2014-10-02 Kelvin White + * erc.el (erc-rename-buffer-p): When set to t buffers will be + renamed to the current irc network. + (erc-format-target-and/or-network): Use `erc-rename-buffer-p' when + renaming buffers. + * erc-ring.el (erc-input-ring-setup): Fixes Bug #18599 2014-09-30 Stefan Monnier diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 51096bc2c15..cf82bafe6d0 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1792,6 +1792,10 @@ buffer rather than a server buffer.") "Used to keep track of how many times an attempt at changing nick is made.") (make-variable-buffer-local 'erc-nick-change-attempt-count) +(defvar erc-rename-buffer-p nil + "When this is set to t, buffers will be renamed to network name if available") +(make-variable-buffer-local 'erc-rename-buffer-p) + (defun erc-migrate-modules (mods) "Migrate old names of ERC modules to new ones." ;; modify `transforms' to specify what needs to be changed @@ -6227,7 +6231,8 @@ shortened server name instead." "@" network-name)) ((and network-name (not (get-buffer network-name))) - (rename-buffer network-name) + (when erc-rename-buffer-p + (rename-buffer network-name)) network-name) (t (buffer-name (current-buffer))))))