[Top][All Lists]

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

Re: Window configurations

From: martin rudalics
Subject: Re: Window configurations
Date: Thu, 03 Jun 2010 10:57:30 +0200
User-agent: Thunderbird (Windows/20090302)

>> (let ((list (list "*scratch*")))
>>   (set-frame-parameter nil 'buffer-list (setcdr list list))
>>   (buffer-list (selected-frame)))
> This is unfair ;-) You can break almost everything with a cyclic list.

But usually you can quit via C-g.  This case has a special history: Once
upon a time Vbuffer_alist "used to be a variable, but is no longer, to
prevent lossage due to user rplac'ing this alist or its elements".  Then
eventually Richard decided to "not use Frassq, Fmemq or Fdelq since
their loops allow quitting.  Write a special loop by hand." which was
still OK because Vbuffer_alist was no longer accessible from Elisp.
Next we got frame local buffer lists and finally someone decided to
allow setting a frame's buffer list from Elisp ...

I think two things have to be done here: Remove the special constructs
that don't allow quitting.  They are hardly useful today.  Moreover,
there are routines operating on buffer lists that _do allow quitting_
like unrecord_buffer so the original motivation is moot anyway (unless
we want unrecord_buffer use a construct like record_buffer).

In addition we should disallow changing a frame's buffer and buried
buffer lists by setting the corresponding frame's parameter.  I think
this was part of an attempt to make each and every frame related object
part of a frame's parameters.  But an application should not be allowed
to alter the history of buffers shown on a particular frame.  Let's
leave such activities to politicians - that's what they get paid for.

> However, I'd like to fix the invalid frame case for
> `(other-buffer nil nil 1)' with:



reply via email to

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