   (whitespace-mode)
   (rainbow-delimiters-mode)
   (yas-minor-mode))
-(add-hook 'prog-mode-hook 'ar/prog-mode-hook)
-(add-hook 'markdown-mode-hook 'ar/prog-mode-hook)
+(add-hook 'prog-mode-hook 'ar/prog-mode-hook-function)
+(add-hook 'markdown-mode-hook 'ar/prog-mode-hook-function)
+
+(ar/add-functions-to-mode-hooks '(prog-mode-hook markdown-mode-hook)
+                                '(ar/prog-mode-hook-function))
 
 (use-package centered-cursor-mode
   :ensure centered-cursor-mode)

;; M-. elisp navigation.
(use-package elisp-slime-nav
  :ensure elisp-slime-nav)
(dolist (hook '(emacs-lisp-mode-hook ielm-mode-hook))
  (add-hook hook 'turn-on-elisp-slime-nav-mode))

(defun ar/save-point ()
  "Saves point to register 9999."

        ("\\.m$" (".h"))
        ("\\.mm$" (".h"))
        ))
(add-hook 'c-mode-common-hook (lambda()
                                (local-set-key (kbd "C-c o") 'ff-find-other-file)))

(use-package dummy-h-mode
  :ensure dummy-h-mode)
(add-to-list 'auto-mode-alist '("\\.h\\'" . dummy-h-mode))
