jcollard / elm-mode

Elm mode for emacs
GNU General Public License v3.0
373 stars 67 forks source link

Fix cl-case so that it doesn't match 'quote #191

Closed odanoburu closed 1 year ago

odanoburu commented 1 year ago

While this won't ever happen, it shuts up a compilation warning. Explanation: 'other becomes (quote other) which cl-case then interprets as a list, meaning "if it matches either the symbol quote or the symbol other, then follow this branch". Similar to how

(cl-case x
  ((1 2) t))

will return t when x is either 1 or 2.

Maybe the relevant part of the manual should be rewritten to make this more explicit…

purcell commented 1 year ago

Thanks — I pushed an alternate fix for this, instead switching the code to use pcase instead of cl-case.