Skip to content

Commit 421b265

Browse files
committed
Add a command to display the inf-clojure version
1 parent 59cd1f3 commit 421b265

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### New Features
66

77
* [#34](https://github.com/clojure-emacs/inf-clojure/pull/34): Add support for socket REPL connections.
8+
* New interactive command `inf-clojure-display-version`.
89

910
### Bugs Fixed
1011

inf-clojure.el

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
"Run an external Clojure process (REPL) in an Emacs buffer."
4949
:group 'clojure)
5050

51+
(defconst inf-clojure-version "1.5.0-snapshot"
52+
"The current version of `inf-clojure'.")
53+
5154
(defcustom inf-clojure-prompt-read-only t
5255
"If non-nil, the prompt will be read-only.
5356
@@ -83,7 +86,9 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword
8386
["Show documentation for var" inf-clojure-show-var-documentation t]
8487
["Show source for var" inf-clojure-show-var-source t]
8588
"--"
86-
["Clear REPL" inf-clojure-clear-repl-buffer]))
89+
["Clear REPL" inf-clojure-clear-repl-buffer]
90+
"--"
91+
["Version" inf-clojure-display-version]))
8792
map))
8893

8994
(defvar inf-clojure-minor-mode-map
@@ -777,6 +782,11 @@ Return the number of nested sexp the point was over or after."
777782
(setq-local eldoc-documentation-function #'inf-clojure-eldoc)
778783
(apply #'eldoc-add-command inf-clojure-extra-eldoc-commands))
779784

785+
(defun inf-clojure-display-version ()
786+
"Display the current `inf-clojure' in the minibuffer."
787+
(interactive)
788+
(message "inf-clojure (version %s)" inf-clojure-version))
789+
780790
(provide 'inf-clojure)
781791

782792
;;; inf-clojure.el ends here

0 commit comments

Comments
 (0)