comparison src/buffer.c @ 22150:b6edeb61a779

(syms_of_buffer): Set up Lisp variable buffer-display-time. Doc fixes. (reset_buffer): Initialize display_time slot. (init_buffer_once): Initialize display_time slot.
author Richard M. Stallman <rms@gnu.org>
date Wed, 20 May 1998 00:38:47 +0000
parents 8c00a2d112cc
children e23d16d11ba9
comparison
equal deleted inserted replaced
22149:ad3ee5ec90d1 22150:b6edeb61a779
525 b->mark_active = Qnil; 525 b->mark_active = Qnil;
526 b->point_before_scroll = Qnil; 526 b->point_before_scroll = Qnil;
527 b->file_format = Qnil; 527 b->file_format = Qnil;
528 b->last_selected_window = Qnil; 528 b->last_selected_window = Qnil;
529 XSETINT (b->display_count, 0); 529 XSETINT (b->display_count, 0);
530 b->display_time = Qnil;
530 b->extra2 = Qnil; 531 b->extra2 = Qnil;
531 b->extra3 = Qnil; 532 b->extra3 = Qnil;
532 b->enable_multibyte_characters = buffer_defaults.enable_multibyte_characters; 533 b->enable_multibyte_characters = buffer_defaults.enable_multibyte_characters;
533 } 534 }
534 535
3849 XSETFASTINT (buffer_defaults.fill_column, 70); 3850 XSETFASTINT (buffer_defaults.fill_column, 70);
3850 XSETFASTINT (buffer_defaults.left_margin, 0); 3851 XSETFASTINT (buffer_defaults.left_margin, 0);
3851 buffer_defaults.cache_long_line_scans = Qnil; 3852 buffer_defaults.cache_long_line_scans = Qnil;
3852 buffer_defaults.file_truename = Qnil; 3853 buffer_defaults.file_truename = Qnil;
3853 XSETFASTINT (buffer_defaults.display_count, 0); 3854 XSETFASTINT (buffer_defaults.display_count, 0);
3855 buffer_defaults.display_time = Qnil;
3854 3856
3855 /* Assign the local-flags to the slots that have default values. 3857 /* Assign the local-flags to the slots that have default values.
3856 The local flag is a bit that is used in the buffer 3858 The local flag is a bit that is used in the buffer
3857 to say that it has its own local value for the slot. 3859 to say that it has its own local value for the slot.
3858 The local flag bits are in the local_var_flags slot of the buffer. */ 3860 The local flag bits are in the local_var_flags slot of the buffer. */
3875 XSETINT (buffer_local_flags.point_before_scroll, -1); 3877 XSETINT (buffer_local_flags.point_before_scroll, -1);
3876 XSETINT (buffer_local_flags.file_truename, -1); 3878 XSETINT (buffer_local_flags.file_truename, -1);
3877 XSETINT (buffer_local_flags.invisibility_spec, -1); 3879 XSETINT (buffer_local_flags.invisibility_spec, -1);
3878 XSETINT (buffer_local_flags.file_format, -1); 3880 XSETINT (buffer_local_flags.file_format, -1);
3879 XSETINT (buffer_local_flags.display_count, -1); 3881 XSETINT (buffer_local_flags.display_count, -1);
3882 XSETINT (buffer_local_flags.display_time, -1);
3880 XSETINT (buffer_local_flags.enable_multibyte_characters, -1); 3883 XSETINT (buffer_local_flags.enable_multibyte_characters, -1);
3881 3884
3882 XSETFASTINT (buffer_local_flags.mode_line_format, 1); 3885 XSETFASTINT (buffer_local_flags.mode_line_format, 1);
3883 XSETFASTINT (buffer_local_flags.abbrev_mode, 2); 3886 XSETFASTINT (buffer_local_flags.abbrev_mode, 2);
3884 XSETFASTINT (buffer_local_flags.overwrite_mode, 4); 3887 XSETFASTINT (buffer_local_flags.overwrite_mode, 4);
4414 4417
4415 #if 0 /* The doc string is too long for some compilers, 4418 #if 0 /* The doc string is too long for some compilers,
4416 but make-docfile can find it in this comment. */ 4419 but make-docfile can find it in this comment. */
4417 DEFVAR_PER_BUFFER ("buffer-undo-list", &current_buffer->undo_list, Qnil, 4420 DEFVAR_PER_BUFFER ("buffer-undo-list", &current_buffer->undo_list, Qnil,
4418 "List of undo entries in current buffer.\n\ 4421 "List of undo entries in current buffer.\n\
4422 This variable is always local in all buffers.\n\
4419 Recent changes come first; older changes follow newer.\n\ 4423 Recent changes come first; older changes follow newer.\n\
4420 \n\ 4424 \n\
4421 An entry (BEG . END) represents an insertion which begins at\n\ 4425 An entry (BEG . END) represents an insertion which begins at\n\
4422 position BEG and ends at position END.\n\ 4426 position BEG and ends at position END.\n\
4423 \n\ 4427 \n\
4482 maintained internally by the Emacs primitives. Enabling or disabling\n\ 4486 maintained internally by the Emacs primitives. Enabling or disabling\n\
4483 the cache should not affect the behavior of any of the motion\n\ 4487 the cache should not affect the behavior of any of the motion\n\
4484 functions; it should only affect their performance."); 4488 functions; it should only affect their performance.");
4485 4489
4486 DEFVAR_PER_BUFFER ("point-before-scroll", &current_buffer->point_before_scroll, Qnil, 4490 DEFVAR_PER_BUFFER ("point-before-scroll", &current_buffer->point_before_scroll, Qnil,
4487 "Value of point before the last series of scroll operations, or nil."); 4491 "Value of point before the last series of scroll operations, or nil.\n\
4492 This variable is always local in all buffers.");
4488 4493
4489 DEFVAR_PER_BUFFER ("buffer-file-format", &current_buffer->file_format, Qnil, 4494 DEFVAR_PER_BUFFER ("buffer-file-format", &current_buffer->file_format, Qnil,
4490 "List of formats to use when saving this buffer.\n\ 4495 "List of formats to use when saving this buffer.\n\
4496 This variable is always local in all buffers.\n\
4491 Formats are defined by `format-alist'. This variable is\n\ 4497 Formats are defined by `format-alist'. This variable is\n\
4492 set when a file is visited. Automatically local in all buffers."); 4498 set when a file is visited. Automatically local in all buffers.");
4493 4499
4494 DEFVAR_PER_BUFFER ("buffer-invisibility-spec", 4500 DEFVAR_PER_BUFFER ("buffer-invisibility-spec",
4495 &current_buffer->invisibility_spec, Qnil, 4501 &current_buffer->invisibility_spec, Qnil,
4496 "Invisibility spec of this buffer.\n\ 4502 "Invisibility spec of this buffer.\n\
4503 This variable is always local in all buffers.\n\
4497 The default is t, which means that text is invisible\n\ 4504 The default is t, which means that text is invisible\n\
4498 if it has a non-nil `invisible' property.\n\ 4505 if it has a non-nil `invisible' property.\n\
4499 If the value is a list, a text character is invisible if its `invisible'\n\ 4506 If the value is a list, a text character is invisible if its `invisible'\n\
4500 property is an element in that list.\n\ 4507 property is an element in that list.\n\
4501 If an element is a cons cell of the form (PROP . ELLIPSIS),\n\ 4508 If an element is a cons cell of the form (PROP . ELLIPSIS),\n\
4502 then characters with property value PROP are invisible,\n\ 4509 then characters with property value PROP are invisible,\n\
4503 and they have an ellipsis as well if ELLIPSIS is non-nil."); 4510 and they have an ellipsis as well if ELLIPSIS is non-nil.");
4504 4511
4505 DEFVAR_PER_BUFFER ("buffer-display-count", 4512 DEFVAR_PER_BUFFER ("buffer-display-count",
4506 &current_buffer->display_count, Qnil, 4513 &current_buffer->display_count, Qnil,
4507 "A number incremented each time the buffer is displayed in a window."); 4514 "A number incremented each time this buffer is displayed in a window.\n\
4515 This variable is always local in all buffers.\n\
4516 The function `set-window-buffer increments it.");
4517
4518 DEFVAR_PER_BUFFER ("buffer-display-time",
4519 &current_buffer->display_time, Qnil,
4520 "Time stamp updated each time this buffer is displayed in a window.\n\
4521 This variable is always local in all buffers.\n\
4522 The function `set-window-buffer' updates this variable\n\
4523 to the value obtained by calling `current-time'.\n\
4524 If the buffer has never been shown in a window, the value is nil.");
4508 4525
4509 DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode, 4526 DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode,
4510 "*Non-nil means deactivate the mark when the buffer contents change.\n\ 4527 "*Non-nil means deactivate the mark when the buffer contents change.\n\
4511 Non-nil also enables highlighting of the region whenever the mark is active.\n\ 4528 Non-nil also enables highlighting of the region whenever the mark is active.\n\
4512 The variable `highlight-nonselected-windows' controls whether to highlight\n\ 4529 The variable `highlight-nonselected-windows' controls whether to highlight\n\