Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 2042:bbf37b9a24af | 2043:a1ab3501653c |
|---|---|
| 106 Lisp_Object Vbuffer_alist; | 106 Lisp_Object Vbuffer_alist; |
| 107 | 107 |
| 108 /* Functions to call before and after each text change. */ | 108 /* Functions to call before and after each text change. */ |
| 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 | |
| 112 Lisp_Object Vtransient_mark_mode; | |
| 111 | 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; |
| 115 | 117 |
| 277 INITIALIZE_INTERVAL (b, NULL_INTERVAL); | 279 INITIALIZE_INTERVAL (b, NULL_INTERVAL); |
| 278 | 280 |
| 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; |
| 286 | 288 |
| 287 /* Reset the major mode to Fundamental, together with all the | 289 /* Reset the major mode to Fundamental, together with all the |
| 295 b->minor_modes = Qnil; | 297 b->minor_modes = Qnil; |
| 296 b->downcase_table = Vascii_downcase_table; | 298 b->downcase_table = Vascii_downcase_table; |
| 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); |
| 303 #endif /* 0 */ | 306 #endif /* 0 */ |
| 304 | 307 |
| 1292 #endif | 1295 #endif |
| 1293 buffer_defaults.abbrev_table = Qnil; | 1296 buffer_defaults.abbrev_table = Qnil; |
| 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; |
| 1300 buffer_defaults.ctl_arrow = Qt; | 1304 buffer_defaults.ctl_arrow = Qt; |
| 1301 | 1305 |
| 1319 XFASTINT (buffer_local_flags.auto_save_file_name) = -1; | 1323 XFASTINT (buffer_local_flags.auto_save_file_name) = -1; |
| 1320 XFASTINT (buffer_local_flags.read_only) = -1; | 1324 XFASTINT (buffer_local_flags.read_only) = -1; |
| 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; |
| 1327 XFASTINT (buffer_local_flags.overwrite_mode) = 4; | 1332 XFASTINT (buffer_local_flags.overwrite_mode) = 4; |
| 1328 XFASTINT (buffer_local_flags.case_fold_search) = 8; | 1333 XFASTINT (buffer_local_flags.case_fold_search) = 8; |
| 1683 nil marks undo boundaries. The undo command treats the changes\n\ | 1688 nil marks undo boundaries. The undo command treats the changes\n\ |
| 1684 between two undo boundaries as a single step to be undone.\n\ | 1689 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); |
| 1691 defsubr (&Sget_buffer_create); | 1704 defsubr (&Sget_buffer_create); |
| 1692 defsubr (&Sgenerate_new_buffer_name); | 1705 defsubr (&Sgenerate_new_buffer_name); |
