bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#33870: 27.0.50; xref-goto-xref not configurable


From: Juri Linkov
Subject: bug#33870: 27.0.50; xref-goto-xref not configurable
Date: Mon, 21 Jan 2019 22:59:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> Like we already have such functions as window-in-direction and
>> windmove-display-in-direction, the new function could have a similar name
>> display-buffer-in-direction.
>
> OK (unless we find something better).

We urgently need this.  I discovered another case that will benefit from it.
Currently it can be rewritten as in this patch but I don't like how it requires
a non-trivial alist.  Could these be replaced with something simpler?

diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 52c0b5b74d..e90d70359f 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -252,7 +252,11 @@ widget-choose
           (define-key map [?\M--] 'negative-argument)
           (save-window-excursion
             (let ((buf (get-buffer " widget-choose")))
-              (fit-window-to-buffer (display-buffer buf))
+              (display-buffer
+                buf
+                '(display-buffer-maybe-below-selected
+                  (window-height . fit-window-to-buffer)
+                  (preserve-size nil . t)))
               (let ((cursor-in-echo-area t)
                     (arg 1))
                  (while (not value)





reply via email to

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