Skip to content

Commit

Permalink
Merge pull request clojure-emacs#507 from carlosgeos/fix-506
Browse files Browse the repository at this point in the history
[Fix clojure-emacs#506] fix clojure-mode-display-version
  • Loading branch information
cichli committed Feb 27, 2019
2 parents 22f5395 + 344e382 commit 2d6ccab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Dynamic vars whose names contain non-alphanumeric characters are now font-locked correctly.
* [#445 (comment)](https://github.com/clojure-emacs/clojure-mode/issues/445#issuecomment-340460753): Proper font lock for namespaced keywords like for example `(s/def ::keyword)`
* [#508](https://github.com/clojure-emacs/clojure-mode/issues/508): Fix font lock for namespaces with metadata
* [#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

0 comments on commit 2d6ccab

Please sign in to comment.