feature/popup: replace split-window-no-error calls #349
split-window-no-error is a Emacs 26+ function.
This commit is contained in:
parent
987805de5f
commit
8785664267
1 changed files with 5 additions and 5 deletions
|
@ -472,7 +472,7 @@ and may be called only if no window on SIDE exists yet."
|
||||||
;; window and not make a new parent window unless needed.
|
;; window and not make a new parent window unless needed.
|
||||||
(window-combination-resize 'side)
|
(window-combination-resize 'side)
|
||||||
(window-combination-limit nil)
|
(window-combination-limit nil)
|
||||||
(window (split-window-no-error next-to nil on-side)))
|
(window (ignore-errors (split-window next-to nil on-side))))
|
||||||
(when window
|
(when window
|
||||||
;; Initialize `window-side' parameter of new window to SIDE and
|
;; Initialize `window-side' parameter of new window to SIDE and
|
||||||
;; make that parameter persistent.
|
;; make that parameter persistent.
|
||||||
|
@ -609,14 +609,14 @@ Accepts the same arguments as `display-buffer-in-side-window'. You must set
|
||||||
;; Make new window before `next-window'.
|
;; Make new window before `next-window'.
|
||||||
(let ((next-side (if left-or-right 'above 'left))
|
(let ((next-side (if left-or-right 'above 'left))
|
||||||
(window-combination-resize 'side))
|
(window-combination-resize 'side))
|
||||||
(setq window (split-window-no-error
|
(setq window
|
||||||
next-window nil next-side))))
|
(ignore-errors (split-window next-window nil next-side)))))
|
||||||
(and prev-window
|
(and prev-window
|
||||||
;; Make new window after `prev-window'.
|
;; Make new window after `prev-window'.
|
||||||
(let ((prev-side (if left-or-right 'below 'right))
|
(let ((prev-side (if left-or-right 'below 'right))
|
||||||
(window-combination-resize 'side))
|
(window-combination-resize 'side))
|
||||||
(setq window (split-window-no-error
|
(setq window
|
||||||
prev-window nil prev-side)))))
|
(ignore-errors (split-window prev-window nil prev-side))))))
|
||||||
(set-window-parameter window 'window-slot slot)
|
(set-window-parameter window 'window-slot slot)
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(setq window--sides-shown t))
|
(setq window--sides-shown t))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue