Emacs: Clean up basics/package-management.
This commit is contained in:
parent
3bc8ad73ac
commit
dff78b1b21
|
@ -1,12 +1,14 @@
|
||||||
;;; package-management.el --- Initialize package management. -*- lexical-binding: t; -*-
|
;;; package-management.el --- Initialize package management. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2020-02-26T23:29:23+0100>
|
;; Time-stamp: <2020-02-27T02:50:57+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; * Sets up package sources and their priorities.
|
;; * Set up package sources and their priorities.
|
||||||
;; * Sets up use-package.
|
;; * Set up use-package.
|
||||||
;; * Compile elisp files.
|
;; * Compile elisp files.
|
||||||
|
;; * Update keyring.
|
||||||
;; * Update packages.
|
;; * Update packages.
|
||||||
|
;; * Set up quelpa.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
@ -15,14 +17,13 @@
|
||||||
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
|
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
|
||||||
(add-to-list 'package-archives
|
(add-to-list 'package-archives
|
||||||
'("melpa" . "https://melpa.org/packages/") t)
|
'("melpa" . "https://melpa.org/packages/") t)
|
||||||
(setq package-archive-priorities '(
|
(setq package-archive-priorities '(("melpa-stable" . 30)
|
||||||
("melpa-stable" . 30)
|
|
||||||
("gnu" . 20)
|
("gnu" . 20)
|
||||||
("melpa" . 10)
|
("melpa" . 10)))
|
||||||
))
|
|
||||||
|
|
||||||
;; Workaround for 26.2 <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341>.
|
;; Workaround for 26.2 <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341>.
|
||||||
(defvar gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
(when (< emacs-major-version 27)
|
||||||
|
(defvar gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))
|
||||||
|
|
||||||
(when (< emacs-major-version 27)
|
(when (< emacs-major-version 27)
|
||||||
(package-initialize))
|
(package-initialize))
|
||||||
|
@ -34,7 +35,6 @@
|
||||||
(unless (package-installed-p 'use-package)
|
(unless (package-installed-p 'use-package)
|
||||||
(package-refresh-contents)
|
(package-refresh-contents)
|
||||||
(package-install 'use-package))
|
(package-install 'use-package))
|
||||||
|
|
||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(require 'use-package))
|
(require 'use-package))
|
||||||
|
|
||||||
|
@ -42,21 +42,14 @@
|
||||||
(require 'basics/global-variables)
|
(require 'basics/global-variables)
|
||||||
|
|
||||||
;; Always install packages if they are not present.
|
;; Always install packages if they are not present.
|
||||||
(use-package use-package-ensure
|
(use-package use-package
|
||||||
:ensure nil
|
:custom (use-package-always-ensure t)
|
||||||
|
|
||||||
:custom
|
|
||||||
(use-package-always-ensure t)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Autocompile files as needed.
|
;; Autocompile files on load.
|
||||||
(use-package auto-compile
|
(use-package auto-compile
|
||||||
:custom
|
:custom (load-prefer-newer t) ; Use uncompiled file if it is newer.
|
||||||
;; Use uncompiled file if it is newer than the compiled one.
|
:config (auto-compile-on-load-mode))
|
||||||
(load-prefer-newer t)
|
|
||||||
|
|
||||||
:config
|
|
||||||
(auto-compile-on-load-mode))
|
|
||||||
|
|
||||||
;; Tool for updating the GNU ELPA keyring.
|
;; Tool for updating the GNU ELPA keyring.
|
||||||
(use-package gnu-elpa-keyring-update
|
(use-package gnu-elpa-keyring-update
|
||||||
|
@ -74,12 +67,11 @@
|
||||||
|
|
||||||
;; Update packages if at least 7 days have passed.
|
;; Update packages if at least 7 days have passed.
|
||||||
(use-package auto-package-update
|
(use-package auto-package-update
|
||||||
:custom
|
:custom ((auto-package-update-delete-old-versions t)
|
||||||
(auto-package-update-delete-old-versions t)
|
|
||||||
(auto-package-update-interval 7)
|
(auto-package-update-interval 7)
|
||||||
(auto-package-update-hide-results nil)
|
(auto-package-update-hide-results nil))
|
||||||
:config
|
:config (auto-package-update-maybe)
|
||||||
(auto-package-update-maybe))
|
)
|
||||||
|
|
||||||
;; Install Emacs packages directly from source.
|
;; Install Emacs packages directly from source.
|
||||||
(use-package quelpa
|
(use-package quelpa
|
||||||
|
|
Loading…
Reference in New Issue
Block a user