emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [nongnu] elpa/clojure-ts-mode 649bf1120f: Improve the package versio


From: Philip Kaludercic
Subject: Re: [nongnu] elpa/clojure-ts-mode 649bf1120f: Improve the package version reporting
Date: Tue, 04 Jun 2024 09:09:38 +0000

ELPA Syncer <elpasync@gnu.org> writes:

> branch: elpa/clojure-ts-mode
> commit 649bf1120f10250d464d4e9ad1905b481d2e504c
> Author: Bozhidar Batsov <bozhidar@batsov.dev>
> Commit: Bozhidar Batsov <bozhidar@batsov.dev>
>
>     Improve the package version reporting
> ---
>  clojure-ts-mode.el | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/clojure-ts-mode.el b/clojure-ts-mode.el
> index 99f28cd20a..d2be3e737c 100644
> --- a/clojure-ts-mode.el
> +++ b/clojure-ts-mode.el
> @@ -54,7 +54,6 @@
>  
>  ;;; Code:
>  (require 'treesit)
> -(require 'lisp-mnt)
>  
>  (declare-function treesit-parser-create "treesit.c")
>  (declare-function treesit-node-eq "treesit.c")
> @@ -71,8 +70,7 @@
>    :link '(emacs-commentary-link :tag "Commentary" "clojure-mode"))
>  
>  (defconst clojure-ts-mode-version
> -  (eval-when-compile
> -    (lm-version (or load-file-name buffer-file-name)))
> +  "0.2.2"
>    "The current version of `clojure-ts-mode'.")
>  
>  (defcustom clojure-ts-comment-macro-font-lock-body nil
> @@ -884,7 +882,10 @@ forms like deftype, defrecord, reify, proxy, etc."
>  (defun clojure-ts-mode-display-version ()
>    "Display the current `clojure-mode-version' in the minibuffer."
>    (interactive)
> -  (message "clojure-ts-mode (version %s)" clojure-ts-mode-version))
> +  (let ((pkg-version (package-get-version)))
> +    (if pkg-version
> +        (message "clojure-ts-mode %s (package: %s)" clojure-ts-mode-version 
> pkg-version)
> +      (message "clojure-ts-mode %s" clojure-ts-mode-version))))
>  
>  (defconst clojure-ts-grammar-recipes
>    '((clojure "https://github.com/sogaiu/tree-sitter-clojure.git";

I don't understand the point of this change.  If you duplicate the
information of the package version anyway, then why use
`package-get-version' at all?  The only advantage this seems to bring is
that if you forget to bump the version in `clojure-ts-mode-version' that
you can find out about the discrepancy, but then it is too late and
confusing.

(Generally, I just don't think these kinds of "version information"
commands are really useful anymore, at least since package management
has become the widespread norm.)

-- 
        Philip Kaludercic on peregrine



reply via email to

[Prev in Thread] Current Thread [Next in Thread]