comparison src/buffer.c @ 1281:1f6cfa3ea4cb

* buffer.c (Fother_buffer): Add back the VISIBLE_OK argument. It got removed with no comment or ChangeLog entry, and append-to-buffer uses it.
author Jim Blandy <jimb@redhat.com>
date Wed, 30 Sep 1992 18:16:11 +0000
parents 7afcf7be0d30
children 7c32612174c3
comparison
equal deleted inserted replaced
1280:5c66007ecabb 1281:1f6cfa3ea4cb
533 if (NILP (current_buffer->filename) && !NILP (current_buffer->auto_save_file_name)) 533 if (NILP (current_buffer->filename) && !NILP (current_buffer->auto_save_file_name))
534 call0 (intern ("rename-auto-save-file")); 534 call0 (intern ("rename-auto-save-file"));
535 return name; 535 return name;
536 } 536 }
537 537
538 DEFUN ("other-buffer", Fother_buffer, Sother_buffer, 0, 1, 0, 538 DEFUN ("other-buffer", Fother_buffer, Sother_buffer, 0, 2, 0,
539 "Return most recently selected buffer other than BUFFER.\n\ 539 "Return most recently selected buffer other than BUFFER.\n\
540 Buffers not visible in windows are preferred to visible buffers.\n\ 540 Buffers not visible in windows are preferred to visible buffers,\n\
541 unless optional second argument VISIBLE-OK is non-nil.\n\
541 If no other buffer exists, the buffer `*scratch*' is returned.\n\ 542 If no other buffer exists, the buffer `*scratch*' is returned.\n\
542 If BUFFER is omitted or nil, some interesting buffer is returned.") 543 If BUFFER is omitted or nil, some interesting buffer is returned.")
543 (buffer) 544 (buffer, visible_ok)
544 register Lisp_Object buffer; 545 register Lisp_Object buffer, visible_ok;
545 { 546 {
546 register Lisp_Object tail, buf, notsogood, tem; 547 register Lisp_Object tail, buf, notsogood, tem;
547 notsogood = Qnil; 548 notsogood = Qnil;
548 549
549 for (tail = Vbuffer_alist; !NILP (tail); tail = Fcdr (tail)) 550 for (tail = Vbuffer_alist; !NILP (tail); tail = Fcdr (tail))
551 buf = Fcdr (Fcar (tail)); 552 buf = Fcdr (Fcar (tail));
552 if (EQ (buf, buffer)) 553 if (EQ (buf, buffer))
553 continue; 554 continue;
554 if (XSTRING (XBUFFER (buf)->name)->data[0] == ' ') 555 if (XSTRING (XBUFFER (buf)->name)->data[0] == ' ')
555 continue; 556 continue;
556 tem = Fget_buffer_window (buf, Qnil); 557 if (NILP (visible_ok))
558 tem = Fget_buffer_window (buf, Qnil);
559 else
560 tem = Qnil;
557 if (NILP (tem)) 561 if (NILP (tem))
558 return buf; 562 return buf;
559 if (NILP (notsogood)) 563 if (NILP (notsogood))
560 notsogood = buf; 564 notsogood = buf;
561 } 565 }