mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
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.
This commit is contained in:
parent
8ab0c04c2c
commit
57354bc64b
1 changed files with 10 additions and 5 deletions
|
|
@ -355,11 +355,16 @@ provided in the Commentary section of this library."
|
|||
(reb-delete-overlays))
|
||||
(setq reb-target-buffer (current-buffer)
|
||||
reb-target-window (selected-window))
|
||||
(select-window (or (get-buffer-window reb-buffer)
|
||||
(progn
|
||||
(setq reb-window-config (current-window-configuration))
|
||||
(split-window (selected-window) (- (window-height) 4)))))
|
||||
(switch-to-buffer (get-buffer-create reb-buffer))
|
||||
(select-window
|
||||
(or (get-buffer-window reb-buffer)
|
||||
(let ((dir (if (window-parameter nil 'window-side)
|
||||
'bottom 'down)))
|
||||
(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)
|
||||
(reb-initialize-buffer)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue