diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 859dc175e5..1f82924d98 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1556,10 +1556,11 @@ rcirc-clean-up-buffer (defun rcirc-generate-new-buffer-name (process target) "Return a buffer name based on PROCESS and TARGET. This is used for the initial name given to IRC buffers." - (substring-no-properties - (if target - (concat target "@" (process-name process)) - (concat "*" (process-name process) "*")))) + (generate-new-buffer + (substring-no-properties + (if target + (concat target "@" (process-name process)) + (concat "*" (process-name process) "*"))))) (defun rcirc-get-buffer (process target &optional server) "Return the buffer associated with the PROCESS and TARGET.