shell-pop und bessere Lösung für compilation
This commit is contained in:
parent
4cc4317c82
commit
5fad0abd17
1 changed files with 21 additions and 19 deletions
40
emacs/.emacs
40
emacs/.emacs
|
@ -216,26 +216,26 @@
|
|||
(setq compilation-scroll-output 'first-error)
|
||||
(setq compilation-window-height 10)
|
||||
|
||||
(defun my/compilation-bury-buffer-without-error (buffer string)
|
||||
(cond ((string-match "finished" string)
|
||||
(message "Build maybe successful: closing window.")
|
||||
(run-with-timer 3 nil
|
||||
'delete-window
|
||||
(get-buffer-window buffer t)))
|
||||
(t (message "Compilation exited abnormaly: %s" string))))
|
||||
|
||||
(setq compilation-finish-function 'my/compilation-bury-buffer-without-error)
|
||||
;(defun my/compilation-bury-buffer-without-error (buffer string)
|
||||
; (cond ((string-match "finished" string)
|
||||
; (message "Build maybe successful: closing window.")
|
||||
; (run-with-timer 3 nil
|
||||
; 'delete-window
|
||||
; (get-buffer-window buffer t)))
|
||||
; (t (message "Compilation exited abnormaly: %s" string))))
|
||||
;
|
||||
;(setq compilation-finish-function 'my/compilation-bury-buffer-without-error)
|
||||
|
||||
(defun my/setup-compilation-window ()
|
||||
(when (not (get-buffer-window "*compilation*"))
|
||||
(save-selected-window
|
||||
(save-excursion
|
||||
(let* ((w (split-window-vertically))
|
||||
(h (window-height w)))
|
||||
(select-window w)
|
||||
(switch-to-buffer "*compilation*")
|
||||
(shrink-window (- h compilation-window-height)))))))
|
||||
(add-hook 'compilation-mode-hook 'my/setup-compilation-window)
|
||||
;(defun my/setup-compilation-window ()
|
||||
; (when (not (get-buffer-window "*compilation*"))
|
||||
; (save-selected-window
|
||||
; (save-excursion
|
||||
; (let* ((w (split-window-vertically))
|
||||
; (h (window-height w)))
|
||||
; (select-window w)
|
||||
; (switch-to-buffer "*compilation*")
|
||||
; (shrink-window (- h compilation-window-height)))))))
|
||||
;(add-hook 'compilation-mode-hook 'my/setup-compilation-window)
|
||||
|
||||
;; Window movement
|
||||
; Old keys
|
||||
|
@ -291,6 +291,8 @@
|
|||
'("*Apropos*" display-buffer-same-window))
|
||||
(add-to-list 'display-buffer-alist
|
||||
'("*Help*" display-buffer-in-side-window))
|
||||
(add-to-list 'display-buffer-alist
|
||||
'("*compilation*" (display-buffer-reuse-window display-buffer-in-side-window) (side . bottom) (size . 0.2)))
|
||||
|
||||
;; Change all prompts to y or n
|
||||
(fset 'yes-or-no-p 'y-or-n-p)
|
||||
|
|
Loading…
Reference in a new issue