purcell / package-lint

A linting library for elisp package metadata
GNU General Public License v3.0
193 stars 34 forks source link

Use string= to compare filenames #174

Closed riscy closed 4 years ago

riscy commented 4 years ago

I was running into some issues until I discovered the call to eq.

purcell commented 4 years ago

Oh, weird, they're usually pretty interchangeable. But yes, better to be explicit - thanks!

Fanael commented 4 years ago

They're not interchangeable on strings, two different string objects (object identity being what eq compares) can consist of the same characters (which is what string= compares).

eq does the right thing pretty much only for fixnums and symbols, and with the introduction of bignums in emacs 27 even using it for fixnums is iffy, because not all integers are fixnums anymore.

purcell commented 4 years ago

Makes sense -- I was probably thinking of equal.