Permalink
Browse files

Add emacs tricks from Gary Bernhardt

Initially this just includes his special-display-function.
  • Loading branch information...
1 parent 944254e commit b8d10b0a32eb08c40fddea95ff1085fdf3742426 @andrewsardone committed Dec 23, 2011
Showing with 34 additions and 0 deletions.
  1. +24 −0 modules/aps-editor.el
  2. +10 −0 vendor/grb-defuns.el
View
24 modules/aps-editor.el
@@ -75,4 +75,28 @@
;; enable sensible commenting/uncommenting
(aps-define-comment-or-uncomment-line)
+;; special-display-function setup
+;; stolen from Gary Bernhardt
+(setq special-display-regexps
+ '("^\\*Completions\\*$"
+ "^\\*Help\\*$"
+ "^\\*grep\\*$"
+ "^\\*Apropos\\*$"
+ "^\\*elisp macroexpansion\\*$"
+ "^\\*local variables\\*$"
+ "^\\*Compile-Log\\*$"
+ "^\\*Quail Completions\\*$"
+ "^\\*Occur\\*$"
+ "^\\*frequencies\\*$"
+ "^\\*compilation\\*$"
+ "^\\*Locate\\*$"
+ "^\\*Colors\\*$"
+ "^\\*tumme-display-image\\*$"
+ "^\\*SLIME Description\\*$"
+ "^\\*.* output\\*$" ; tex compilation buffer
+ "^\\*TeX Help\\*$"
+ "^\\*Shell Command Output\\*$"
+ "^\\*Async Shell Command\\*$"))
+(setq special-display-function #'grb-special-display)
+
(provide 'aps-editor)
View
10 vendor/grb-defuns.el
@@ -0,0 +1,10 @@
+;; Various definitions stolen from Gary Bernhardt
+;; https://github.com/garybernhardt/dotfiles
+
+; GRB: open temporary buffers in a dedicated window split
+(setq grb-temporary-window (nth 2 (window-list)))
+(defun grb-special-display (buffer &optional data)
+ (let ((window grb-temporary-window))
+ (with-selected-window window
+ (switch-to-buffer buffer)
+ window)))

0 comments on commit b8d10b0

Please sign in to comment.