Add doom/version command

This commit is contained in:
Henrik Lissner 2018-05-07 18:10:58 +02:00
parent 4ef70174b0
commit 7269abbe2f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 16 additions and 0 deletions

View file

@ -113,3 +113,18 @@ in, or d) the module associated with the current major mode (see
(fill-region (point-min) (point-max)))
(quiet! (indent-region (point-min) (point-max))))
(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")))