Mercurial > emacs
diff src/buffer.c @ 28991:f8bcf3bec2a6
(Fbury_buffer): Avoid trouble from burying a killed buffer.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 19 May 2000 20:33:58 +0000 |
parents | ea706ac904f0 |
children | d8c9e2f7022f |
line wrap: on
line diff
--- a/src/buffer.c Fri May 19 15:37:41 2000 +0000 +++ b/src/buffer.c Fri May 19 20:33:58 2000 +0000 @@ -1771,18 +1771,20 @@ buffer = buf1; } - /* Move buffer to the end of the buffer list. */ - { - register Lisp_Object aelt, link; - - aelt = Frassq (buffer, Vbuffer_alist); - link = Fmemq (aelt, Vbuffer_alist); - Vbuffer_alist = Fdelq (aelt, Vbuffer_alist); - XCDR (link) = Qnil; - Vbuffer_alist = nconc2 (Vbuffer_alist, link); - } - - frames_bury_buffer (buffer); + /* Move buffer to the end of the buffer list. Do nothing if the + buffer is killed. */ + if (!NILP (XBUFFER (buffer)->name)) + { + Lisp_Object aelt, link; + + aelt = Frassq (buffer, Vbuffer_alist); + link = Fmemq (aelt, Vbuffer_alist); + Vbuffer_alist = Fdelq (aelt, Vbuffer_alist); + XCDR (link) = Qnil; + Vbuffer_alist = nconc2 (Vbuffer_alist, link); + + frames_bury_buffer (buffer); + } return Qnil; }