comparison src/buffer.c @ 550:3072b38789a7

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Sat, 15 Feb 1992 22:18:37 +0000
parents 8c615e453683
children 1d71babec025
comparison
equal deleted inserted replaced
549:4c9c887ccec7 550:3072b38789a7
713 b->undo_list = Qnil; 713 b->undo_list = Qnil;
714 714
715 return Qt; 715 return Qt;
716 } 716 }
717 717
718 /* Put the element for buffer BUF at the front of buffer-alist. 718 /* Move the assoc for buffer BUF to the front of buffer-alist. Since
719 This is done when a buffer is selected "visibly". 719 we do this each time BUF is selected visibly, the more recently
720 It keeps buffer-alist in the order of recency of selection 720 selected buffers are always closer to the front of the list. This
721 so that other_buffer will return something nice. */ 721 means that other_buffer is more likely to choose a relevant buffer. */
722 722
723 record_buffer (buf) 723 record_buffer (buf)
724 Lisp_Object buf; 724 Lisp_Object buf;
725 { 725 {
726 register Lisp_Object link, prev; 726 register Lisp_Object link, prev;
731 if (EQ (XCONS (XCONS (link)->car)->cdr, buf)) 731 if (EQ (XCONS (XCONS (link)->car)->cdr, buf))
732 break; 732 break;
733 prev = link; 733 prev = link;
734 } 734 }
735 735
736 /* Effectively do Vbuffer_alist = Fdelq (link, Vbuffer_alist) 736 /* Effectively do Vbuffer_alist = Fdelq (link, Vbuffer_alist);
737 but cannot use Fdelq here it that allows quitting. */ 737 we cannot use Fdelq itself here because it allows quitting. */
738 738
739 if (NILP (prev)) 739 if (NILP (prev))
740 Vbuffer_alist = XCONS (Vbuffer_alist)->cdr; 740 Vbuffer_alist = XCONS (Vbuffer_alist)->cdr;
741 else 741 else
742 XCONS (prev)->cdr = XCONS (XCONS (prev)->cdr)->cdr; 742 XCONS (prev)->cdr = XCONS (XCONS (prev)->cdr)->cdr;