     (set-frame-position nil 1910 0) ; pixels x y from upper left
     (set-frame-size     nil 1894 1096 :pixelwise))) ; width, height
 
-;; Set the emacs frame/window size at startup
-;; `boundp` returns t if SYMBOL's value is not void. This prevents the frame to
-;; resize every time this file is re-evaluated. With the `unless boundp` condition
-;; this block is evaluated only once when emacs starts.
-;; (unless (boundp 'emacs-initialized)
-;;   (when (window-system)
-;;     (set-frame-position (selected-frame) 0 0)
-;;     (set-frame-size (selected-frame) 90 30)
-;;     ))
-
+;; http://emacs.stackexchange.com/a/81/115
 (defun modi/switch-to-scratch-and-back (arg)
   "Toggle between *scratch-MODE* buffer and the current buffer.
 If a scratch buffer does not exist, create it with the major mode set to that

  "kill the minibuffer"
  (when (and (>= (recursion-depth) 1) (active-minibuffer-window))
    (abort-recursive-edit)))
(add-hook 'mouse-leave-buffer-hook 'stop-using-minibuffer)

;; http://www.emacswiki.org/emacs/SwitchingBuffers
(defun toggle-between-buffers ()

- Do `ediff-buffers' otherwise.

Otherwise call `ediff-buffers' interactively."
      (interactive)
      (if (region-active-p)
          (call-interactively 'ediff-regions-wordwise)
        (if (= 2 (safe-length (window-list)))
            (let (bufa bufb filea fileb)
              (setq bufa  (get-buffer (buffer-name)))
              (setq filea (buffer-file-name bufa))
              (save-excursion
                (other-window 1)
                (setq bufb (get-buffer (buffer-name))))
              (setq fileb (buffer-file-name bufb))
              (if (or
                   ;; if either of the buffers is not associated to a file
                   (null filea) (null fileb)
                   ;; if either of the buffers is modified
                   (buffer-modified-p bufa) (buffer-modified-p bufb))
                  (progn
                    (message "Running (ediff-buffers \"%s\" \"%s\") .." bufa bufb)
                    (ediff-buffers bufa bufb))
                (progn
                  (message "Running (ediff-files \"%s\" \"%s\") .." filea fileb)
                  (ediff-files filea fileb))))
          (call-interactively 'ediff-buffers))))))

(defun modi/set-file-permissions (perm)
  "Change permissions of the file in current buffer.
