[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: |
Drew Adams |
Subject: |
bug#12314: 24.2.50; `add-to-history': use `setq' with `delete' |
Date: |
Sat, 8 Sep 2012 09:54:27 -0700 |
> > Even if the element is not the first one, you always have
> > to think about other references that may exist to the
> > cons that is removed.
>
> Sorry, I'm not sure how this is related. Please elaborate.
(Think pointers.) A variable stays pointed to the same cons cell - these
operations do not change that. But they can change the relations among cons
cells: which of them point to which others.
(setq a '(1 2 3 4))
(setq b (cddr a))
a => (1 2 3 4)
b => (3 4)
(delq 4 b)
a => (1 2 3)
b => (3)
The value of variable `a' was changed by changing the value of `b', because `b'
points to a cons cell that is used in the list structure pointed to by `a'.
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Chong Yidong, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Eli Zaretskii, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Drew Adams, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Eli Zaretskii, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Drew Adams, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Eli Zaretskii, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Andreas Schwab, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Eli Zaretskii, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Lars Ingebrigtsen, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete',
Drew Adams <=
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Andreas Schwab, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Drew Adams, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Drew Adams, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Eli Zaretskii, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Drew Adams, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Eli Zaretskii, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Drew Adams, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Eli Zaretskii, 2012/09/08
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Drew Adams, 2012/09/09
- bug#12314: 24.2.50; `add-to-history': use `setq' with `delete', Chong Yidong, 2012/09/09