vde-windows.el (1062B)
1 ;;; vde-windows.el --- -*- lexical-binding: t; -*- 2 ;; Commentary: 3 ;;; Helper function related to window management 4 ;; Code: 5 6 ;;;###autoload 7 (defun vde/split-window-below (arg) 8 "Split window below from the parent or from the roo with ARG." 9 (interactive "P") 10 (split-window (if arg (frame-root-window) 11 (window-parent (selected-window))) 12 nil 'below nil)) 13 14 ;;;###autoload 15 (defun vde/split-window-right (arg) 16 "Split window right from the parent or from the roo with ARG." 17 (interactive "P") 18 (split-window (if arg (frame-root-window) 19 (window-parent (selected-window))) 20 nil 'right nil)) 21 22 ;;;###autoload 23 (defun vde/toggle-window-dedication () 24 "Toggles window dedication in the selected window." 25 (interactive) 26 (set-window-dedicated-p (selected-window) 27 (not (window-dedicated-p (selected-window))))) 28 29 ;;;###autoload 30 (defun make-display-buffer-matcher-function (major-modes) 31 (lambda (buffer-name action) 32 (with-current-buffer buffer-name (apply #'derived-mode-p major-modes)))) 33 34 (provide 'vde-windows) 35 ;;; vde-windows.el ends here