  ;; The same function anyways is also bound to `C-right`
  ("<M-right>" . scroll-other-window-up-dont-move-point))
 
-(bind-to-modi-map "b" switch-to-scratch-and-back)
+(bind-to-modi-map "b" modi/switch-to-scratch-and-back)
 (bind-to-modi-map "f" full-screen-center)
 (bind-to-modi-map "y" bury-buffer)
 

;; Time-stamp: <2014-08-26 12:04:54 kmodi>

;; Functions to manipulate windows and buffers


;;     (set-frame-size (selected-frame) 90 30)
;;     ))

(defun modi/switch-to-scratch-and-back ()
  "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
of the buffer from where this function is called."
  (interactive)
  (if (string-match "*scratch" (format "%s" (current-buffer)))
      (switch-to-buffer (other-buffer))
    (let ((mode-str (format "%s" major-mode)))
      (let ((scratch-buffer-name (get-buffer-create (concat "*scratch-" mode-str "*"))))
        (switch-to-buffer scratch-buffer-name)
        (modi-mode) ;; Set my minor mode to activate my key bindings
        ; Source: http://stackoverflow.com/questions/7539615/emacs-how-do-i-set-a-major-mode-stored-in-a-variable
        (funcall (intern mode-str))))))

;; Perform the "C-g" action automatically when focus moves away from the minibuffer
;; This is to avoid the irritating occassions where repeated `C-g` pressing doesn't
