diff src/buffer.c @ 2043:a1ab3501653c

(reset_buffer_local_variables): Reset mark_active. (syms_of_buffer): New buffer-local var `mark-active'. (init_buffer_once): Initialize mechanism for it.
author Richard M. Stallman <rms@gnu.org>
date Sun, 07 Mar 1993 09:24:18 +0000
parents 8b034dd5da14
children 7eea4dfc5133
line wrap: on
line diff
--- a/src/buffer.c	Sun Mar 07 08:43:57 1993 +0000
+++ b/src/buffer.c	Sun Mar 07 09:24:18 1993 +0000
@@ -109,6 +109,8 @@
 Lisp_Object Vbefore_change_function;
 Lisp_Object Vafter_change_function;
 
+Lisp_Object Vtransient_mark_mode;
+
 /* List of functions to call before changing an unmodified buffer.  */
 Lisp_Object Vfirst_change_hook;
 Lisp_Object Qfirst_change_hook;
@@ -279,7 +281,7 @@
   reset_buffer_local_variables(b);
 }
 
-reset_buffer_local_variables(b)
+reset_buffer_local_variables (b)
      register struct buffer *b;
 {
   register int offset;
@@ -297,6 +299,7 @@
   b->upcase_table = Vascii_upcase_table;
   b->case_canon_table = Vascii_downcase_table;
   b->case_eqv_table = Vascii_upcase_table;
+  b->mark_active = Qnil;
 #if 0
   b->sort_table = XSTRING (Vascii_sort_table);
   b->folding_sort_table = XSTRING (Vascii_folding_sort_table);
@@ -1294,6 +1297,7 @@
   buffer_defaults.display_table = Qnil;
   buffer_defaults.fieldlist = Qnil;
   buffer_defaults.undo_list = Qnil;
+  buffer_defaults.mark_active = Qnil;
 
   XFASTINT (buffer_defaults.tab_width) = 8;
   buffer_defaults.truncate_lines = Qnil;
@@ -1321,6 +1325,7 @@
   XFASTINT (buffer_local_flags.major_mode) = -1;
   XFASTINT (buffer_local_flags.mode_name) = -1;
   XFASTINT (buffer_local_flags.undo_list) = -1;
+  XFASTINT (buffer_local_flags.mark_active) = -1;
 
   XFASTINT (buffer_local_flags.mode_line_format) = 1;
   XFASTINT (buffer_local_flags.abbrev_mode) = 2;
@@ -1685,6 +1690,14 @@
 \n\
 If the value of the variable is t, undo information is not recorded.");
 
+  DEFVAR_PER_BUFFER ("mark-active", &current_buffer->mark_active, Qnil, 
+    "Non-nil means the mark and region are currently active in this buffer.\n\
+Automatically local in all buffers.");
+
+  DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode,
+    "*Non-nil means deactivate the mark when the buffer contents change.");
+  Vtransient_mark_mode = Qnil;
+
   defsubr (&Sbuffer_list);
   defsubr (&Sget_buffer);
   defsubr (&Sget_file_buffer);