From: Gerd Moellmann Date: Tue, 16 May 2000 11:47:30 +0000 (+0000) Subject: (frames_bury_buffer): Don't add a buffer to the frame's X-Git-Tag: emacs-pretest-21.0.90~3946 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=835c1b36270c9ede7766f220d0210ab67352bb3e;p=emacs.git (frames_bury_buffer): Don't add a buffer to the frame's buffer list that wasn't selected in that frame. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6a32598eb03..390e364a625 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2000-05-16 Gerd Moellmann + * frame.c (frames_bury_buffer): Don't add a buffer to the frame's + buffer list that wasn't selected in that frame. + * filelock.c (get_boot_time): To obtain an 8 char file name, which is needed on mescaline, use a 2 char prefix, and call make_temp_name with second arg non-zero. diff --git a/src/frame.c b/src/frame.c index 9cb2537c3b5..a234229cf49 100644 --- a/src/frame.c +++ b/src/frame.c @@ -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)); } }