-;; Time-stamp: <2015-02-24 08:48:21 kmodi>
+;; Time-stamp: <2015-02-24 15:54:17 kmodi>
 
 ;; Functions to manipulate windows and buffers
 

          (message file-name))
      (error "Buffer not visiting a file"))))

(defun reload-init ()
  "Do load-file of the emacs config file"
  (interactive)
  (load-file (concat user-emacs-directory "/init.el")))

;; Replaced the use of below with xah-run-current-file
;; (defun load-current-file ()
;;   "Load current file"
;;   (interactive)
;;   (load-file (buffer-file-name)))

;; Source: http://www.emacswiki.org/emacs-en/download/misc-cmds.el
(defun revert-buffer-no-confirm ()
  "Revert buffer without confirmation."
  (interactive)

;; 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
;; edit the mini-buffer as cursor focus has moved out of it.
;; http://stackoverflow.com/a/3024055/1219634
(defun stop-using-minibuffer ()
  "kill the minibuffer"
  (when (and (>= (recursion-depth) 1) (active-minibuffer-window))
