;;; init.el --- Initialize my Emacs configuration ;;; Commentary: ;;; Code: (setq gc-cons-threshold 64000000) (add-hook 'after-init-hook #'(lambda () ;; restore after startup (setq gc-cons-threshold 800000))) (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (progn (message "initializing package") (package-initialize)) (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) (eval-when-compile (require 'use-package)) (setq use-package-verbose t) (setq use-package-always-ensure nil) (defun my/package-install-refresh-contents (&rest args) "Refresh the package content, takes an optional ARGS." ;; Whenever use-package statements use ensure (directly or via ;; use-package-always-ensure), we need to refresh the package contents first, ;; as installation fails otherwise: ;; https://github.com/jwiegley/use-package/issues/256#issuecomment-263313693 (package-refresh-contents) (advice-remove 'package-install 'my/package-install-refresh-contents)) (advice-add 'package-install :before 'my/package-install-refresh-contents) (require 'my-settings (expand-file-name "custom/my-settings" user-emacs-directory)) (require 'my-ui (expand-file-name "custom/my-ui" user-emacs-directory)) (require 'my-navigation (expand-file-name "custom/my-navigation" user-emacs-directory)) (require 'my-edit (expand-file-name "custom/my-edit" user-emacs-directory)) (require 'my-text (expand-file-name "custom/my-text" user-emacs-directory)) (require 'my-git (expand-file-name "custom/my-git" user-emacs-directory)) (require 'my-org (expand-file-name "custom/my-org" user-emacs-directory)) (require 'fcuny-conf (expand-file-name "custom/fcuny-conf" user-emacs-directory)) (require 'fcuny-prog (expand-file-name "custom/fcuny-prog" user-emacs-directory)) (require 'fcuny-eshell (expand-file-name "custom/fcuny-eshell" user-emacs-directory)) (require 'fcuny-tramp (expand-file-name "custom/fcuny-tramp" user-emacs-directory)) (require 'fcuny-notmuch (expand-file-name "custom/fcuny-notmuch" user-emacs-directory)) ;; ;; (require 'fcuny-defuns) ;; ;; (require 'fcuny-commands) ;; ;; (require 'my-work) ;;; init.el ends here