comparison 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
comparison
equal deleted inserted replaced
5213:7abb91db1e64 5214:0b4d355771bd
703 @result{} nil 703 @result{} nil
704 @end group 704 @end group
705 @end example 705 @end example
706 @end defun 706 @end defun
707 707
708 @defvar buffer-display-count
709 This buffer-local variable records the number of times a buffer has been
710 displayed in a window. It is incremented each time
711 @code{set-window-buffer} is called for the buffer.
712 @end defvar
713
708 @defun window-buffer &optional window 714 @defun window-buffer &optional window
709 This function returns the buffer that @var{window} is displaying. If 715 This function returns the buffer that @var{window} is displaying. If
710 @var{window} is omitted, this function returns the buffer for the 716 @var{window} is omitted, this function returns the buffer for the
711 selected window. 717 selected window.
712 718
726 @xref{Cyclic Window Ordering}. 732 @xref{Cyclic Window Ordering}.
727 733
728 The remaining arguments control which windows to consider. They have 734 The remaining arguments control which windows to consider. They have
729 the same meaning as for @code{next-window}. 735 the same meaning as for @code{next-window}.
730 @end defun 736 @end defun
737
738
739 @defvar buffer-display-time
740 This variable records the time at which a buffer was last made visible
741 in a window. It is always local in each buffer; each time
742 @code{set-window-buffer} is called, it sets this variable to
743 @code{(current-time)} in the specified buffer (@pxref{Time of Day}).
744 When a buffer is first created, @code{buffer-display-time} starts out
745 with the value @code{nil}.
746 @end defvar
731 747
732 @node Displaying Buffers 748 @node Displaying Buffers
733 @section Displaying Buffers in Windows 749 @section Displaying Buffers in Windows
734 @cindex switching to a buffer 750 @cindex switching to a buffer
735 @cindex displaying a buffer 751 @cindex displaying a buffer