comparison src/buffer.c @ 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 71ee43b8a74d
children d804e621add0
comparison
equal deleted inserted replaced
5213:7abb91db1e64 5214:0b4d355771bd
2305 buffer_local_flags.case_table = resettable; 2305 buffer_local_flags.case_table = resettable;
2306 buffer_local_flags.syntax_table = resettable; 2306 buffer_local_flags.syntax_table = resettable;
2307 #ifdef MULE 2307 #ifdef MULE
2308 buffer_local_flags.category_table = resettable; 2308 buffer_local_flags.category_table = resettable;
2309 #endif 2309 #endif
2310 buffer_local_flags.display_time = always_local_no_default;
2311 buffer_local_flags.display_count = make_int (0);
2310 2312
2311 buffer_local_flags.modeline_format = make_int (1<<0); 2313 buffer_local_flags.modeline_format = make_int (1<<0);
2312 buffer_local_flags.abbrev_mode = make_int (1<<1); 2314 buffer_local_flags.abbrev_mode = make_int (1<<1);
2313 buffer_local_flags.overwrite_mode = make_int (1<<2); 2315 buffer_local_flags.overwrite_mode = make_int (1<<2);
2314 buffer_local_flags.case_fold_search = make_int (1<<3); 2316 buffer_local_flags.case_fold_search = make_int (1<<3);
2798 List of formats to use when saving this buffer. 2800 List of formats to use when saving this buffer.
2799 Formats are defined by `format-alist'. This variable is 2801 Formats are defined by `format-alist'. This variable is
2800 set when a file is visited. Automatically local in all buffers. 2802 set when a file is visited. Automatically local in all buffers.
2801 */ ); 2803 */ );
2802 2804
2805 DEFVAR_BUFFER_LOCAL ("buffer-display-count", display_count /*
2806 A number incremented each time this buffer is displayed in a window.
2807 The function `set-window-buffer' updates it.
2808 */ );
2809
2810 DEFVAR_BUFFER_LOCAL ("buffer-display-time", display_time /*
2811 Time stamp updated each time this buffer is displayed in a window.
2812 The function `set-window-buffer' updates this variable
2813 to the value obtained by calling `current-time'.
2814 If the buffer has never been shown in a window, the value is nil.
2815 */);
2816
2803 DEFVAR_BUFFER_LOCAL_MAGIC ("buffer-invisibility-spec", invisibility_spec /* 2817 DEFVAR_BUFFER_LOCAL_MAGIC ("buffer-invisibility-spec", invisibility_spec /*
2804 Invisibility spec of this buffer. 2818 Invisibility spec of this buffer.
2805 The default is t, which means that text is invisible 2819 The default is t, which means that text is invisible
2806 if it has (or is covered by an extent with) a non-nil `invisible' property. 2820 if it has (or is covered by an extent with) a non-nil `invisible' property.
2807 If the value is a list, a text character is invisible if its `invisible' 2821 If the value is a list, a text character is invisible if its `invisible'