   ;; Saving point to register enables jumping back to last change at any time.
   (ar/save-point))
 
-(defun ar/objc-mode-hook ()
+(defun ar/objc-mode-hook-function ()
   "Called when entering objc-mode"
   (set (make-local-variable 'company-backends)
        ;; List with multiple back-ends for mutual inclusion.

  (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)

(use-package centered-cursor-mode
  :ensure centered-cursor-mode)

  (define-key objc-mode-map [f6] 'recompile)
  (define-key objc-mode-map [f7] 'ar/xc:build)
  (define-key objc-mode-map [f8] 'ar/xc:run))
(add-hook 'objc-mode-hook 'ar/objc-mode-hook-function)

(defun ar/java-mode-hook-function ()
  "Called when entering java-mode"
  ;; 100-column limit for java.
  (set-fill-column 100)
  ;; 2-char indent for java.
  (setq c-basic-offset 2))
(add-hook 'java-mode-hook 'ar/java-mode-hook-function)

(defun ar/prog-mode-hook-function ()
  "Called when entering all programming modes."
  (add-hook 'after-change-functions
            'ar/after-prog-mode-text-change
