Emacs: Add toggle-window-dedicated command Tells Emacs not to replace the buffer in a window.
Alan Pearce alan@alanpearce.co.uk
Thu, 22 May 2014 10:42:12 +0100
1 files changed, 11 insertions(+), 0 deletions(-)
jump to
M tag-emacs/emacs.d/init.el → tag-emacs/emacs.d/init.el
@@ -994,6 +994,17 @@ (scroll-bar-mode -1) (tooltip-mode -1) (tool-bar-mode -1)) +(defun toggle-window-dedicated () + "Toggle whether the current active window is dedicated or not" + (interactive) + (message + (if (let (window (get-buffer-window (current-buffer))) + (set-window-dedicated-p window + (not (window-dedicated-p window)))) + "Window '%s' is dedicated" + "Window '%s' is normal") + (current-buffer))) + (req-package popwin :config (progn (popwin-mode 1)))