aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2012-02-09 15:27:54 -0500
committerGlenn Morris <[email protected]>2012-02-09 15:27:54 -0500
commitcf3aa21bc8ccc839279c335b8fda3a433b653329 (patch)
tree0d9af0ed14c03db863639d1cc78e1173f411ca2a
parentbbe531d6e2dd81be8b31b73d47b3de3cd0d82e90 (diff)
* lisp/files.el (rename-uniquely): Doc fix. (Bug#3806)
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/files.el8
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 254e1226a0..7a3f15d42f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
2012-02-09 Glenn Morris <[email protected]>
+ * 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 8a65bc5f81..7bb4409822 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)))