From cf3aa21bc8ccc839279c335b8fda3a433b653329 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 9 Feb 2012 15:27:54 -0500 Subject: [PATCH] * lisp/files.el (rename-uniquely): Doc fix. (Bug#3806) --- lisp/ChangeLog | 2 ++ lisp/files.el | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 254e1226a07..7a3f15d42f7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2012-02-09 Glenn Morris + * files.el (rename-uniquely): Doc fix. (Bug#3806) + * progmodes/cc-guess.el (c-guess-offset-threshold, c-guess-region-max): Add :version tags. diff --git a/lisp/files.el b/lisp/files.el index 8a65bc5f81f..7bb44098223 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4863,7 +4863,13 @@ like `write-region' does." (defun rename-uniquely () "Rename current buffer to a similar name not already taken. This function is useful for creating multiple shell process buffers -or multiple mail buffers, etc." +or multiple mail buffers, etc. + +Note that some commands, in particular those based on `compilation-mode' +\(`compile', `grep', etc.) will reuse the current buffer if it has the +appropriate mode even if it has been renamed. So as well as renaming +the buffer, you also need to switch buffers before running another +instance of such commands." (interactive) (save-match-data (let ((base-name (buffer-name))) -- 2.39.2