GNU bug report logs -
#18253
24.4.50; doc string of `remq': correct it per the doc of `remove'
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Tue, 12 Aug 2014 15:00:02 UTC
Severity: minor
Found in version 24.4.50
Done: Christoph <cschol2112 <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> > There is nothing wrong with letting users know the actual behavior.
>
> Of course there is: there is another possible behavior, which would
> generally be superior but which we didn't bother to implement (yet).
That's a pretty facile "of course". Of course you can document now
the behavior it has now, and if and when you ever change the behavior
you can update the doc accordingly. It's not like you just invented
`remq' - it's nearly as old as Lisp (at least as old as ZetaLisp).
And most (all other?) Lisps have given it the same behavior as `remove',
the only difference being to use `eq' instead of `equal'. IOW, they
systematically copy the sequence. All the more reason to let users
know that Emacs Lisp is exceptional in this regard.
It is this part of the Emacs definition that differs from the usual
definition, and makes Emacs `remq' unparallel with Emacs `remove':
(while (and (eq elt (car list)) (setq list (cdr list))))
This bug report was last modified 10 years and 328 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.