emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buffer listing in multiple frames/ttys


From: Lőrentey Károly
Subject: Re: Buffer listing in multiple frames/ttys
Date: Sat, 03 Dec 2005 18:03:36 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.52 (gnu/linux)

Juri Linkov <address@hidden> writes:
> The current implementation of `buffer-list' frame parameter doesn't
> preserve the correct ordering of buffers selected in the same frame.
>
> After using `next-window' in one frame, `previous-window' in another
> frame gets the buffer buried in the first frame, but not in the
> same frame where it is called.
>
> Since two commands `next-window' and `previous-window' make a ring
> from the buffer list, this ring becomes broken when used in two or
> more frames.

I think you mean `next-buffer' and `prev-buffer' here, no?
Does this patch fix it?

*** lisp/simple.el~     2005-11-30 19:55:19.000000000 +0100
--- lisp/simple.el      2005-12-03 16:29:55.000000000 +0100
***************
*** 62,68 ****
  (defun prev-buffer ()
    "Switch to the previous buffer in cyclic order."
    (interactive)
!   (let ((list (nreverse (buffer-list)))
        found)
      (while (and (not found) list)
        (let ((buffer (car list)))
--- 62,70 ----
  (defun prev-buffer ()
    "Switch to the previous buffer in cyclic order."
    (interactive)
!   (let ((list (nconc ;; Consider the locally used buffers first.
!              (reverse (frame-parameter nil 'buffer-list))
!              (nreverse (buffer-list))))
        found)
      (while (and (not found) list)
        (let ((buffer (car list)))
-- 
Károly

Attachment: pgp6Ra9Yq4_C2.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]