[Top][All Lists]

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

Re: display-buffer-alist simplifications

From: Chong Yidong
Subject: Re: display-buffer-alist simplifications
Date: Mon, 08 Aug 2011 16:51:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Should I write a new function and use it like:
>>   (setq display-buffer-alist '(
>>     ("*Help*" display-buffer-other-window-same-frame-or-same-window)))
> Yes, I think that would be the answer.

Except that this should be a list of rules, because you don't want to
force users to define a new function each time they want to "chain" two
rules together.  So this becomes

  (setq display-buffer-alist
    '(("*Help*" rule-1 rule-2)))

But if you want to be able to pass extra parameters to the rule
functions (so that you don't have to define a new function for every
combination of window-choosing behaviors), you can generalize this to
something like

  (setq display-buffer-alist
    '(("*Help*" (rules rule-1 rule-2)
                (param-1 foo)
                (param-2 bar))))

which is basically the same scheme I suggested earlier.

reply via email to

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