[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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]