aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2002-03-01 23:50:12 +0000
committerKim F. Storm <[email protected]>2002-03-01 23:50:12 +0000
commitfa832261257b6bc26fe147cc75da19e4e7c83842 (patch)
treea84a680ada121b177a358b5d2c9dd1b701b3df1f /src/window.c
parentee57fd915c9a79f2e9d24f3479f091ee7a638ecd (diff)
(Fminibuffer_selected_window): New function.
(syms_of_window): Defsubr it.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c
index d1cccd7204..9dc070bc49 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4549,6 +4549,20 @@ by this function. */)
return result;
}
+DEFUN ("minibuffer-selected-window", Fminibuffer_selected_window, Sminibuffer_selected_window, 0, 0, 0,
+ doc: /* Return the window which was selected when entering the minibuffer.
+Returns nil, if current window is not a minibuffer window. */)
+ ()
+{
+ if (minibuf_level > 0
+ && MINI_WINDOW_P (XWINDOW (selected_window))
+ && !NILP (minibuf_selected_window)
+ && WINDOW_LIVE_P (minibuf_selected_window))
+ return minibuf_selected_window;
+
+ return Qnil;
+}
+
/* Value is the number of lines actually displayed in window W,
as opposed to its height. */
@@ -6012,6 +6026,7 @@ This variable automatically becomes buffer-local when set. */);
defsubr (&Sscroll_right);
defsubr (&Sother_window_for_scrolling);
defsubr (&Sscroll_other_window);
+ defsubr (&Sminibuffer_selected_window);
defsubr (&Srecenter);
defsubr (&Swindow_text_height);
defsubr (&Smove_to_window_line);