-;; Configure package, load custom.el and ensure use-package is
-;; installed.
+(defun cenouro/customize (&rest flat_pair_list)
+  "Sets multiple variables using customize-set-variable."
+  (while flat_pair_list
+    (customize-set-variable (car flat_pair_list)
+                            (car (cdr flat_pair_list)))
+    (setq flat_pair_list (cdr (cdr flat_pair_list)))))
+
+;; Initialize package, custom.el and ensure use-package is installed.
 (progn
-  ;; Ensure package variables have been loaded before customizing them
+  ;; ensure package variables have been loaded before customizing them
   (require 'package)
 
   (setq custom-file (expand-file-name "custom.el" user-emacs-directory))

  (customize-set-variable 'inhibit-startup-screen t)
  (customize-set-variable 'ring-bell-function 'ignore))

(blink-cursor-mode -1)
(global-hl-line-mode 1)

(setq-default display-line-numbers-type 'relative
              display-line-numbers-width 3)
(global-display-line-numbers-mode t)

(setq-default backward-delete-char-untabify-method nil
              indent-tabs-mode nil
              tab-stop-list nil
              tab-width 4)

(add-hook 'before-save-hook
          'delete-trailing-whitespace)

    (require 'use-package))
  (customize-set-variable 'use-package-always-ensure t))

;; Disable backup files.
(cenouro/customize 'auto-save-default nil
                   'backup-inhibited t
                   'make-backup-files nil)

;; Simplify GUI, disable bell and startup screen. Always start
;; maximized.
(progn
  (menu-bar-mode -1)
