      (let* ((git-toplevel (string-trim-right
 			   (shell-command-to-string
 			    "git rev-parse --show-toplevel 2>/dev/null")))
-	    (git-p (not (string-empty-p git-toplevel))))
-       (when git-p
-	 (setq default-directory git-toplevel))
+	    (git-p (not (string-empty-p git-toplevel)))
+	    (default-directory (if git-p git-toplevel default-directory)))
        (list (read-shell-command "Run: "
 				 (if git-p
 				     "git --no-pager grep -nHE "

(global-set-key (kbd "C-c H") 'hl-line-mode)
(when (fboundp 'column-highlight-mode)
  (global-set-key (kbd "C-c h") 'column-highlight-mode))

(custom-set-variables

(when (file-exists-p "~/.org/at.org")
  (global-set-key "\C-cb"
		  '(lambda () (interactive) (find-file "~/.org/at.org"))))

(when (locate-library "org-brain")
  (global-set-key "\C-cn" 'org-brain-visualize))

;;; --------------------------------------------------------------------
;;; Haskell
