emacs-devel
[Top][All Lists]
Advanced

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

Re: need for 'dynamical-let'?


From: Stephen Leake
Subject: Re: need for 'dynamical-let'?
Date: Fri, 24 Jul 2015 03:16:26 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

Dmitry Gutov <address@hidden> writes:

> On 07/23/2015 11:54 PM, Stephen Leake wrote:
>
>> So I have to change code like this:
>>
>> (let (branch-list
>>        ...)
>>     (add-to-list branch-list (substring branch-entry 2) t)
>>
>>
>> to:
>>
>> (defvar dvc-branch-list);; add-to-list can't use lexical var
>> (let (
>>        ...)
>>     (add-to-list 'dvc-branch-list (substring branch-entry 2) t)
>
> You should use `push'. Or maybe `cl-pushnew'.

Except that 't' means add at tail, not at head. Is there a cl-* for
that? I only found 'cl-revappend'.

I can use 'append', followed by 'delete-dups'.

-- 
-- Stephe



reply via email to

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