diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-14 08:07:33 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-14 08:07:33 -0500 |
| commit | 07246a1dd76e136bfee057ff993e9b3e152e03e3 (patch) | |
| tree | 70b1a161767fa5eedf21db98c02ac52e14da5261 /modules/dashboard-config.el | |
| parent | fe01f885df36016315d87ba8064e28b14fc77d72 (diff) | |
| download | dotemacs-07246a1dd76e136bfee057ff993e9b3e152e03e3.tar.gz dotemacs-07246a1dd76e136bfee057ff993e9b3e152e03e3.zip | |
feat(telega-config): guard launcher with a helpful message when telega is missing
Without the guard, both `C-; G' and the dashboard Telegram icon
trigger telega's autoload stub directly. When the package isn't
installed yet the user sees `Cannot open load file: telega' in
`*Messages*' with no hint about what to do.
Wrap the launcher in `cj/telega' that checks `featurep' /
`locate-library' first. If telega is present, delegate to it.
Otherwise signal a `user-error' pointing at `scripts/setup-telega.sh'
and the manual `M-x package-install RET telega' fallback. Rebind
`C-; G' and the dashboard "g" key + Telegram icon callback to the
wrapper.
Two new tests in `test-telega-config.el' cover the wrapper paths
(absent -> user-error with the recovery hint; present -> delegates
to `telega') alongside the updated binding assertion.
Diffstat (limited to 'modules/dashboard-config.el')
| -rw-r--r-- | modules/dashboard-config.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/dashboard-config.el b/modules/dashboard-config.el index 2fbed7168..b61129ad1 100644 --- a/modules/dashboard-config.el +++ b/modules/dashboard-config.el @@ -184,7 +184,7 @@ Adjust this if the title doesn't appear centered under the banner image.") ;; Row 3 ((,(nerd-icons-faicon "nf-fa-telegram") "Telegram" "Telega Telegram Client" - (lambda (&rest _) (telega)) + (lambda (&rest _) (cj/telega)) nil " " "")))) ;; == content @@ -208,7 +208,7 @@ Adjust this if the title doesn't appear centered under the banner image.") (define-key dashboard-mode-map (kbd "s") (lambda () (interactive) (cj/slack-start))) (define-key dashboard-mode-map (kbd "t") (lambda () (interactive) (vterm))) (define-key dashboard-mode-map (kbd "d") (lambda () (interactive) (dirvish user-home-dir))) - (define-key dashboard-mode-map (kbd "g") (lambda () (interactive) (telega)))) + (define-key dashboard-mode-map (kbd "g") (lambda () (interactive) (cj/telega)))) ;; Override banner title centering (must be after dashboard-widgets loads) (with-eval-after-load 'dashboard-widgets |
