[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103443: Avoid recording dead buffers
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103443: Avoid recording dead buffers in buffer-list frame param (Bug#7898). |
Date: |
Sun, 27 Feb 2011 17:57:22 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103443
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2011-02-27 17:57:22 -0500
message:
Avoid recording dead buffers in buffer-list frame param (Bug#7898).
* src/frame.c (store_frame_param): Don't store value directly in
buffer_list and buried_buffer_list; copy the list and remove dead
buffers.
modified:
src/ChangeLog
src/frame.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-02-27 19:51:35 +0000
+++ b/src/ChangeLog 2011-02-27 22:57:22 +0000
@@ -1,3 +1,9 @@
+2011-02-27 Chong Yidong <address@hidden>
+
+ * frame.c (store_frame_param): Don't store value directly in
+ buffer_list and buried_buffer_list; copy the list and remove dead
+ buffers (Bug#7898).
+
2011-02-27 Eli Zaretskii <address@hidden>
* msdos.c (readlink) [DJGPP < 2.04]: New stub function.
=== modified file 'src/frame.c'
--- a/src/frame.c 2011-02-27 07:47:34 +0000
+++ b/src/frame.c 2011-02-27 22:57:22 +0000
@@ -2208,15 +2208,23 @@
register Lisp_Object old_alist_elt;
/* The buffer-list parameters are stored in a special place and not
- in the alist. */
+ in the alist. All buffers must be live. */
if (EQ (prop, Qbuffer_list))
{
- f->buffer_list = val;
+ Lisp_Object list = Qnil;
+ for (; CONSP (val); val = XCDR (val))
+ if (!NILP (Fbuffer_live_p (XCAR (val))))
+ list = Fcons (XCAR (val), list);
+ f->buffer_list = Fnreverse (list);
return;
}
if (EQ (prop, Qburied_buffer_list))
{
- f->buried_buffer_list = val;
+ Lisp_Object list = Qnil;
+ for (; CONSP (val); val = XCDR (val))
+ if (!NILP (Fbuffer_live_p (XCAR (val))))
+ list = Fcons (XCAR (val), list);
+ f->buried_buffer_list = Fnreverse (list);
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103443: Avoid recording dead buffers in buffer-list frame param (Bug#7898).,
Chong Yidong <=