From 41f614699b3917952ad4d6d3b304959b619b2f4c Mon Sep 17 00:00:00 2001 From: Riyyi Date: Tue, 30 Mar 2021 11:12:16 +0200 Subject: [PATCH] Improve package updating keybind --- .config/emacs/config.org | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.config/emacs/config.org b/.config/emacs/config.org index bfa139f..f7e5a5e 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -62,6 +62,7 @@ - [[#functions][Functions]] - [[#general-functions][General Functions]] - [[#package-functions][Package Functions]] + - [[#auto-package-update-functions][Auto Package Update Functions]] - [[#centaur-tabs-functions][Centaur Tabs Functions]] - [[#dashboard-functions][Dashboard Functions]] - [[#evil-functions][Evil functions]] @@ -1184,6 +1185,17 @@ Functions that are only used for hook calls. Functions that use package functionality. +*** Auto Package Update Functions + +#+BEGIN_SRC emacs-lisp +(defun dot/update-packages () + "Update all packages." + (interactive) + (package-refresh-contents) + (auto-package-update-now) + (package-quickstart-refresh)) +#+END_SRC + *** Centaur Tabs Functions #+BEGIN_SRC emacs-lisp @@ -1860,7 +1872,7 @@ General.el ~leader key binds. "t w" '(visual-line-mode :which-key "Toggle line wrapping") ;; Update packages - "U" '(auto-package-update-now :which-key "Update packages") + "U" '(dot/update-packages :which-key "Update packages") ;; Window "w" '(:ignore t :which-key "window")