auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Patch to tex-info.el to support node name completion in @..


From: Vincent Belaïche
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 21:20:57 +0100

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: address@hidden
> To: address@hidden
> CC: address@hidden; address@hidden
> 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
                                          


reply via email to

[Prev in Thread] Current Thread [Next in Thread]