emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: pending-undo-list is not buffer local


From: Lennart Borgman (gmail)
Subject: Re: pending-undo-list is not buffer local
Date: Mon, 23 Apr 2007 16:31:09 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666

martin rudalics wrote:
> > I think for the reason above that it should be buffer local and I also
 >      > think that it should be permanent buffer local then.
 >
 >     I think this wouldn't make much sense since `buffer-undo-list' isn't
 >     permanently buffer-local either.
 >
 > It is, practically speaking.  It is buffer-local, and changing major
 > modes does not clear it out.

Like `buffer-file-name'.  Would it make sense to introduce a variable,
say `buffer-file-name-extension', assign its initial value from
`buffer-file-name', make it a permanent buffer-local, and hope that the
value of the new variable always correctly reflects the extension of
`buffer-file-name' without any additional provisions?

Various parts of Emacs manipulate `buffer-undo-list' in various ways.
`revert-buffer' may reset it.  Some applications temporarily bind it to
t to avoid, for example, recording text property changes.  Finally undo
recording may be switched off.  Should `pending-undo-list' be affected
by all these and how?

I actually assume that the logic around pending-undo-list is correct. That part will not break.

I am a bit worried that the wrong pending-undo-list will be used because of buffer switching, but not very much, since buffer-undo-list is buffer local and those two are used together. (It have to be tested of course.)




reply via email to

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