changeset 4424:027d3affb2f8

(Fprevious_frame): New function, for parity with Fnext_frame. (syms_of_frame): Add defsubr for Sprevious_frame.
author Roland McGrath <roland@gnu.org>
date Mon, 02 Aug 1993 22:16:09 +0000
parents 53f7c5b30816
children 1b48826df9cb
files src/frame.c
diffstat 1 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Mon Aug 02 21:19:23 1993 +0000
+++ b/src/frame.c	Mon Aug 02 22:16:09 1993 +0000
@@ -570,6 +570,7 @@
     return prev;
 }
 
+
 DEFUN ("next-frame", Fnext_frame, Snext_frame, 0, 2, 0,
   "Return the next frame in the frame list after FRAME.\n\
 By default, skip minibuffer-only frames.\n\
@@ -591,6 +592,27 @@
   return next_frame (frame, miniframe);
 }
 
+DEFUN ("previous-frame", Fprevious_frame, Sprevious_frame, 0, 2, 0,
+  "Return the previous frame in the frame list before FRAME.\n\
+By default, skip minibuffer-only frames.\n\
+If omitted, FRAME defaults to the selected frame.\n\
+If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\
+If MINIFRAME is a window, include only frames using that window for their\n\
+minibuffer.\n\
+If MINIFRAME is non-nil and not a window, include all frames.")
+  (frame, miniframe)
+     Lisp_Object frame, miniframe;
+{
+  Lisp_Object tail;
+
+  if (NILP (frame))
+    XSET (frame, Lisp_Frame, selected_frame);
+  else
+    CHECK_LIVE_FRAME (frame, 0);
+
+  return prev_frame (frame, miniframe);
+}
+
 
 DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "",
   "Delete FRAME, permanently eliminating it from use.\n\
@@ -1490,6 +1512,7 @@
   defsubr (&Sframe_selected_window);
   defsubr (&Sframe_list);
   defsubr (&Snext_frame);
+  defsubr (&Sprevious_frame);
   defsubr (&Sdelete_frame);
   defsubr (&Smouse_position);
   defsubr (&Sset_mouse_position);