diff --git a/src/workgroups-functions.el b/src/workgroups-functions.el index c80f24b29ce059a16f8f9768c9f4661fa4e75acc..9b31e9f4faa7927d7362555e72fdeccdd99e7738 100644 --- a/src/workgroups-functions.el +++ b/src/workgroups-functions.el @@ -269,7 +269,7 @@ If BUFOBJ is a buffer or a buffer name, see `wg-buffer-uid-or-add'." (defun wg-window-tree-to-wtree (window-tree) "Return the serialization (a wg-wtree) of Emacs window tree WINDOW-TREE." (wg-barf-on-active-minibuffer) - (dflet + (cl-flet ((inner (w) (if (windowp w) (wg-window-to-win w) (wg-dbind (dir edges . wins) w (wg-make-wtree @@ -431,7 +431,7 @@ BUFFER or `wg-default-buffer' is visible in the only window." (defun wg-scale-w-size (w width-scale height-scale) "Scale W's size by WIDTH-SCALE and HEIGHT-SCALE." - (dflet + (cl-flet ((wscale (width) (truncate (* width width-scale))) (hscale (height) (truncate (* height height-scale)))) (wg-adjust-w-size w #'wscale #'hscale))) @@ -460,7 +460,7 @@ new wlist, return it instead of a new wtree." (max (- hb1 1 min-size)) (lastw (wg-last1 wlist))) ;;(wg--with-temporary-redefinitions - (dflet + (cl-flet ((mapwl (wl) (wg-dbind (sw . rest) wl @@ -517,7 +517,7 @@ with `wg-scale-wconfigs-wtree' to fit the frame as it exists." If DIR is nil, reverse WTREE horizontally. If DIR is 'both, reverse WTREE both horizontally and vertically. Otherwise, reverse WTREE vertically." - (dflet + (cl-flet ((inner (w) (if (wg-win-p w) w (wg-with-slots w ((d1 wg-wtree-dir)) (wg-make-wtree @@ -531,7 +531,7 @@ Otherwise, reverse WTREE vertically." (defun wg-wtree-move-window (wtree offset) "Offset `selected-window' OFFSET places in WTREE." - (dflet + (cl-flet ((inner (w) (if (wg-win-p w) w (wg-with-slots w ((wlist wg-wtree-wlist)) (wg-make-wtree @@ -556,7 +556,7 @@ Otherwise, reverse WTREE vertically." "Return a new list by flattening WTREE. KEY non returns returns a list of WTREE's wins. KEY non-nil returns a list of the results of calling KEY on each win." - (dflet + (cl-flet ((inner (w) (if (wg-win-p w) (list (if key (funcall key w) w)) (cl-mapcan 'inner (wg-wtree-wlist w))))) (inner wtree)))