ui/doom-dashboard: show command at point in echo-area

This commit is contained in:
Henrik Lissner 2019-03-01 18:28:55 -05:00
parent 21e01189b9
commit 735ec58b36
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 17 additions and 9 deletions

View file

@ -1,5 +1,10 @@
;;; ui/doom-dashboard/autoload.el -*- lexical-binding: t; -*-
(defun +doom-dashboard--help-echo ()
(when-let* ((btn (button-at (point)))
(msg (button-get btn 'help-echo)))
(message "%s" msg)))
;;;###autoload
(defun +doom-dashboard/open (frame)
"Switch to the dashboard in the current window, of the current FRAME."
@ -12,10 +17,12 @@
(defun +doom-dashboard/forward-button (n)
"Like `forward-button', but don't wrap."
(interactive "p")
(forward-button n nil))
(forward-button n nil)
(+doom-dashboard--help-echo))
;;;###autoload
(defun +doom-dashboard/backward-button (n)
"Like `backward-button', but don't wrap."
(interactive "p")
(backward-button n nil))
(backward-button n nil)
(+doom-dashboard--help-echo))