[Top][All Lists]
[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: |
Tue, 21 Jul 2009 16:12:38 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
> We do it by walking windows before and after display-buffer. I guess
> that window-config objects also contain the information it's just not
> accessible from Lisp.
AFAICT they don't have it. It would be very simple to have window.el
provide a global variable that has the necessary information.
`with-help-window' could use it as well. BTW you don't restore
`window-start' and `window-point' when you restore the buffer?
> That's the code that stashes the data into the buffer-local variable:
>
> (defun slime-display-popup-buffer (select)
> "Display the current buffer.
> Save the selected-window in a buffer-local variable, so that we
> can restore it later."
> (let ((selected-window (selected-window))
> (old-windows))
> (walk-windows (lambda (w) (push (cons w (window-buffer w)) old-windows))
> nil t)
> (let ((new-window (display-buffer (current-buffer))))
> (unless slime-popup-restore-data
> (set (make-local-variable 'slime-popup-restore-data)
> (list new-window
> selected-window
> (cdr (find new-window old-windows :key #'car)))))
> (when select
> (select-window new-window))
> (current-buffer))))
Doesn't that fail when you manually switch to a buffer B in such a
window? In that case `slime-popup-restore-data' would remain non-nil
and a later call of `slime-display-popup-buffer' would not save the
value of B.
martin
- help-window-select and info-lookup-symbol, Helmut Eller, 2009/07/19
- Re: help-window-select and info-lookup-symbol, martin rudalics, 2009/07/20
- Re: help-window-select and info-lookup-symbol, Helmut Eller, 2009/07/21
- Re: help-window-select and info-lookup-symbol, martin rudalics, 2009/07/21
- Re: help-window-select and info-lookup-symbol, Helmut Eller, 2009/07/21
- Re: help-window-select and info-lookup-symbol,
martin rudalics <=
- Re: help-window-select and info-lookup-symbol, Helmut Eller, 2009/07/21
- Re: help-window-select and info-lookup-symbol, martin rudalics, 2009/07/22
- Re: help-window-select and info-lookup-symbol, Helmut Eller, 2009/07/22
- Re: help-window-select and info-lookup-symbol, martin rudalics, 2009/07/26
- Re: help-window-select and info-lookup-symbol, Helmut Eller, 2009/07/26
- Re: help-window-select and info-lookup-symbol, martin rudalics, 2009/07/26
- Re: help-window-select and info-lookup-symbol, Helmut Eller, 2009/07/26
- Re: help-window-select and info-lookup-symbol, martin rudalics, 2009/07/26