Skip to content

[Fix #506] fix clojure-mode-display-version #507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Bugs fixed

* Dynamic vars whose names contain non-alphanumeric characters are now font-locked correctly.
* [#506](https://github.com/clojure-emacs/clojure-mode/issues/506): `clojure-mode-display-version` correctly displays the package's version

## 5.10.0 (2019-01-05)

Expand Down
5 changes: 4 additions & 1 deletion clojure-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@
:link '(url-link :tag "GitHub" "https://github.com/clojure-emacs/clojure-mode")
:link '(emacs-commentary-link :tag "Commentary" "clojure-mode"))

(defconst clojure-mode-version (lm-version)
(defconst clojure-mode-version
(let ((thisbuffer (or load-file-name buffer-file-name)))
(with-temp-buffer (insert-file-contents thisbuffer)
(lm-version)))
"The current version of `clojure-mode'.")

(defface clojure-keyword-face
Expand Down
4 changes: 4 additions & 0 deletions test/clojure-mode-util-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
(require 'cl-lib)
(require 'ert)


(ert-deftest clojure-mode-version-should-be-non-nil ()
(should (not (eq clojure-mode-version nil))))

(let ((project-dir "/home/user/projects/my-project/")
(clj-file-path "/home/user/projects/my-project/src/clj/my_project/my_ns/my_file.clj")
(project-relative-clj-file-path "src/clj/my_project/my_ns/my_file.clj")
Expand Down