[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reachable killed buffers
From: |
martin rudalics |
Subject: |
Re: Reachable killed buffers |
Date: |
Wed, 12 Sep 2012 10:09:45 +0200 |
+static inline Lisp_Object
+discard_killed_buffers (Lisp_Object list)
+{
+ Lisp_Object tail, prev, tem;
+
+ for (tail = list, prev = Qnil; CONSP (tail); tail = XCDR (tail))
+ {
+ tem = XCAR (tail);
+ if (CONSP (tem))
+ tem = XCAR (tem);
+ if (BUFFERP (tem) && !BUFFER_LIVE_P (XBUFFER (tem)))
+ {
+ if (NILP (prev))
+ list = XCDR (tail);
+ else
+ XSETCDR (prev, XCDR (tail));
+ }
+ else
+ prev = tail;
+ }
+ return list;
+}
I'm all in favor for such a routine. But note that users can make these
lists circular and that's why I refrained from handling them while input
is blocked. I once intended to move related code to C and run a
hare/tortoise check but Chong didn't consider it worth the effort.
Maybe for the collector it is?
martin
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109890: Do not mark objects from deleted buffers, windows and frames., (continued)
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109890: Do not mark objects from deleted buffers, windows and frames., Stefan Monnier, 2012/09/06
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109890: Do not mark objects from deleted buffers, windows and frames., martin rudalics, 2012/09/07
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109890: Do not mark objects from deleted buffers, windows and frames., Stefan Monnier, 2012/09/07
- Reachable killed buffers [Was: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109890: Do not mark objects from deleted buffers, windows and frames], Dmitry Antipov, 2012/09/10
- Re: Reachable killed buffers [Was: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109890: Do not mark objects from deleted buffers, windows and frames], Stefan Monnier, 2012/09/10
- Re: Reachable killed buffers, Dmitry Antipov, 2012/09/10
- Re: Reachable killed buffers, Stefan Monnier, 2012/09/10
- Re: Reachable killed buffers, Stefan Monnier, 2012/09/10
- Re: Reachable killed buffers, Dmitry Antipov, 2012/09/11
- Re: Reachable killed buffers, Stefan Monnier, 2012/09/11
- Re: Reachable killed buffers,
martin rudalics <=
- Re: Reachable killed buffers, Paul Eggert, 2012/09/12
- Re: Reachable killed buffers, Dmitry Antipov, 2012/09/12
- Re: Reachable killed buffers, Paul Eggert, 2012/09/12
- Re: Reachable killed buffers, martin rudalics, 2012/09/12
- Re: Reachable killed buffers, Dmitry Antipov, 2012/09/12
- Re: Reachable killed buffers, martin rudalics, 2012/09/12
- Re: Reachable killed buffers, Paul Eggert, 2012/09/12
- Re: Reachable killed buffers, Stefan Monnier, 2012/09/12
- Re: Reachable killed buffers, Paul Eggert, 2012/09/13
- Re: Reachable killed buffers, Dmitry Antipov, 2012/09/13