Mercurial > hg > xemacs-beta
diff man/lispref/windows.texi @ 5214:0b4d355771bd
Import buffer-display-count, buffer-display-time; thank you, Jeff Sparkes.
man/ChangeLog addition:
2010-05-17 Jeff Sparkes <jsparkes@gmail.com>
* lispref/windows.texi (Buffers and Windows):
Document buffer-display-count and buffer-display-time with
descriptions from GNU emacs lispref.
* lispref/locals.texi (Standard Buffer-Local Variables):
Add buffer-display-count and buffer-display-time.
src/ChangeLog addition:
2010-05-17 Jeff Sparkes <jsparkes@gmail.com>
* buffer.c (complex_vars_of_buffer):
Add buffer local variables buffer-display-count and
buffer-display-time.
(common_init_complex_vars_of_buffer):
Initialize them here.
* bufslots.h: Add slots for buffer-display-count and buffer-display-time.
* window.c (Fset_window_buffer): Update buffer-display-count and
buffer-display-time whenever a buffer is displayed.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Fri, 28 May 2010 13:48:22 +0100 |
parents | 755ae5b97edb |
children | 956d54c39176 |
line wrap: on
line diff
--- a/man/lispref/windows.texi Mon May 24 10:43:29 2010 +0200 +++ b/man/lispref/windows.texi Fri May 28 13:48:22 2010 +0100 @@ -705,6 +705,12 @@ @end example @end defun +@defvar buffer-display-count +This buffer-local variable records the number of times a buffer has been +displayed in a window. It is incremented each time +@code{set-window-buffer} is called for the buffer. +@end defvar + @defun window-buffer &optional window This function returns the buffer that @var{window} is displaying. If @var{window} is omitted, this function returns the buffer for the @@ -729,6 +735,16 @@ the same meaning as for @code{next-window}. @end defun + +@defvar buffer-display-time +This variable records the time at which a buffer was last made visible +in a window. It is always local in each buffer; each time +@code{set-window-buffer} is called, it sets this variable to +@code{(current-time)} in the specified buffer (@pxref{Time of Day}). +When a buffer is first created, @code{buffer-display-time} starts out +with the value @code{nil}. +@end defvar + @node Displaying Buffers @section Displaying Buffers in Windows @cindex switching to a buffer