Emacs: Prevent auto-package-update from updating quelpa packages.
This commit is contained in:
parent
3c6da46f52
commit
6adb4c20ee
|
@ -1,6 +1,6 @@
|
|||
;;; package-management.el --- Initialize package management. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-03-10T13:33:32+0100>
|
||||
;; Time-stamp: <2020-03-11T10:41:09+0100>
|
||||
|
||||
;;; Commentary:
|
||||
;; * Set up package sources and their priorities.
|
||||
|
@ -63,10 +63,30 @@
|
|||
|
||||
;; Update packages if at least 7 days have passed.
|
||||
(use-package auto-package-update
|
||||
:after (quelpa)
|
||||
:demand t
|
||||
:defines (quelpa-cache)
|
||||
:custom ((auto-package-update-delete-old-versions t)
|
||||
(auto-package-update-interval 7)
|
||||
(auto-package-update-hide-results nil))
|
||||
:config (auto-package-update-maybe))
|
||||
:config (progn
|
||||
(auto-package-update-maybe)
|
||||
(defvar my/tmp--package-activated-list nil)
|
||||
(defun my/apu-delete-quelpa-packages ()
|
||||
"Delete quelpa packages from `package-activated-list'."
|
||||
(setq my/tmp--package-activated-list package-activated-list)
|
||||
(dolist (package quelpa-cache)
|
||||
(let ((package-name (car package)))
|
||||
(setq package-activated-list
|
||||
(delq package-name package-activated-list)))))
|
||||
(defun my/apu-restore-quelpa-packages ()
|
||||
"Restore quelpa packages to `package-activated-list'."
|
||||
(if my/tmp--package-activated-list
|
||||
(setq package-activated-list my/tmp--package-activated-list)
|
||||
(message "Error: Could not restore `package-activated-list'."))
|
||||
(setq my/tmp--package-activated-list nil)))
|
||||
:hook ((auto-package-update-before . my/apu-delete-quelpa-packages)
|
||||
(auto-package-update-after . my/apu-restore-quelpa-packages)))
|
||||
|
||||
;; Install Emacs packages directly from source.
|
||||
(use-package quelpa
|
||||
|
|
Loading…
Reference in New Issue
Block a user