[Top][All Lists]

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

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

From: martin rudalics
Subject: bug#8865: 24.0.50; `display-buffer' does not respect `pop-up-frames'
Date: Wed, 15 Jun 2011 11:24:31 +0200
User-agent: Thunderbird (Windows/20090302)

> (Non-nil is not the same as non-t, BTW, for both `pop-up-frames' and the
> NOT-THIS-WINDOW arg of `display-buffer'.  If you were speaking about that arg,
> then any non-nil value has always had the same behavior as a value of
> t.

This is no more the case.  That argument is called SPECIFIERS now and
certain values (like lists and certain symbols) will be reserved for a
different behavior.  If you don't like such a change, you will have to
talk to someone else; I already mentioned Juri and Stefan as potential

Meanwhile I can offer the below substitute for
`display-buffer-normalize-specifiers-1' which should address most of
your concerns in this area.


(defun display-buffer-normalize-specifiers-1 (specifiers)
  "Subroutine of `display-buffer-normalize-specifiers'.
SPECIFIERS is the SPECIFIERS argument of `display-buffer'."
  (let (normalized entry)
     ((not specifiers)
     ((listp specifiers)
      ;; If SPECIFIERS is a list, we assume it is a list of specifiers.
      (dolist (specifier specifiers)
         ((consp specifier)
          (setq normalized (cons specifier normalized)))
         ((symbolp specifier)
          ;; Might be a macro specifier, try to expand it (the cdr is a
          ;; list and we have to reverse it later, so do it one at a
          ;; time).
          (let ((entry (assq specifier display-buffer-macro-specifiers)))
            (dolist (item (cdr entry))
              (setq normalized (cons item normalized)))))))
      ;; Reverse list.
      (nreverse normalized))
     ((and (not (eq specifiers 'other-window))
           (setq entry (assq specifiers display-buffer-macro-specifiers)))
      ;; A macro specifier.
      (cdr entry))
     ((memq pop-up-frames '(nil unset))
      ;; Pop up a new window.
      (cdr (assq 'other-window display-buffer-macro-specifiers)))
      ;; Pop up a new frame.
      (cdr (assq 'other-frame display-buffer-macro-specifiers))))))

reply via email to

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