Juanma Barranquero <[EMAIL PROTECTED]> writes: >> version< is useful for comparing version number strings.
> So I suppose I'm just a bit surprised at the thought of adding two > variables, seven functions and one alias just to do version > comparison. Not even the `integer-list-*' functions are general, as > they consider '(1) and '(1 0) to be equal, which doesn't strike me as > a very common need. They would be better named `version-list-*', IMO. I agree -- and I just changed their names accordingly. I also fixed a bug that caused e.g. (version< "1" "1.0") to trap. Finally, I changed version= from being an alias for string-equal to using the provided version-list-= function. Before my change: (version< "1" "1.0") => nil (version<= "1" "1.0") => t (version= "1" "1.0") => nil With my change, it gives the logical result. (version= "1" "1.0") => t I don't know the rationale for aliasing version= to string-equal, but to me it was logically wrong to do so -- and if someone wants to use string-equal, they should do so! BTW, I agree with Juanma that this is hardly the time to add this stuff... ..but now that it has happened, I think it makes sense for these functions to accept an optional argument to limit the number of version string elements to compare. E.g. (version= "22.0.50" "22.0.50.37") => nil (version= "22.0.50.36" "22.0.50.37") => nil (version= "22.0.50" "22.0.50.37" 3) => t (version= "22.0.50.36" "22.0.50.37" 3) => t -- Kim F. Storm <[EMAIL PROTECTED]> http://www.cua.dk _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel