Paste number 76887: emacs erlang-mode distel always split on compile

Paste number 76887: emacs erlang-mode distel always split on compile
Pasted by: ivarref
When:1 year, 1 week ago
Share:Tweet this! | http://paste.lisp.org/+1NBR
Channel:None
Paste contents:
Raw Source | XML | Display As
(defun erlang-compile-always-split ()
  "If you only have one window, split the window, then compile. 
   If you have 2 windows, just compile.
   The shell/compilation window should always be the lowest one." 
  (interactive)
  (cond ((= (count-windows) 2)
	 (erlang-compile))	   ; already two windows, just compile
	(t
	 (let* ((o-window (eql nil (get-buffer erlang-shell-buffer-name))))
	   (split-window-vertically)
	   (when o-window (other-window 1))
	   (erlang-compile)
	   (when o-window (other-window 1))))))
  
(add-hook 'erlang-extended-mode-hook
	  (lambda ()
	    (define-key erlang-extended-mode-map "\C-c\C-k" 'erlang-compile-always-split)))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.