comparison src/callint.c @ 93109:7316c5c792f4

(Fcall_interactively) [case 'B']: Use other-buffer as default.
author Andreas Schwab <schwab@suse.de>
date Thu, 20 Mar 2008 17:21:16 +0000
parents 6fb99dfc30ca
children 82e99a4c7c09
comparison
equal deleted inserted replaced
93108:695900050c0b 93109:7316c5c792f4
514 514
515 case 'b': /* Name of existing buffer */ 515 case 'b': /* Name of existing buffer */
516 case 'B': /* Name of buffer, possibly nonexistent */ 516 case 'B': /* Name of buffer, possibly nonexistent */
517 { 517 {
518 Lisp_Object tema, temb, temc; 518 Lisp_Object tema, temb, temc;
519 int skip_current = 1; 519
520 520 /* Get a list of buffer names (except internal buffers), and
521 if (*tem == 'b' && !EQ (selected_window, minibuf_window)) 521 use this list for default values. Put either current
522 skip_current = 0; 522 buffer or other-buffer in front. */
523
524 /* Get a list of buffer names (except the current buffer and
525 internal buffers), and use this list for default values. */
526 tema = Qnil; 523 tema = Qnil;
527 temc = Fcurrent_buffer (); 524 temc = Fcurrent_buffer ();
525 if (*tem == 'B' || EQ (selected_window, minibuf_window))
526 temc = Fother_buffer (temc, Qnil, Qnil);
527 tema = Fcons (XBUFFER (temc)->name, tema);
528 teml = Fbuffer_list (selected_frame); 528 teml = Fbuffer_list (selected_frame);
529 for (; CONSP (teml); teml = XCDR (teml)) 529 for (; CONSP (teml); teml = XCDR (teml))
530 { 530 {
531 temb = XCAR (teml); 531 temb = XCAR (teml);
532 if (skip_current && EQ (temb, temc)) 532 if (EQ (temb, temc))
533 continue; 533 continue;
534 if (NILP (temb)) 534 if (NILP (temb))
535 continue; 535 continue;
536 if (NILP (XBUFFER (temb)->name)) 536 if (NILP (XBUFFER (temb)->name))
537 continue; 537 continue;