Permalink
Browse files

Merge pull request #24 from tkf/pop-to-buffer

* Let user do window management
  • Loading branch information...
2 parents e035713 + b20719c commit 369f409d4530103af9de13480f8f2296e5035efe @djcb committed Aug 27, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 sauron.el
View
@@ -190,6 +190,9 @@ PROPS is a backend-specific plist.")
(define-key map (kbd "<mouse-2>") 'sauron-activate-event)
(define-key map (kbd "<M-up>") 'sauron-activate-event-prev)
(define-key map (kbd "<M-down>") 'sauron-activate-event-next)
+ (define-key map "n" 'next-line)
+ (define-key map "p" 'previous-line)
+ (define-key map "q" 'bury-buffer)
map)
"Keymap for the sauron buffer.")
(fset 'sauron-mode-map sauron-mode-map)
@@ -588,6 +591,13 @@ start sauron if it weren't so already."
(sauron-start)
(sr-show))))
+(defun sauron-pop-to-buffer ()
+ "Popup sauron buffer."
+ (interactive)
+ (unless (buffer-live-p sr-buffer)
+ (error "No sauron buffer found. Please start sauron by `sauron-start'."))
+ (pop-to-buffer sr-buffer))
+
(defun sauron-clear ()
"Clear the sauron buffer."
(interactive)

0 comments on commit 369f409

Please sign in to comment.