Add some instructions

Don't `local-set-key' either, doesn't do anything anymore.
This commit is contained in:
Tom Willemsen 2012-09-17 19:51:59 +02:00
parent 5857c61382
commit 7a9412b11f

31
bw.el
View file

@ -21,7 +21,31 @@
;;; 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:
@ -58,16 +82,14 @@
(window-list))
win))
;;;###autoload
(defun bw-display-in-bottom-window (buffer alist)
"Show BUFFER in the bottom window, discard ALIST."
(let ((win (or (bw-get-window) (bw-create-window))))
(set-window-buffer win buffer)
(setq bw-last-shown-buffer buffer)
(local-set-key (kbd "C-c C-q") 'delete-window)
win))
(add-to-list 'display-buffer-alist
'("^\\*.*\\*$" . ((bw-display-in-bottom-window . nil))))
(add-to-list 'window-persistent-parameters (cons 'bw-bottom t))
(defun bw-find-appropriate-buffer ()
@ -83,6 +105,7 @@
(setq buffer "*scratch*"))
buffer))
;;;###autoload
(defun bw-toggle-bottom-window ()
"Either show or delete the bottom window."
(interactive)