Mercurial > emacs
comparison src/callint.c @ 93013:6fb99dfc30ca
(Fcall_interactively): For interactive code letters
'b' and 'B' put the buffer list into the list of default "future"
values of the minibuffer.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Sun, 16 Mar 2008 17:45:52 +0000 |
parents | d3395bc69ea8 |
children | 7316c5c792f4 |
comparison
equal
deleted
inserted
replaced
93012:b49a04359896 | 93013:6fb99dfc30ca |
---|---|
511 teml = visargs[i]; | 511 teml = visargs[i]; |
512 args[i] = Fintern (teml, Qnil); | 512 args[i] = Fintern (teml, Qnil); |
513 break; | 513 break; |
514 | 514 |
515 case 'b': /* Name of existing buffer */ | 515 case 'b': /* Name of existing buffer */ |
516 args[i] = Fcurrent_buffer (); | |
517 if (EQ (selected_window, minibuf_window)) | |
518 args[i] = Fother_buffer (args[i], Qnil, Qnil); | |
519 args[i] = Fread_buffer (callint_message, args[i], Qt); | |
520 break; | |
521 | |
522 case 'B': /* Name of buffer, possibly nonexistent */ | 516 case 'B': /* Name of buffer, possibly nonexistent */ |
523 args[i] = Fread_buffer (callint_message, | 517 { |
524 Fother_buffer (Fcurrent_buffer (), Qnil, Qnil), | 518 Lisp_Object tema, temb, temc; |
525 Qnil); | 519 int skip_current = 1; |
520 | |
521 if (*tem == 'b' && !EQ (selected_window, minibuf_window)) | |
522 skip_current = 0; | |
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; | |
527 temc = Fcurrent_buffer (); | |
528 teml = Fbuffer_list (selected_frame); | |
529 for (; CONSP (teml); teml = XCDR (teml)) | |
530 { | |
531 temb = XCAR (teml); | |
532 if (skip_current && EQ (temb, temc)) | |
533 continue; | |
534 if (NILP (temb)) | |
535 continue; | |
536 if (NILP (XBUFFER (temb)->name)) | |
537 continue; | |
538 if (SREF (XBUFFER (temb)->name, 0) == ' ') | |
539 continue; | |
540 tema = Fcons (XBUFFER (temb)->name, tema); | |
541 } | |
542 args[i] = Fread_buffer (callint_message, Fnreverse (tema), | |
543 *tem == 'b' ? Qt : Qnil); | |
544 } | |
526 break; | 545 break; |
527 | 546 |
528 case 'c': /* Character */ | 547 case 'c': /* Character */ |
529 args[i] = Fread_char (callint_message, Qnil, Qnil); | 548 args[i] = Fread_char (callint_message, Qnil, Qnil); |
530 message1_nolog ((char *) 0); | 549 message1_nolog ((char *) 0); |