Subject: RE: bug#8865: 24.0.50; `display-buffer' does not respect `pop-up-frames'

From: "Drew Adams" <[email-masked]>
Date: Thu, 16 Jun 2011 07:01:54 -0700

>  > BTW, can you tell me what is a reasonable substitute for tests of
>  > `pop-up-frames' now?  That is, what to do about code that 
>  > has (if pop-up-frames ...)?  What is the replacement for such
>  > a test in Emacs 24?  Thx.
> 
> Please decide together with David Engster where to bring the current
> discussion of bug#8857 to and try to give it an appropriate title.

Sorry, I haven't followed that bug at all, and I have no idea what you're saying
here.

> I can't find the idiom (if pop-up-frames in the current trunk
> so I would first like to know why and how it is used.

How about looking at the Emacs sources before you made your changes? ;-)  If you
grep the Emacs 20, 21, 22, or 23 Lisp source code for `pop-up-frames' you will
see lots of hits, some of which are tests of its value.  For example (Emacs
23.3):

>From help.el:
(cond ((or pop-up-frames...)...)

>From pcvs-util.el
(let ((pop-up-windows (or pop-up-windows pop-up-frames))

>From diary-lib.el
(let* ((pop-up-frames (or pop-up-frames ...

>From rmailsum.el
(if (and (one-window-p) pop-up-windows (not pop-up-frames))

>From sendmail.el
(if (and (or nil ; ??????
             ...
             (and pop-up-frames (one-window-p))...)

>From inf-lisp.el
(let ((pop-up-frames
       ;; Be willing to use another frame
       ;; that already has the window in it.
       (or pop-up-frames
           (get-buffer-window inferior-lisp-buffer t))))

Anyway, I meant in user code - my code.  I'm not trying to update the Emacs
sources.

I use such tests in only a couple of places.  They are of course based on the
(original) meaning of `pop-up-frames': non-nil means `display-buffer' uses a
separate frame.  Nothing special.

So the question is how to test that user intention using the latest Emacs
design.  From my code:

;; If non-nil `pop-up-frames' then inhibit showing annotation.
(let ((bookmark-automatically-show-annotations
       (and bookmark-automatically-show-annotations
            (not pop-up-frames))))

;; Use separate frames instead of windows if `pop-up-frames'
;; is non-nil or if prefix arg is negative.
(cond (...)
      ((or pop-up-frames option)
       (while file-list (find-file-other-frame...