Add doom/version command
This commit is contained in:
parent
4ef70174b0
commit
7269abbe2f
2 changed files with 16 additions and 0 deletions
|
@ -113,3 +113,18 @@ in, or d) the module associated with the current major mode (see
|
||||||
(fill-region (point-min) (point-max)))
|
(fill-region (point-min) (point-max)))
|
||||||
(quiet! (indent-region (point-min) (point-max))))
|
(quiet! (indent-region (point-min) (point-max))))
|
||||||
(string-trim (buffer-string))))
|
(string-trim (buffer-string))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom/version ()
|
||||||
|
"Display the current version of Doom & Emacs, including the current Doom
|
||||||
|
branch and commit."
|
||||||
|
(interactive)
|
||||||
|
(message "Doom v%s (Emacs v%s). Branch: %s. Commit: %s."
|
||||||
|
doom-version
|
||||||
|
emacs-version
|
||||||
|
(if-let* ((branch (vc-git--symbolic-ref "core/core.el")))
|
||||||
|
branch
|
||||||
|
"n/a")
|
||||||
|
(if-let* ((rev (vc-git-working-revision "core/core.el")))
|
||||||
|
rev
|
||||||
|
"n/a")))
|
||||||
|
|
|
@ -230,6 +230,7 @@
|
||||||
:desc "Reload theme" :n "R" #'doom//reload-theme
|
:desc "Reload theme" :n "R" #'doom//reload-theme
|
||||||
:desc "Describe DOOM setting" :n "s" #'doom/describe-setting
|
:desc "Describe DOOM setting" :n "s" #'doom/describe-setting
|
||||||
:desc "Describe variable" :n "v" #'describe-variable
|
:desc "Describe variable" :n "v" #'describe-variable
|
||||||
|
:desc "Print Doom version" :n "V" #'doom/version
|
||||||
:desc "Describe at point" :n "." #'helpful-at-point
|
:desc "Describe at point" :n "." #'helpful-at-point
|
||||||
:desc "What face" :n "'" #'doom/what-face
|
:desc "What face" :n "'" #'doom/what-face
|
||||||
:desc "What minor modes" :n ";" #'doom/what-minor-mode)
|
:desc "What minor modes" :n ";" #'doom/what-minor-mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue