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-scroll-output 'first-error)
|
||||||
(setq compilation-window-height 10)
|
(setq compilation-window-height 10)
|
||||||
|
|
||||||
(defun my/compilation-bury-buffer-without-error (buffer string)
|
;(defun my/compilation-bury-buffer-without-error (buffer string)
|
||||||
(cond ((string-match "finished" string)
|
; (cond ((string-match "finished" string)
|
||||||
(message "Build maybe successful: closing window.")
|
; (message "Build maybe successful: closing window.")
|
||||||
(run-with-timer 3 nil
|
; (run-with-timer 3 nil
|
||||||
'delete-window
|
; 'delete-window
|
||||||
(get-buffer-window buffer t)))
|
; (get-buffer-window buffer t)))
|
||||||
(t (message "Compilation exited abnormaly: %s" string))))
|
; (t (message "Compilation exited abnormaly: %s" string))))
|
||||||
|
;
|
||||||
(setq compilation-finish-function 'my/compilation-bury-buffer-without-error)
|
;(setq compilation-finish-function 'my/compilation-bury-buffer-without-error)
|
||||||
|
|
||||||
(defun my/setup-compilation-window ()
|
;(defun my/setup-compilation-window ()
|
||||||
(when (not (get-buffer-window "*compilation*"))
|
; (when (not (get-buffer-window "*compilation*"))
|
||||||
(save-selected-window
|
; (save-selected-window
|
||||||
(save-excursion
|
; (save-excursion
|
||||||
(let* ((w (split-window-vertically))
|
; (let* ((w (split-window-vertically))
|
||||||
(h (window-height w)))
|
; (h (window-height w)))
|
||||||
(select-window w)
|
; (select-window w)
|
||||||
(switch-to-buffer "*compilation*")
|
; (switch-to-buffer "*compilation*")
|
||||||
(shrink-window (- h compilation-window-height)))))))
|
; (shrink-window (- h compilation-window-height)))))))
|
||||||
(add-hook 'compilation-mode-hook 'my/setup-compilation-window)
|
;(add-hook 'compilation-mode-hook 'my/setup-compilation-window)
|
||||||
|
|
||||||
;; Window movement
|
;; Window movement
|
||||||
; Old keys
|
; Old keys
|
||||||
|
@ -291,6 +291,8 @@
|
||||||
'("*Apropos*" display-buffer-same-window))
|
'("*Apropos*" display-buffer-same-window))
|
||||||
(add-to-list 'display-buffer-alist
|
(add-to-list 'display-buffer-alist
|
||||||
'("*Help*" display-buffer-in-side-window))
|
'("*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
|
;; Change all prompts to y or n
|
||||||
(fset 'yes-or-no-p 'y-or-n-p)
|
(fset 'yes-or-no-p 'y-or-n-p)
|
||||||
|
|
Loading…
Reference in a new issue