From 22006b0eaf357ec9ef1538492f497e4f0b8fb4bf Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 20 Jul 2026 23:31:59 -0500 Subject: fix(dashboard): make the bookmarks override real The top-level defun was clobbered when use-package reloaded dashboard-widgets, so the override never ran. Deferring it kept it alive but exposed a second bug: dashboard-insert-section is a macro, unknown at module compile time, so the body compiled as a function call and crashed void-variable at render. The override now registers after dashboard-widgets and compiles with the macro known. --- tests/test-dashboard-config.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/test-dashboard-config.el b/tests/test-dashboard-config.el index 2dbcd4f4..3a48ee56 100644 --- a/tests/test-dashboard-config.el +++ b/tests/test-dashboard-config.el @@ -56,5 +56,15 @@ start at the top. Without `set-window-start', batch redisplay leaves (when (buffer-live-p dash) (kill-buffer dash))))) +(ert-deftest test-dashboard-config-bookmark-override-deferred-to-package-load () + "Normal: the bookmarks override is defined exactly when dashboard-widgets is. +A bare top-level defun would exist even without the package (and be +clobbered when the package loads); the deferred registration means the +function tracks the package's own load state. Holds in both runners: +the hook env loads dashboard, the make-test env can't." + (if (featurep 'dashboard-widgets) + (should (fboundp 'dashboard-insert-bookmarks)) + (should-not (fboundp 'dashboard-insert-bookmarks)))) + (provide 'test-dashboard-config) ;;; test-dashboard-config.el ends here -- cgit v1.2.3