|
|
- ;; -*- lexical-binding: t; -*-
- ;;; custom-package-setup --- Provide setup for packages and use-package
-
- ;; Configure Melpa
- ;; Package management
- ;; set load-path manually
- ;; don't call package-initialize
- (eval-and-compile
- (setq load-prefer-newer t
- package-user-dir "~/.emacs.d/elpa"
- package--init-file-ensured t ; so it doesn't call package initialize
- package-enable-at-startup nil) ; do not automatically load packages
-
- (unless (file-directory-p package-user-dir)
- (make-directory package-user-dir t)))
-
- (setq use-package-verbose t
- use-package-always-defer nil ;I'm not used to that
- use-package-minimum-reported-time 0.01)
-
- ;; Initialize package management
- (eval-when-compile ; when byte compiled skip this
- (require 'package)
-
- ;; add aditional package archives
- (setq package-archives
- `(("gnu" . "https://elpa.gnu.org/packages/")
- ("melpa" . "https://melpa.org/packages/")
- ("org" . "https://orgmode.org/elpa/")))
-
- ;; initialize packages and ensure that use-package is installed
- (package-initialize)
- (unless (package-installed-p 'use-package)
- (package-refresh-contents)
- (package-install 'use-package)) ; install if it's missing
- (unless (package-installed-p 'diminish)
- (package-refresh-contents)
- (package-install 'diminish)) ; install if it's missing
- (require 'use-package)
- (require 'bind-key)
- (require 'diminish)
- (setq use-package-always-ensure t))
-
- (eval-and-compile
- (require 'use-package)
- (require 'bind-key)
- (require 'diminish)
- (bind-keys :prefix-map my-ctrl-x-b-map
- :prefix "C-x b")
- (bind-keys :prefix-map my-ctrl-x-ctrl-l-map
- :prefix "C-x C-l"))
-
-
- (provide 'custom-package-setup)
|