Subject: Re: bug#17809: 24.4.50; Completions display

From: Stefan Monnier <[email-masked]>
Date: Sun, 06 Jul 2014 00:32:46 -0400

> +(defmacro with-displayed-buffer-window (buffer-or-name action quit-function &rest body)

That looks OK.  Two details, tho:

> +	 (setq ,window (temp-buffer-window-show ,buffer ,action)))
[...]
> +       (when (functionp (cdr (assq 'window-height (cdr ,action))))

Let's not evaluate `action' twice.  I.e. we need a (macroexp-let2 ..)
wrapper for it.

> +       (if (functionp ,quit-function)
> +	   (funcall ,quit-function ,window ,value)

Same for quit-function, and additionally, we want to make sure we
evaluate `quit-function' before `body'.

        Stefan