Ok, I should have read the *Help* more carefully, it states
(cl-pushnew X PLACE): insert X at the head of the list if not already there. and I understood "there" as meaning "head of the list", instead of just "list". Of course the next sentence in the docstring clarifies the point, but I overlooked it. Maybe it could be rephrased as: (cl-pushnew X PLACE): insert X at the head of list PLACE unless X is already an element of PLACE. If you agree with the rephrasal, I can implement the change. Vincent. ---------------------------------------- > From: monn...@iro.umontreal.ca > To: vincent....@hotmail.fr > CC: t...@gnu.org; auctex@gnu.org > Subject: Re: [AUCTeX] Patch to tex-info.el to support node name completion in > @..ref commands, and solve a few other pbs > Date: Mon, 26 Oct 2015 13:34:57 -0400 > >> interest. Some time ago Stefan Monnier changed add-to-list by pushnew, I >> don't know what the motivation was, probably somebody had complained >> that add-to-list was taking too much time. > > add-to-list doesn't work on lexical variables. > >> However these are not functionally equivalent, pushnew will skip the >> replacement only if the node name is already there on top of the list, >> while add-to-list will skip it if it is already there at any place. > > Not so: (cl-)pushnew looks at the whole list as well. > > I don't have much opinion on this function in general, since I don't > use it. All I care about is to not re-introduce the > add-to-list abomination (it's fine for use in a user's ~/.emacs to add > some element to a global variable, but definitely not when operating on > a let-bound variable). > > > Stefan _______________________________________________ auctex mailing list auctex@gnu.org https://lists.gnu.org/mailman/listinfo/auctex