(defun syl-python-compile () "Use compile to run python programs" (interactive) (compile (concat "python " (buffer-name)))) (setq compilation-scroll-output t) ;; from https://gist.github.com/3402786 (defun toggle-maximize-buffer () "Maximize buffer" (interactive) (if (= 1 (length (window-list))) (jump-to-register '_) (progn (set-register '_ (list (current-window-configuration))) (delete-other-windows)))) ;; from http://github.com/technomancy/emacs-starter-kit (defun esk-paredit-nonlisp () "Turn on paredit mode for non-lisps." (interactive) (set (make-local-variable 'paredit-space-for-delimiter-predicates) '((lambda (endp delimiter) nil))) (paredit-mode 1)) (defun z:set-transparency (value) "Sets the transparency of the frame window. 0=transparent/100=opaque" (interactive "nTransparency Value 0 - 100 opaque:") (set-frame-parameter (selected-frame) 'alpha value)) (defun z:switch-to-next-frame () "Select the next frame on current display, and raise it." (interactive) (other-frame 1)) (defun z:switch-to-previous-frame () "Select the previous frame on current display, and raise it." (interactive) (other-frame -1)) ;; http://emacswiki.org/emacs/TransposeWindows (defun z:rotate-windows () "Rotate your windows" (interactive) (cond ((not (> (count-windows) 1)) (message "You can't rotate a single window!")) (t (let ((i 1) (num-windows (count-windows))) (while (< i num-windows) (let* ((w1 (elt (window-list) i)) (w2 (elt (window-list) (+ (% i num-windows) 1))) (b1 (window-buffer w1)) (b2 (window-buffer w2)) (s1 (window-start w1)) (s2 (window-start w2))) (set-window-buffer w1 b2) (set-window-buffer w2 b1) (set-window-start w1 s2) (set-window-start w2 s1) (setq i (1+ i)))))))) (provide 'funcs)