bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12314: 24.2.50; `add-to-history': use `setq' with `delete'


From: Dmitry Gutov
Subject: bug#12314: 24.2.50; `add-to-history': use `setq' with `delete'
Date: Sun, 09 Sep 2012 12:25:25 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0

Chong Yidong <cyd@gnu.org> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> But the manual should cater first and foremost to newbies.  The rest
>> will get the point when they read the detailed description of how the
>> list is modified.
>
> I modified the manual to hopefully make the situation clearer.  In
> particular, the descriptions of delq and delete explicitly say that you
> typically ought to use the return value.
>
> The docstrings are harder, since they should be succinct.  Here is what
> I suggest; WDYT?
>
>
> (delq ELT LIST)
>
> ...
>
> Therefore, write `(setq foo (delq element foo))' to be sure of
> changing the value of `foo'.

I think the last sentence could be better: (a) the value of foo won't
necessarily change, even if we do (setq ...), (b) our goal is for foo to
have the correct value, some not changed one. How about this?

Therefore, write `(setq foo (delq element foo))' to make sure that
`foo' points to the result.





reply via email to

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