-;; Add melpa package repository.
+;;; init.el --- Emacs initialization entry point.
+;;; Commentary:
+;; Just another init.el file.
+;;; Code:
+
 (require 'package)
+
 (add-to-list 'package-archives
              '("melpa" . "http://melpa.org/packages/"))
 (package-initialize)

(global-set-key (kbd "C-c `") 'ar/jump-to-saved-point)

(defun ar/after-prog-mode-text-change (beg end len)
  "Executes for all text changes in prog-mode."
  ;; Saving point to register enables jumping back to last change at any time.
  (ar/save-point))

(defun ar/objc-mode-hook-function ()
  "Called when entering objc-mode"
  (helm-dash-activate-docset "iOS")
  (set (make-local-variable 'company-backends)
       ;; List with multiple back-ends for mutual inclusion.

(global-set-key (kbd "M-;") 'ar/comment-dwim)

(defun ar/new-file-with-snippet (name extension mode snippet-name &optional interactive-snippet-p)
  "Create file with NAME, EXTENSION, MODE, SNIPPET-NAME, and optional INTERACTIVE-SNIPPET-P."
  (find-file (format "%s%s" name extension))
  (funcall mode)
  (insert snippet-name)
