# HG changeset patch # User Chong Yidong # Date 1289674162 18000 # Node ID 589830c3f4cbc7fafc357671ac203e427157e164 # Parent 611ab8607dce757f8fc6213984578487c64c4832 * src/window.c (Fwindow_use_time): New function. diff -r 611ab8607dce -r 589830c3f4cb src/ChangeLog --- a/src/ChangeLog Sat Nov 13 13:34:02 2010 -0500 +++ b/src/ChangeLog Sat Nov 13 13:49:22 2010 -0500 @@ -1,3 +1,7 @@ +2010-11-13 Martin Rudalics + + * window.c (Fwindow_use_time): New function. + 2010-11-13 Eli Zaretskii * xdisp.c (set_cursor_from_row): Fix cursor positioning on diff -r 611ab8607dce -r 589830c3f4cb src/window.c --- a/src/window.c Sat Nov 13 13:34:02 2010 -0500 +++ b/src/window.c Sat Nov 13 13:49:22 2010 -0500 @@ -2420,6 +2420,16 @@ window_loop (CHECK_ALL_WINDOWS, Qnil, 1, Qt); } +DEFUN ("window-use-time", Fwindow_use_time, Swindow_use_time, 0, 1, 0, + doc: /* Return WINDOW's use time. +WINDOW defaults to the selected window. The window with the highest use +time is the most recently selected one. The window with the lowest use +time is the least recently selected one. */) + (Lisp_Object window) +{ + return decode_window (window)->use_time; +} + DEFUN ("get-lru-window", Fget_lru_window, Sget_lru_window, 0, 2, 0, doc: /* Return the window least recently selected or used for display. \(LRU means Least Recently Used.)