From 30eee3ad3a4742eec39eeac458e460e604522b2e Mon Sep 17 00:00:00 2001 From: JesusMtnez Date: Tue, 4 Jun 2019 10:33:54 +0200 Subject: [PATCH 1/3] Check package.el using featurep --- dashboard-widgets.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard-widgets.el b/dashboard-widgets.el index e9011888..4668d562 100644 --- a/dashboard-widgets.el +++ b/dashboard-widgets.el @@ -90,7 +90,7 @@ to the specified width, with aspect ratio preserved." (defvar dashboard-init-info ;; Check if package.el was loaded and if package loading was enabled - (if (bound-and-true-p package-enable-at-startup) + (if (featurep 'package) (format "%d packages loaded in %s" (length package-activated-list) (emacs-init-time)) (format "Emacs started in %s" (emacs-init-time))) From 58b770074ac9274bc27ff567d3403102d5bf2760 Mon Sep 17 00:00:00 2001 From: JesusMtnez Date: Tue, 4 Jun 2019 18:42:23 +0200 Subject: [PATCH 2/3] Check using bound-and-true-p package-alist --- dashboard-widgets.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard-widgets.el b/dashboard-widgets.el index 4668d562..7e9fd9c8 100644 --- a/dashboard-widgets.el +++ b/dashboard-widgets.el @@ -90,7 +90,7 @@ to the specified width, with aspect ratio preserved." (defvar dashboard-init-info ;; Check if package.el was loaded and if package loading was enabled - (if (featurep 'package) + (if (bound-and-true-p package-alist) (format "%d packages loaded in %s" (length package-activated-list) (emacs-init-time)) (format "Emacs started in %s" (emacs-init-time))) From f654e9eda8e7c4c9c94f5f84655e735a316b6096 Mon Sep 17 00:00:00 2001 From: JesusMtnez Date: Tue, 4 Jun 2019 18:46:16 +0200 Subject: [PATCH 3/3] Proper support for straight.el --- dashboard-widgets.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dashboard-widgets.el b/dashboard-widgets.el index 7e9fd9c8..b19815b6 100644 --- a/dashboard-widgets.el +++ b/dashboard-widgets.el @@ -93,7 +93,10 @@ to the specified width, with aspect ratio preserved." (if (bound-and-true-p package-alist) (format "%d packages loaded in %s" (length package-activated-list) (emacs-init-time)) - (format "Emacs started in %s" (emacs-init-time))) + (if (and (boundp 'straight--profile-cache) (hash-table-p straight--profile-cache)) + (format "%d packages loaded in %s" + (hash-table-size straight--profile-cache) (emacs-init-time)) + (format "Emacs started in %s" (emacs-init-time)))) "Init info with packages loaded and init time.") (defvar dashboard-footer