 
 (defun ar/markdown-mode-hook-function ()
   "Called when entering `markdown-mode'."
-  (setq markdown-indent-on-enter nil)
-  (define-key markdown-mode-map (kbd "RET") 'electric-newline-and-maybe-indent))
+  (set (make-local-variable 'markdown-indent-on-enter) nil)
+  (local-set-key (kbd "RET") 'electric-newline-and-maybe-indent))
 
 (ar/add-functions-to-mode-hooks '(ar/prog-mode-hook-function)
                                 '(prog-mode-hook))

  ;; ProductName: iPhone OS
  ;; ProductVersion: 7.1
  (set (make-local-variable 'compile-command)
        "xcodebuild -sdk iphonesimulator7.1 -target MyTarget")
  (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 ()

(eval-after-load "projectile"
  '(progn (setq magit-repo-dirs (mapcar (lambda (dir)
                                          (substring dir 0 -1))
                                        ;; Disables "required at runtime" warning for cl package.
                                        (with-no-warnings
                                          (remove-if-not (lambda (project)
                                                           (file-directory-p (concat project "/.git/")))
                                                         (projectile-relevant-known-projects))))
                magit-repo-dirs-depth 1)))

;; Select help window by default.
