bbatsov / emacs-lisp-style-guide

A community-driven Emacs Lisp style guide
1.08k stars 53 forks source link

Remind people to define a version number defconst #32

Closed Malabarba closed 9 years ago

Malabarba commented 9 years ago

Besides the ;; Version: comment, it's useful for packages to define their version numbers as variables. Something like the following should be enough.

(defconst PACKAGE-version "1.3" "PACKAGE's version number.")
bbatsov commented 9 years ago

Or we can promote the use of methods like lm-version (example here).

Malabarba commented 9 years ago

Sure, whichever people prefer.

bbatsov commented 9 years ago

Ping :-) Any thoughts on this?

dgutov commented 9 years ago

I like the second option, naturally.

bbatsov commented 9 years ago

Any idea when lm-version was introduced?

dgutov commented 9 years ago

Before 1992.

swsnr commented 9 years ago

@Bruce-Connor I don't like these version constants. These days, they are redundant at best—we have the version in package headers anyway—and wrong at worst—if they diverge from the official version in the headers.

We should really recommend lm-version.

bbatsov commented 9 years ago

Yeah, seems there's a consensus regarding this. :-)

Malabarba commented 9 years ago

Yes. lm-version os certainly much better.