On Tue, Dec 3, 2019 at 3:23 PM Mattias Engdegård <address@hidden> wrote:
> ((and (symbolp arg)
> (let ((class (cdr (assq arg rx--char-classes))))
> - (and class (push class classes)))))
> + (and class
> + (or (memq class classes)
> + (push class classes))))))
This (which is a branch of a `cond') relies in the fact that (push ELEMENT LISTNAME)
returns the new LISTNAME.
Which isn't really documented. It's sort-of-documented because push's docstring
says that it is "morally equivalent to (setf place (cons newelt place)", and the
elisp manual says that it is "equivalent to (setq ...)" or that it "does the
equivalent of (setf ...)".
Shouldn't we say it in its docstring?
(BTW, push's args are called ELEMENT and LISTNAME in the manual, NEWELT and PLACE
in the code. Frankly, I think they should be ELEMENT and PLACE in both cases.)