diff options
| author | Richard M. Stallman | 1993-03-07 09:24:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-03-07 09:24:18 +0000 |
| commit | c48f61ef04f4c23b50d0ff1422281f049f38d5e7 (patch) | |
| tree | a407190f30cbeb0e72ed2928f04e925622de19ac /src/buffer.c | |
| parent | 2ed45c8b81196ca3167ed826da7e1be2307be372 (diff) | |
| download | emacs-c48f61ef04f4c23b50d0ff1422281f049f38d5e7.tar.gz emacs-c48f61ef04f4c23b50d0ff1422281f049f38d5e7.zip | |
(reset_buffer_local_variables): Reset mark_active.
(syms_of_buffer): New buffer-local var `mark-active'.
(init_buffer_once): Initialize mechanism for it.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c index 1b510b24651..28091e763ea 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -109,6 +109,8 @@ Lisp_Object Vbuffer_alist; | |||
| 109 | Lisp_Object Vbefore_change_function; | 109 | Lisp_Object Vbefore_change_function; |
| 110 | Lisp_Object Vafter_change_function; | 110 | Lisp_Object Vafter_change_function; |
| 111 | 111 | ||
| 112 | Lisp_Object Vtransient_mark_mode; | ||
| 113 | |||
| 112 | /* List of functions to call before changing an unmodified buffer. */ | 114 | /* List of functions to call before changing an unmodified buffer. */ |
| 113 | Lisp_Object Vfirst_change_hook; | 115 | Lisp_Object Vfirst_change_hook; |
| 114 | Lisp_Object Qfirst_change_hook; | 116 | Lisp_Object Qfirst_change_hook; |
| @@ -279,7 +281,7 @@ reset_buffer (b) | |||
| 279 | reset_buffer_local_variables(b); | 281 | reset_buffer_local_variables(b); |
| 280 | } | 282 | } |
| 281 | 283 | ||
| 282 | reset_buffer_local_variables(b) | 284 | reset_buffer_local_variables (b) |
| 283 | register struct buffer *b; | 285 | register struct buffer *b; |
| 284 | { | 286 | { |
| 285 | register int offset; | 287 | register int offset; |
| @@ -297,6 +299,7 @@ reset_buffer_local_variables(b) | |||
| 297 | b->upcase_table = Vascii_upcase_table; | 299 | b->upcase_table = Vascii_upcase_table; |
| 298 | b->case_canon_table = Vascii_downcase_table; | 300 | b->case_canon_table = Vascii_downcase_table; |
| 299 | b->case_eqv_table = Vascii_upcase_table; | 301 | b->case_eqv_table = Vascii_upcase_table; |
| 302 | b->mark_active = Qnil; | ||
| 300 | #if 0 | 303 | #if 0 |
| 301 | b->sort_table = XSTRING (Vascii_sort_table); | 304 | b->sort_table = XSTRING (Vascii_sort_table); |
| 302 | b->folding_sort_table = XSTRING (Vascii_folding_sort_table); | 305 | b->folding_sort_table = XSTRING (Vascii_folding_sort_table); |
| @@ -1294,6 +1297,7 @@ init_buffer_once () | |||
| 1294 | buffer_defaults.display_table = Qnil; | 1297 | buffer_defaults.display_table = Qnil; |
| 1295 | buffer_defaults.fieldlist = Qnil; | 1298 | buffer_defaults.fieldlist = Qnil; |
| 1296 | buffer_defaults.undo_list = Qnil; | 1299 | buffer_defaults.undo_list = Qnil; |
| 1300 | buffer_defaults.mark_active = Qnil; | ||
| 1297 | 1301 | ||
| 1298 | XFASTINT (buffer_defaults.tab_width) = 8; | 1302 | XFASTINT (buffer_defaults.tab_width) = 8; |
| 1299 | buffer_defaults.truncate_lines = Qnil; | 1303 | buffer_defaults.truncate_lines = Qnil; |
| @@ -1321,6 +1325,7 @@ init_buffer_once () | |||
| 1321 | XFASTINT (buffer_local_flags.major_mode) = -1; | 1325 | XFASTINT (buffer_local_flags.major_mode) = -1; |
| 1322 | XFASTINT (buffer_local_flags.mode_name) = -1; | 1326 | XFASTINT (buffer_local_flags.mode_name) = -1; |
| 1323 | XFASTINT (buffer_local_flags.undo_list) = -1; | 1327 | XFASTINT (buffer_local_flags.undo_list) = -1; |
| 1328 | XFASTINT (buffer_local_flags.mark_active) = -1; | ||
| 1324 | 1329 | ||
| 1325 | XFASTINT (buffer_local_flags.mode_line_format) = 1; | 1330 | XFASTINT (buffer_local_flags.mode_line_format) = 1; |
| 1326 | XFASTINT (buffer_local_flags.abbrev_mode) = 2; | 1331 | XFASTINT (buffer_local_flags.abbrev_mode) = 2; |
| @@ -1685,6 +1690,14 @@ between two undo boundaries as a single step to be undone.\n\ | |||
| 1685 | \n\ | 1690 | \n\ |
| 1686 | If the value of the variable is t, undo information is not recorded."); | 1691 | If the value of the variable is t, undo information is not recorded."); |
| 1687 | 1692 | ||
| 1693 | DEFVAR_PER_BUFFER ("mark-active", ¤t_buffer->mark_active, Qnil, | ||
| 1694 | "Non-nil means the mark and region are currently active in this buffer.\n\ | ||
| 1695 | Automatically local in all buffers."); | ||
| 1696 | |||
| 1697 | DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode, | ||
| 1698 | "*Non-nil means deactivate the mark when the buffer contents change."); | ||
| 1699 | Vtransient_mark_mode = Qnil; | ||
| 1700 | |||
| 1688 | defsubr (&Sbuffer_list); | 1701 | defsubr (&Sbuffer_list); |
| 1689 | defsubr (&Sget_buffer); | 1702 | defsubr (&Sget_buffer); |
| 1690 | defsubr (&Sget_file_buffer); | 1703 | defsubr (&Sget_file_buffer); |