mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Add doom/version command
This commit is contained in:
@ -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")))
|
||||
|
Reference in New Issue
Block a user