Commit 57354bc6 authored by pillule's avatar pillule Committed by Juri Linkov
Browse files

Use display-buffer with re-builder (bug#49069)

* lisp/emacs-lisp/re-builder.el (re-builder): Uses 'display-buffer'
with 'display-buffer-in-direction' to display the reb-buffer.  This
allow user-customizations and using it on not splitables windows.
Add a dedication to its window so killing this buffer quit the window.
parent 8ab0c04c
Pipeline #11344 failed with stages
in 55 seconds
...@@ -355,11 +355,16 @@ provided in the Commentary section of this library." ...@@ -355,11 +355,16 @@ provided in the Commentary section of this library."
(reb-delete-overlays)) (reb-delete-overlays))
(setq reb-target-buffer (current-buffer) (setq reb-target-buffer (current-buffer)
reb-target-window (selected-window)) reb-target-window (selected-window))
(select-window (or (get-buffer-window reb-buffer) (select-window
(progn (or (get-buffer-window reb-buffer)
(setq reb-window-config (current-window-configuration)) (let ((dir (if (window-parameter nil 'window-side)
(split-window (selected-window) (- (window-height) 4))))) 'bottom 'down)))
(switch-to-buffer (get-buffer-create reb-buffer)) (setq reb-window-config (current-window-configuration))
(display-buffer
(get-buffer-create reb-buffer)
`((display-buffer-in-direction)
(direction . ,dir)
(dedicated . t))))))
(font-lock-mode 1) (font-lock-mode 1)
(reb-initialize-buffer))) (reb-initialize-buffer)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment