   ;; Saving point to register enables jumping back to last change at any time.
   (ar/save-point))
 
+(defun ar/java-mode-hook ()
+  "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)
+
 (defun ar/prog-mode-hook ()
   "Called when entering all programming modes."
   (add-hook 'after-change-functions

;; Sort lines (ie. package imports or headers).
(global-set-key (kbd "M-s l") 'sort-lines)

;; Spellcheck comments and documentation
;; From http://mwolson.org/projects/emacs-config/init.el.html
(add-hook 'lisp-mode-hook 'flyspell-prog-mode)
(add-hook 'emacs-lisp-mode-hook 'flyspell-prog-mode)
(eval-after-load "cc-mode"
  '(progn
     ;; 100-column limit for java.
     (add-hook 'java-mode-hook
               (lambda ()
                 (set-fill-column 100)))
     ;; 2-char indent for java.
     (add-hook 'java-mode-hook (lambda ()
                                 (setq c-basic-offset 2)))
     (add-hook 'java-mode-hook 'flyspell-prog-mode)
     (add-hook 'c-mode-hook 'flyspell-prog-mode)))
(setq css-indent-offset 2)

;; Thank you Xah Lee.

      :ensure exec-path-from-shell)
    (exec-path-from-shell-initialize))
 ((string-equal system-type "gnu/linux") ; Linux
    (defun ar/new-browser-tab ()
      "Open a new browser tab in the default browser."
      (interactive)
      (shell-command "google-chrome http://google.com")
      ))
 )
(global-set-key (kbd "C-x t") 'ar/new-browser-tab)

;; Disable backup.
;; From: http://anirudhsasikumar.net/blog/2005.01.21.html
