emacs-devel
[Top][All Lists]
Advanced

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

Re: help-window-select and info-lookup-symbol


From: martin rudalics
Subject: Re: help-window-select and info-lookup-symbol
Date: Sun, 26 Jul 2009 13:00:33 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

>> IIUC in that case a `display-buffer' following another would wipe out
>> the variable set by the former.  The problem is with recognizing whether
>> the buffer `display-buffer' is going to replace in some window was a
>> buffer the user switched to "manually" or "automatically".  In the
>> former case `display-buffer' should remember the buffer in its
>> `old-buffer' variable while in the latter it should leave that variable
>> alone.  Currently `display-buffer' has no means to distinguish these
>> cases.
>
> I was thinking that a new function or macro would delete the
> buffer-local variable before displaying the buffer, something like
> with-help-window.  display-buffer would be called in the process but
> display-buffer would know nothing about the buffer-local variable.

The functions that could safely decide whether a buffer-local-variable
shall be deleted is the "any function calling `display-buffer' but the
help/info type ones".  It's impossible to enumerate them all because
someone might add a new one tomorrow.

What could be done is provide a variable `do-not-wipe-out-old-value'
which is normally nil but the help/info type functions bind to t around
their `display-buffer' calls.  And `display-buffer' wouldn't wipe out
the old value if that variable is t.

martin




reply via email to

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