                     `(lambda () (interactive) (find-file ,f)))
     (setq org-agenda-files `(,f))))
 
-;XXX; (when (locate-library "org-brain")
-;XXX;   (global-set-key "\C-cn" 'org-brain-visualize))
-
 ;;; --------------------------------------------------------------------
 ;;; Haskell
 

  (when (version<= "24.4" emacs-version)
    (advice-add #'counsel-git-grep-function :filter-args #'vvv/first-line)))

(when (require 'avy nil 'noerror)
  (setq avy-all-windows 'all-frames)
  (global-set-key (kbd "C-.") 'avy-goto-word-or-subword-1)
  (global-set-key (kbd "C->") 'avy-goto-char-timer) ; avy-goto-char-2 ?
  (global-set-key (kbd "C-x SPC") 'avy-pop-mark))

(when (require 'ace-window nil 'noerror)
  (global-set-key (kbd "M-p") 'ace-window)
  (global-set-key (kbd "M-P") 'ace-swap-window)
  (setq aw-ignore-current t)

  ;; Prevent some modules from stealing "M-p" binding.
  (add-hook 'diff-mode-hook
            (lambda () (define-key diff-mode-map (kbd "M-p") nil)))
  (add-hook 'markdown-mode-hook
            (lambda () (define-key markdown-mode-map (kbd "M-p") nil)))
  (add-hook 'compilation-mode-hook
            (lambda () (define-key compilation-mode-map (kbd "M-p") nil)))
  (add-hook 'grep-mode-hook
            (lambda () (define-key grep-mode-map (kbd "M-p") nil)))
  (with-eval-after-load "haskell-cabal"
    (define-key haskell-cabal-mode-map (kbd "M-p") nil)))
;;; ----------------------------------------------------------------------

;;; http://emacsredux.com/blog/2014/04/05/which-function-mode/
(setq mode-line-misc-info

(global-set-key (kbd "C-c .") 'vvv/reload-tags-table)

;;; --------------------------------------------------------------------

(with-eval-after-load "ps-print"
  (setq ps-paper-type 'a4
