GNU bug report logs -
#12314
24.2.50; `add-to-history': use `setq' with `delete'
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Thu, 30 Aug 2012 23:10:01 UTC
Severity: normal
Found in version 24.2.50
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #76 received at 12314 <at> debbugs.gnu.org (full text, mbox):
Chong Yidong <cyd <at> gnu.org> writes:
> Eli Zaretskii <eliz <at> 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.
This bug report was last modified 12 years and 250 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.