Commit 835c1b36 authored by Gerd Moellmann's avatar Gerd Moellmann

(frames_bury_buffer): Don't add a buffer to the frame's

buffer list that wasn't selected in that frame.
parent cb613bb8
No preview for this file type
......@@ -1864,9 +1864,13 @@ frames_bury_buffer (buffer)
FOR_EACH_FRAME (tail, frame)
{
XFRAME (frame)->buffer_list
= nconc2 (Fdelq (buffer, XFRAME (frame)->buffer_list),
Fcons (buffer, Qnil));
struct frame *f = XFRAME (frame);
Lisp_Object found;
found = Fmemq (buffer, f->buffer_list);
if (!NILP (found))
f->buffer_list = nconc2 (Fdelq (buffer, f->buffer_list),
Fcons (buffer, Qnil));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment