Add some instructions
Don't `local-set-key' either, doesn't do anything anymore.
This commit is contained in:
parent
5857c61382
commit
7a9412b11f
1 changed files with 27 additions and 4 deletions
31
bw.el
31
bw.el
|
@ -21,7 +21,31 @@
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;; Show stuff in a bottom window.
|
;; Show stuff in a bottom window. The idea is taken from ide-skel,
|
||||||
|
;; which is a very nice extension, but doesn't fit into my workflow at
|
||||||
|
;; all, the only really nice thing is that all *buffers* appear in a
|
||||||
|
;; specialized window.
|
||||||
|
|
||||||
|
;;; Usage:
|
||||||
|
|
||||||
|
;; Make sure it's loadable, you should be able to do this by using:
|
||||||
|
|
||||||
|
;; M-x package-install-file RET /path/to/bw.el RET
|
||||||
|
|
||||||
|
;; or if you don't use package.el you could use:
|
||||||
|
|
||||||
|
;; (add-to-list 'load-path "/path/to/bw/directory")
|
||||||
|
;; (require 'bw)
|
||||||
|
|
||||||
|
;; Once that is done you can set it up for use:
|
||||||
|
|
||||||
|
;; (add-to-list 'display-buffer-alist
|
||||||
|
;; '("^\\*.*\\*$"
|
||||||
|
;; . ((bw-display-in-bottom-window . nil)))
|
||||||
|
|
||||||
|
;; And perhaps even bind a key to it:
|
||||||
|
|
||||||
|
;; (global-set-key (kbd "<f11>") 'bw-toggle-bottom-window)
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
@ -58,16 +82,14 @@
|
||||||
(window-list))
|
(window-list))
|
||||||
win))
|
win))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun bw-display-in-bottom-window (buffer alist)
|
(defun bw-display-in-bottom-window (buffer alist)
|
||||||
"Show BUFFER in the bottom window, discard ALIST."
|
"Show BUFFER in the bottom window, discard ALIST."
|
||||||
(let ((win (or (bw-get-window) (bw-create-window))))
|
(let ((win (or (bw-get-window) (bw-create-window))))
|
||||||
(set-window-buffer win buffer)
|
(set-window-buffer win buffer)
|
||||||
(setq bw-last-shown-buffer buffer)
|
(setq bw-last-shown-buffer buffer)
|
||||||
(local-set-key (kbd "C-c C-q") 'delete-window)
|
|
||||||
win))
|
win))
|
||||||
|
|
||||||
(add-to-list 'display-buffer-alist
|
|
||||||
'("^\\*.*\\*$" . ((bw-display-in-bottom-window . nil))))
|
|
||||||
(add-to-list 'window-persistent-parameters (cons 'bw-bottom t))
|
(add-to-list 'window-persistent-parameters (cons 'bw-bottom t))
|
||||||
|
|
||||||
(defun bw-find-appropriate-buffer ()
|
(defun bw-find-appropriate-buffer ()
|
||||||
|
@ -83,6 +105,7 @@
|
||||||
(setq buffer "*scratch*"))
|
(setq buffer "*scratch*"))
|
||||||
buffer))
|
buffer))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun bw-toggle-bottom-window ()
|
(defun bw-toggle-bottom-window ()
|
||||||
"Either show or delete the bottom window."
|
"Either show or delete the bottom window."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
Loading…
Reference in a new issue