]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fdisplay_completion_list): Restore original buffer
authorRichard M. Stallman <rms@gnu.org>
Wed, 2 Mar 1994 23:18:37 +0000 (23:18 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 2 Mar 1994 23:18:37 +0000 (23:18 +0000)
before running completion-setup-hook.

src/minibuf.c

index c160711f903f5ed5f3e471bcdf04d2453ebf8310..abfa26178ec3474ff1260a048be708ad3b31ca57 100644 (file)
@@ -1294,7 +1294,10 @@ DEFUN ("display-completion-list", Fdisplay_completion_list, Sdisplay_completion_
        1, 1, 0,
   "Display the list of completions, COMPLETIONS, using `standard-output'.\n\
 Each element may be just a symbol or string\n\
-or may be a list of two strings to be printed as if concatenated.")
+or may be a list of two strings to be printed as if concatenated.\n\
+`standard-output' must be a buffer.\n\
+At the end, run the normal hook `completion-setup-hook'.\n\
+It can find the completion buffer in `standard-output'.")
   (completions)
      Lisp_Object completions;
 {
@@ -1365,11 +1368,12 @@ or may be a list of two strings to be printed as if concatenated.")
        }
     }
 
+  if (XTYPE (Vstandard_output) == Lisp_Buffer)
+    set_buffer_internal (old);
+
   if (!NILP (Vrun_hooks))
     call1 (Vrun_hooks, intern ("completion-setup-hook"));
 
-  if (XTYPE (Vstandard_output) == Lisp_Buffer)
-    set_buffer_internal (old);
   return Qnil;
 }