aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/editorconfig.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/editorconfig.el')
-rw-r--r--lisp/editorconfig.el60
1 files changed, 30 insertions, 30 deletions
diff --git a/lisp/editorconfig.el b/lisp/editorconfig.el
index 46b5843f99f..02186e42891 100644
--- a/lisp/editorconfig.el
+++ b/lisp/editorconfig.el
@@ -761,36 +761,36 @@ Meant to be used on `hack-dir-local-get-variables-functions'."
761;; (lm-version)) 761;; (lm-version))
762;; "EditorConfig version.") 762;; "EditorConfig version.")
763 763
764;;;###autoload 764;; ;;;###autoload
765(defun editorconfig-version (&optional show-version) 765;; (defun editorconfig-version (&optional show-version)
766 "Get EditorConfig version as string. 766;; "Get EditorConfig version as string.
767 767;;
768If called interactively or if SHOW-VERSION is non-nil, show the 768;; If called interactively or if SHOW-VERSION is non-nil, show the
769version in the echo area and the messages buffer." 769;; version in the echo area and the messages buffer."
770 (interactive (list t)) 770;; (interactive (list t))
771 (let ((version-full 771;; (let ((version-full
772 (if (fboundp 'package-get-version) 772;; (if (fboundp 'package-get-version)
773 (package-get-version) 773;; (package-get-version)
774 (let* ((version 774;; (let* ((version
775 (with-temp-buffer 775;; (with-temp-buffer
776 (require 'find-func) 776;; (require 'find-func)
777 (declare-function find-library-name "find-func" (library)) 777;; (declare-function find-library-name "find-func" (library))
778 (insert-file-contents (find-library-name "editorconfig")) 778;; (insert-file-contents (find-library-name "editorconfig"))
779 (require 'lisp-mnt) 779;; (require 'lisp-mnt)
780 (declare-function lm-version "lisp-mnt" nil) 780;; (declare-function lm-version "lisp-mnt" nil)
781 (lm-version))) 781;; (lm-version)))
782 (pkg (and (eval-and-compile (require 'package nil t)) 782;; (pkg (and (eval-and-compile (require 'package nil t))
783 (cadr (assq 'editorconfig 783;; (cadr (assq 'editorconfig
784 package-alist)))) 784;; package-alist))))
785 (pkg-version (and pkg (package-version-join 785;; (pkg-version (and pkg (package-version-join
786 (package-desc-version pkg))))) 786;; (package-desc-version pkg)))))
787 (if (and pkg-version 787;; (if (and pkg-version
788 (not (string= version pkg-version))) 788;; (not (string= version pkg-version)))
789 (concat version "-" pkg-version) 789;; (concat version "-" pkg-version)
790 version))))) 790;; version)))))
791 (when show-version 791;; (when show-version
792 (message "EditorConfig Emacs v%s" version-full)) 792;; (message "EditorConfig Emacs v%s" version-full))
793 version-full)) 793;; version-full))
794 794
795(provide 'editorconfig) 795(provide 'editorconfig)
796;;; editorconfig.el ends here 796;;; editorconfig.el ends here