Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:candera/emacs

Conflicts:
        colors.el
  • Loading branch information...
commit cc9ab7fc913f4c6770ecf1410ac2aef638868a67 2 parents 88d9b72 + 63a065b
@candera authored
Showing with 35 additions and 0 deletions.
  1. +7 −0 colors.el
  2. +28 −0 init.el
View
7 colors.el
@@ -12,6 +12,13 @@
(set-face-background 'default "black")
(set-face-foreground 'default "white"))
+(defun get-display ()
+ (let ((display-env (getenv "DISPLAY")))
+ (cond
+ ((not display-env) nil)
+ ((zerop (length display-env)) nil)
+ (display-env))))
+
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
View
28 init.el
@@ -189,6 +189,34 @@ Accepts WIDTH as a numeric prefix, but defaults to 85."
(global-set-key (kbd "C-x 4 3") 'temporarily-display-three-windows)
(global-set-key (kbd "C-x 4 4") 'temporarily-display-four-windows)
+;; Flips the left and right windows. Taken from
+;; http://whattheemacsd.com//buffer-defuns.el-02.html
+(defun rotate-windows ()
+ "Rotate your windows"
+ (interactive)
+ (cond ((not (> (count-windows) 1))
+ (message "You can't rotate a single window!"))
+ (t
+ (setq i 1)
+ (setq numWindows (count-windows))
+ (while (< i numWindows)
+ (let* (
+ (w1 (elt (window-list) i))
+ (w2 (elt (window-list) (+ (% i numWindows) 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)))))))
+
+
;; Cursor-style setting functions
(defun set-cursor-type (cursor)
"Modify the cursor to the specified type"
Please sign in to comment.
Something went wrong with that request. Please try again.