 ;; Automatically hide successful builds window.
 (setq compilation-finish-functions 'ar/compile-autoclose)
 (defun ar/compile-autoclose (buffer string)
+  "Hide successful builds window with BUFFER and STRING."
   (cond ((string-match "finished" string)
          (message "Build finished")
          (run-with-timer 2 nil

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

(defun ar/create-non-existent-directory ()
  (let ((parent-directory (file-name-directory buffer-file-name)))
    (when (and (not (file-exists-p parent-directory))
               (y-or-n-p (format "Directory `%s' does not exist! Create it? " parent-directory)))

(use-package rainbow-mode :ensure t)
(rainbow-mode 1)

(defun sm-try-smerge ()
  "Activate smerge on conflicts."
  (save-excursion
    (goto-char (point-min))
    (when (re-search-forward "^<<<<<<< " nil t)
