From 0704610461bf24463b4f6fcea268b60cb3236ef1 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 22 May 2014 10:42:12 +0100 Subject: Emacs: Add toggle-window-dedicated command Tells Emacs not to replace the buffer in a window. --- tag-emacs/emacs.d/init.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tag-emacs/emacs.d/init.el') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index 565def90..f403d1ee 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -994,6 +994,17 @@ (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))) -- cgit 1.4.1