]> git.eshelyaron.com Git - emacs.git/commitdiff
(clone-buffer): Don't show the new buffer in the same window.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 23 Jan 2006 04:05:59 +0000 (04:05 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 23 Jan 2006 04:05:59 +0000 (04:05 +0000)
lisp/ChangeLog
lisp/simple.el

index 3293681e24899ad05a4d4452ad933f79ccb95cbc..98cf5842e5219f5a4abaa138460f6134f2ece121 100644 (file)
@@ -1,3 +1,7 @@
+2006-01-22  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * simple.el (clone-buffer): Don't show the new buffer in the same window.
+
 2006-01-23  Juri Linkov  <juri@jurta.org>
 
        * faces.el (link, link-visited): New faces based on default values
index 346a242c0421012a38e7772b5b1a71a530b068de..db040afcae9a162863904f7ff5ec3153dab8a3e6 100644 (file)
@@ -1,7 +1,7 @@
 ;;; simple.el --- basic editing commands for Emacs
 
 ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-;;   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;;   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: internal
@@ -5244,7 +5244,12 @@ after it has been set up properly in other respects."
       ;; Run any hooks (typically set up by the major mode
       ;; for cloning to work properly).
       (run-hooks 'clone-buffer-hook))
-    (if display-flag (pop-to-buffer new))
+    (if display-flag
+        ;; Presumably the current buffer is shown in the selected frame, so
+        ;; we want to display the clone elsewhere.
+        (let ((same-window-regexps nil)
+              (same-window-buffer-names))
+          (pop-to-buffer new)))
     new))