* How to best use the display-buffer-function?
@ 2004-02-05 7:50 Klaus Berndl
0 siblings, 0 replies; only message in thread
From: Klaus Berndl @ 2004-02-05 7:50 UTC (permalink / raw)
Suppose i want to some checks before `display-buffer'. If the checks are true
then i always want to display the buffer in a special window at my frame, if
the checks fail i want to proceed with standard display-buffer, i.e.
`display-buffer' should choose the window according to all its rules.
Currently i have something like (simplified):
(defun my-display-buffer-function (buffer not-this-window)
(if (my-pre-checks)
;; then display the BUFFER in a special window at the frame
(my-display-buffer-in-special-window buffer)
;; otherwise delegate the buffer-display to the original `display-buffer'
(let ((display-buffer-function nil))
(display-buffer buffer not-this-window))))
(setq display-buffer-function my-display-buffer-function)
Is this a good way to do this?
Another question: Why a display-buffer-function gets only two args and not
three like the `display-buffer'?
Thanks for comments, hints and help,
Klaus
--
Klaus Berndl mailto: klaus.berndl@sdm.de
sd&m AG http://www.sdm.de
software design & management
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-392, Fax -220
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-02-05 7:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-05 7:50 How to best use the display-buffer-function? Klaus Berndl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).