New answers tagged

0

Assuming you actually intend comparing strings, many cl-lib functions support a :test keyword argument to specify the comparison function: (cl-member "foo" '(foo bar baz) :test 'string-equal)


2

Your code works fine, for me. (when (member last-command (list 'foo 'bar 'bob 'baz)) (do-something)) First, last-command is typically a symbol, not a string. There is no reason to use string-equal for two symbols. It works, but it is slower - it just converts the symbols to strings and then compares those strings. The best way to compare two symbols ...


Top 50 recent answers are included