emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r104622: Additional fixes in handling


From: martin rudalics
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104622: Additional fixes in handling of buffer display specifiers.
Date: Sat, 18 Jun 2011 16:23:14 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104622
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Sat 2011-06-18 16:23:14 +0200
message:
  Additional fixes in handling of buffer display specifiers.
  
  * window.el (display-buffer-default-specifiers): Remove
  pop-up-frame.  Add pop-up-window-min-height,
  pop-up-window-min-width, and another reuse-window specifier
  (Bug#8882).  Reported by Dan Nicolaescu <address@hidden>.
  (display-buffer-normalize-specifiers-2): Handle
  split-height-threshold and split-width-threshold also when
  pop-up-windows is unset.  Add a reuse-window specifier for the
  case popping up a new window fails.
  (special-display-popup-frame): Remove double quoting.
modified:
  lisp/ChangeLog
  lisp/window.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-06-17 18:52:46 +0000
+++ b/lisp/ChangeLog    2011-06-18 14:23:14 +0000
@@ -1,3 +1,15 @@
+2011-06-18  Martin Rudalics  <address@hidden>
+
+       * window.el (display-buffer-default-specifiers): Remove
+       pop-up-frame.  Add pop-up-window-min-height,
+       pop-up-window-min-width, and another reuse-window specifier
+       (Bug#8882).  Reported by Dan Nicolaescu <address@hidden>.
+       (display-buffer-normalize-specifiers-2): Handle
+       split-height-threshold and split-width-threshold also when
+       pop-up-windows is unset.  Add a reuse-window specifier for the
+       case popping up a new window fails.
+       (special-display-popup-frame): Remove double quoting.
+
 2011-06-17  Stefan Monnier  <address@hidden>
 
        * shell.el (shell-completion-vars): Set pcomplete-termination-string

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2011-06-17 16:07:55 +0000
+++ b/lisp/window.el    2011-06-18 14:23:14 +0000
@@ -3480,10 +3480,13 @@
 (defconst display-buffer-default-specifiers
   '((reuse-window nil same visible)
     (pop-up-window (largest . nil) (lru . nil))
-    (pop-up-frame)
+    (pop-up-window-min-height . 40)
+    (pop-up-window-min-width . 80)
+    (reuse-window other nil nil)
     (pop-up-frame-alist
      (height . 24) (width . 80) (unsplittable . t))
     (reuse-window nil other visible)
+    (reuse-window nil nil t)
     (reuse-window-even-sizes . t))
   "Buffer display default specifiers.
 The value specified here is used when no other specifiers have
@@ -5045,15 +5048,23 @@
            (min-width (if (numberp split-width-threshold)
                           (/ split-width-threshold 2)
                         1.0)))
-       (when pop-up-window
+       ;; Create an entry only if a default value was changed.
+       (when (or pop-up-window
+                 (not (equal split-height-threshold 80))
+                 (not (equal split-width-threshold 160)))
+         ;; `reuse-window' (needed as fallback when popping up the new
+         ;; window fails).
+         (setq specifiers
+               (cons (list 'reuse-window 'other nil nil)
+                     specifiers))
+         ;; `split-width-threshold'
+         (setq specifiers
+               (cons (cons 'pop-up-window-min-width min-width)
+                     specifiers))
          ;; `split-height-threshold'
          (setq specifiers
                (cons (cons 'pop-up-window-min-height min-height)
                      specifiers))
-         ;; `split-width-threshold'
-         (setq specifiers
-               (cons (cons 'pop-up-window-min-width min-width)
-                     specifiers))
          ;; `pop-up-window'
          (setq specifiers
                (cons (list 'pop-up-window
@@ -5663,7 +5674,7 @@
        ;; Reuse the current window if the user requested it.
        (when (cdr (assq 'same-window args))
         (display-buffer-reuse-window
-         buffer '(same nil nil) '((reuse-dedicated . 'weak))))
+         buffer '(same nil nil) '((reuse-dedicated . weak))))
        ;; Stay on the same frame if requested.
        (when (or (cdr (assq 'same-frame args))
                 (cdr (assq 'same-window args)))


reply via email to

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