Skip to content

Commit

Permalink
Remove pkg-info dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
phikal committed Aug 27, 2021
1 parent 6bbc1e5 commit 1987c75
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions elixir-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
;; Created: Mon Nov 7 2011
;; Keywords: languages elixir
;; Version: 2.4.0
;; Package-Requires: ((emacs "25") (pkg-info "0.6"))
;; Package-Requires: ((emacs "25"))

;; This file is not a part of GNU Emacs.

Expand All @@ -38,7 +38,6 @@

(require 'easymenu) ; Elixir Mode menu definition
(require 'elixir-smie) ; Syntax and indentation support
(require 'pkg-info) ; Display Elixir Mode package version
(require 'elixir-format) ; Elixir Format functions

(defgroup elixir nil
Expand Down Expand Up @@ -478,7 +477,14 @@ If the version number could not be determined, signal an error,
if called interactively, or if SHOW-VERSION is non-nil, otherwise
just return nil."
(interactive (list t))
(let ((version (pkg-info-version-info 'elixir-mode)))
(let ((version (eval-when-compile
(or (ignore-errors
(require 'lisp-mnt)
(let ((file (or load-file-name buffer-file-name)))
(with-temp-buffer
(insert-file-contents file)
(lm-header "Version"))))
"Unknown"))))
(when show-version
(message "Elixir-Mode version: %s" version))
version))
Expand Down

0 comments on commit 1987c75

Please sign in to comment.