Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; Window and buffer functions
- (defun safe-delete-window ()
- "Only delete the window if there are others in the frame."
- (interactive)
- (if (> (count-windows) 1)
- (delete-window)))
- (defun bury-buffer-close-window ()
- "Bury the buffer, then close the window if it is the last one in
- the frame."
- (interactive)
- (bury-buffer)
- (safe-delete-window))
- (global-set-key (kbd "C-c b b") #'bury-buffer)
- (global-set-key (kbd "C-c b c") #'bury-buffer-close-window)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement