Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
28990:80e6f0d6eac1 | 28991:f8bcf3bec2a6 |
---|---|
1769 if (NILP (buf1)) | 1769 if (NILP (buf1)) |
1770 nsberror (buffer); | 1770 nsberror (buffer); |
1771 buffer = buf1; | 1771 buffer = buf1; |
1772 } | 1772 } |
1773 | 1773 |
1774 /* Move buffer to the end of the buffer list. */ | 1774 /* Move buffer to the end of the buffer list. Do nothing if the |
1775 { | 1775 buffer is killed. */ |
1776 register Lisp_Object aelt, link; | 1776 if (!NILP (XBUFFER (buffer)->name)) |
1777 | 1777 { |
1778 aelt = Frassq (buffer, Vbuffer_alist); | 1778 Lisp_Object aelt, link; |
1779 link = Fmemq (aelt, Vbuffer_alist); | 1779 |
1780 Vbuffer_alist = Fdelq (aelt, Vbuffer_alist); | 1780 aelt = Frassq (buffer, Vbuffer_alist); |
1781 XCDR (link) = Qnil; | 1781 link = Fmemq (aelt, Vbuffer_alist); |
1782 Vbuffer_alist = nconc2 (Vbuffer_alist, link); | 1782 Vbuffer_alist = Fdelq (aelt, Vbuffer_alist); |
1783 } | 1783 XCDR (link) = Qnil; |
1784 | 1784 Vbuffer_alist = nconc2 (Vbuffer_alist, link); |
1785 frames_bury_buffer (buffer); | 1785 |
1786 frames_bury_buffer (buffer); | |
1787 } | |
1786 | 1788 |
1787 return Qnil; | 1789 return Qnil; |
1788 } | 1790 } |
1789 | 1791 |
1790 DEFUN ("erase-buffer", Ferase_buffer, Serase_buffer, 0, 0, "*", | 1792 DEFUN ("erase-buffer", Ferase_buffer, Serase_buffer, 0, 0, "*", |