aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorGerd Moellmann2000-05-19 20:33:58 +0000
committerGerd Moellmann2000-05-19 20:33:58 +0000
commita1a8b28e527a498125ac93f15176be1e706f016b (patch)
treebc9b7420b65647532c9004fdf9e76715c57621cf /src/buffer.c
parent59a1ce8db6a0cca04ad02822b3944f68d606c650 (diff)
downloademacs-a1a8b28e527a498125ac93f15176be1e706f016b.tar.gz
emacs-a1a8b28e527a498125ac93f15176be1e706f016b.zip
(Fbury_buffer): Avoid trouble from burying a killed buffer.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 70de1fbc984..6550d6ac342 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1771,18 +1771,20 @@ selected window if it is displayed there.")
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 {
1778 Lisp_Object aelt, link;
1777 1779
1778 aelt = Frassq (buffer, Vbuffer_alist); 1780 aelt = Frassq (buffer, Vbuffer_alist);
1779 link = Fmemq (aelt, Vbuffer_alist); 1781 link = Fmemq (aelt, Vbuffer_alist);
1780 Vbuffer_alist = Fdelq (aelt, Vbuffer_alist); 1782 Vbuffer_alist = Fdelq (aelt, Vbuffer_alist);
1781 XCDR (link) = Qnil; 1783 XCDR (link) = Qnil;
1782 Vbuffer_alist = nconc2 (Vbuffer_alist, link); 1784 Vbuffer_alist = nconc2 (Vbuffer_alist, link);
1783 }
1784 1785
1785 frames_bury_buffer (buffer); 1786 frames_bury_buffer (buffer);
1787 }
1786 1788
1787 return Qnil; 1789 return Qnil;
1788} 1790}