changeset 110427:1d2cc4dc816f

* lisp/frame.el (make-frame-names-alist): Don't list frames on other displays.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 19 Sep 2010 11:53:28 +0200
parents cd8d9630f156
children 6060b86fc551
files lisp/ChangeLog lisp/frame.el
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Sep 19 11:32:52 2010 +0200
+++ b/lisp/ChangeLog	Sun Sep 19 11:53:28 2010 +0200
@@ -1,5 +1,7 @@
 2010-09-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* frame.el (make-frame-names-alist): Don't list frames on other displays.
+
 	* fringe.el (fringe-styles): New var.
 	(fringe-mode, fringe-query-style): Use it.
 
--- a/lisp/frame.el	Sun Sep 19 11:32:52 2010 +0200
+++ b/lisp/frame.el	Sun Sep 19 11:53:28 2010 +0200
@@ -907,15 +907,16 @@
      (t (suspend-emacs)))))
 
 (defun make-frame-names-alist ()
+  ;; Only consider the frames on the same display.
   (let* ((current-frame (selected-frame))
 	 (falist
 	  (cons
 	   (cons (frame-parameter current-frame 'name) current-frame) nil))
-	 (frame (next-frame nil t)))
+	 (frame (next-frame nil 0)))
     (while (not (eq frame current-frame))
       (progn
-	(setq falist (cons (cons (frame-parameter frame 'name) frame) falist))
-	(setq frame (next-frame frame t))))
+	(push (cons (frame-parameter frame 'name) frame) falist)
+	(setq frame (next-frame frame 0))))
     falist))
 
 (defvar frame-name-history nil)