* setq failure following list manipulation
@ 2006-04-20 8:37 Bill Lytton
2006-04-21 21:31 ` Kevin Rodgers
0 siblings, 1 reply; 2+ messages in thread
From: Bill Lytton @ 2006-04-20 8:37 UTC (permalink / raw
This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.
In GNU Emacs 21.3.1 (x86_64-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2005-08-09 on dolly.build.redhat.com
configured using `configure --host=x86_64-redhat-linux --build=x86_64-redhat-linux --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-pop --with-sound'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8
default-enable-multibyte-characters: t
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
bug or feature?:
quoted arg for setq in function call no longer works after maninpulating list
using global variable
(defun ae () (setq nums '(1 2 3)))
(nconc nums (list 4))
(ae) ;; returns (1 2 3 4)
nums ;; returns (1 2 3 4)
Recent input:
Recent messages:
History item: 4
History item: 3
History item: 2
Mark saved where search started
Mark set [6 times]
History item: 1
History item: 2
Mark saved where search started [2 times]
Loading emacsbug...done
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: setq failure following list manipulation
2006-04-20 8:37 setq failure following list manipulation Bill Lytton
@ 2006-04-21 21:31 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2006-04-21 21:31 UTC (permalink / raw
Bill Lytton wrote:
> bug or feature?:
>
> quoted arg for setq in function call no longer works after
maninpulating list
> using global variable
>
> (defun ae () (setq nums '(1 2 3)))
> (nconc nums (list 4))
> (ae) ;; returns (1 2 3 4)
> nums ;; returns (1 2 3 4)
I think you meant to call (ae) before (nconc nums (list 4)), since
otherwise nums would not be bound. So, after (ae) nums is bound to
this cons cell structure:
+-+-+ +-+-+ +-+-+
| | +->| | +->| |*|
+++-+ +++-+ +++-+
| | |
v v v
1 2 3
and after (nconc nums (list 4)) the last cons cell is modified so that
the structure (to which nums is still bound) is this:
+-+-+ +-+-+ +-+-+ +-+-+
| | +->| | +->| | +->| |*|
+++-+ +++-+ +++-+ +++-+
| | | |
v v v v
1 2 3 4
--
Kevin Rodgers
Sr. Software Engineer, IHS
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-21 21:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-20 8:37 setq failure following list manipulation Bill Lytton
2006-04-21 21:31 ` Kevin Rodgers
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).