comparison src/minibuf.c @ 6161:4a1c5b2c005d

(Fdisplay_completion_list): Restore original buffer before running completion-setup-hook.
author Richard M. Stallman <rms@gnu.org>
date Wed, 02 Mar 1994 23:18:37 +0000
parents eb9c60c0cfe8
children 993ca5adfcd1
comparison
equal deleted inserted replaced
6160:5a40bc311e2f 6161:4a1c5b2c005d
1292 1292
1293 DEFUN ("display-completion-list", Fdisplay_completion_list, Sdisplay_completion_list, 1293 DEFUN ("display-completion-list", Fdisplay_completion_list, Sdisplay_completion_list,
1294 1, 1, 0, 1294 1, 1, 0,
1295 "Display the list of completions, COMPLETIONS, using `standard-output'.\n\ 1295 "Display the list of completions, COMPLETIONS, using `standard-output'.\n\
1296 Each element may be just a symbol or string\n\ 1296 Each element may be just a symbol or string\n\
1297 or may be a list of two strings to be printed as if concatenated.") 1297 or may be a list of two strings to be printed as if concatenated.\n\
1298 `standard-output' must be a buffer.\n\
1299 At the end, run the normal hook `completion-setup-hook'.\n\
1300 It can find the completion buffer in `standard-output'.")
1298 (completions) 1301 (completions)
1299 Lisp_Object completions; 1302 Lisp_Object completions;
1300 { 1303 {
1301 register Lisp_Object tail, elt; 1304 register Lisp_Object tail, elt;
1302 register int i; 1305 register int i;
1363 Fprinc (elt, Qnil); 1366 Fprinc (elt, Qnil);
1364 } 1367 }
1365 } 1368 }
1366 } 1369 }
1367 1370
1371 if (XTYPE (Vstandard_output) == Lisp_Buffer)
1372 set_buffer_internal (old);
1373
1368 if (!NILP (Vrun_hooks)) 1374 if (!NILP (Vrun_hooks))
1369 call1 (Vrun_hooks, intern ("completion-setup-hook")); 1375 call1 (Vrun_hooks, intern ("completion-setup-hook"));
1370 1376
1371 if (XTYPE (Vstandard_output) == Lisp_Buffer)
1372 set_buffer_internal (old);
1373 return Qnil; 1377 return Qnil;
1374 } 1378 }
1375 1379
1376 DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_completion_help, 1380 DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_completion_help,
1377 0, 0, "", 1381 0, 0, "",