aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorJoakim Verona2011-02-05 11:23:09 +0100
committerJoakim Verona2011-02-05 11:23:09 +0100
commit4bd51ad5c3445b644dfb017d5b57b10a90aa325f (patch)
tree894801e7308ce4ecc34933f959e28f4b9cff9533 /src/buffer.c
parent13cfe8df462ab8da9f0028e16cc84dcaceaca3d1 (diff)
parent9bcaafce5351d270ac514e23cb69ff1a5fd35229 (diff)
downloademacs-4bd51ad5c3445b644dfb017d5b57b10a90aa325f.tar.gz
emacs-4bd51ad5c3445b644dfb017d5b57b10a90aa325f.zip
merge from upstream. currently seems to have bitroted and i get segfaults
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c260
1 files changed, 124 insertions, 136 deletions
diff --git a/src/buffer.c b/src/buffer.c
index ed3b7acd2ac..2c6eb7b84e3 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1,8 +1,6 @@
1/* Buffer manipulation primitives for GNU Emacs. 1/* Buffer manipulation primitives for GNU Emacs.
2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 2
3 1995, 1997, 1998, 1999, 2000, 2001, 2002, 3Copyright (C) 1985-1989, 1993-1995, 1997-2011 Free Software Foundation, Inc.
4 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5 Free Software Foundation, Inc.
6 4
7This file is part of GNU Emacs. 5This file is part of GNU Emacs.
8 6
@@ -27,10 +25,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
27#include <errno.h> 25#include <errno.h>
28#include <stdio.h> 26#include <stdio.h>
29#include <setjmp.h> 27#include <setjmp.h>
30
31#ifdef HAVE_UNISTD_H
32#include <unistd.h> 28#include <unistd.h>
33#endif
34 29
35#include "lisp.h" 30#include "lisp.h"
36#include "intervals.h" 31#include "intervals.h"
@@ -105,7 +100,6 @@ static char buffer_permanent_local_flags[MAX_PER_BUFFER_VARS];
105 100
106int last_per_buffer_idx; 101int last_per_buffer_idx;
107 102
108EXFUN (Fset_buffer, 1);
109static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, 103static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay,
110 int after, Lisp_Object arg1, 104 int after, Lisp_Object arg1,
111 Lisp_Object arg2, Lisp_Object arg3); 105 Lisp_Object arg2, Lisp_Object arg3);
@@ -117,36 +111,16 @@ static void reset_buffer_local_variables (struct buffer *b, int permanent_too);
117 to prevent lossage due to user rplac'ing this alist or its elements. */ 111 to prevent lossage due to user rplac'ing this alist or its elements. */
118Lisp_Object Vbuffer_alist; 112Lisp_Object Vbuffer_alist;
119 113
120/* Functions to call before and after each text change. */
121Lisp_Object Vbefore_change_functions;
122Lisp_Object Vafter_change_functions;
123
124Lisp_Object Vtransient_mark_mode;
125
126/* t means ignore all read-only text properties.
127 A list means ignore such a property if its value is a member of the list.
128 Any non-nil value means ignore buffer-read-only. */
129Lisp_Object Vinhibit_read_only;
130
131/* List of functions to call that can query about killing a buffer.
132 If any of these functions returns nil, we don't kill it. */
133Lisp_Object Vkill_buffer_query_functions;
134Lisp_Object Qkill_buffer_query_functions; 114Lisp_Object Qkill_buffer_query_functions;
135 115
136/* Hook run before changing a major mode. */ 116/* Hook run before changing a major mode. */
137Lisp_Object Vchange_major_mode_hook, Qchange_major_mode_hook; 117Lisp_Object Qchange_major_mode_hook;
138
139/* List of functions to call before changing an unmodified buffer. */
140Lisp_Object Vfirst_change_hook;
141 118
142Lisp_Object Qfirst_change_hook; 119Lisp_Object Qfirst_change_hook;
143Lisp_Object Qbefore_change_functions; 120Lisp_Object Qbefore_change_functions;
144Lisp_Object Qafter_change_functions; 121Lisp_Object Qafter_change_functions;
145Lisp_Object Qucs_set_table_for_input; 122Lisp_Object Qucs_set_table_for_input;
146 123
147/* If nonzero, all modification hooks are suppressed. */
148int inhibit_modification_hooks;
149
150Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; 124Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local;
151Lisp_Object Qpermanent_local_hook; 125Lisp_Object Qpermanent_local_hook;
152 126
@@ -1664,7 +1638,7 @@ the current buffer's major mode. */)
1664 CHECK_BUFFER (buffer); 1638 CHECK_BUFFER (buffer);
1665 1639
1666 if (STRINGP (XBUFFER (buffer)->name) 1640 if (STRINGP (XBUFFER (buffer)->name)
1667 && strcmp (SDATA (XBUFFER (buffer)->name), "*scratch*") == 0) 1641 && strcmp (SSDATA (XBUFFER (buffer)->name), "*scratch*") == 0)
1668 function = find_symbol_value (intern ("initial-major-mode")); 1642 function = find_symbol_value (intern ("initial-major-mode"));
1669 else 1643 else
1670 { 1644 {
@@ -3777,8 +3751,6 @@ modify_overlay (struct buffer *buf, EMACS_INT start, EMACS_INT end)
3777} 3751}
3778 3752
3779 3753
3780Lisp_Object Fdelete_overlay (Lisp_Object overlay);
3781
3782static struct Lisp_Overlay * 3754static struct Lisp_Overlay *
3783unchain_overlay (struct Lisp_Overlay *list, struct Lisp_Overlay *overlay) 3755unchain_overlay (struct Lisp_Overlay *list, struct Lisp_Overlay *overlay)
3784{ 3756{
@@ -5257,7 +5229,7 @@ init_buffer (void)
5257 because of the ange-ftp completion handler. 5229 because of the ange-ftp completion handler.
5258 However, it is not necessary to turn / into /:/. 5230 However, it is not necessary to turn / into /:/.
5259 So avoid doing that. */ 5231 So avoid doing that. */
5260 && strcmp ("/", SDATA (current_buffer->directory))) 5232 && strcmp ("/", SSDATA (current_buffer->directory)))
5261 current_buffer->directory 5233 current_buffer->directory
5262 = concat2 (build_string ("/:"), current_buffer->directory); 5234 = concat2 (build_string ("/:"), current_buffer->directory);
5263 5235
@@ -5368,147 +5340,147 @@ syms_of_buffer (void)
5368 /* All these use DEFVAR_LISP_NOPRO because the slots in 5340 /* All these use DEFVAR_LISP_NOPRO because the slots in
5369 buffer_defaults will all be marked via Vbuffer_defaults. */ 5341 buffer_defaults will all be marked via Vbuffer_defaults. */
5370 5342
5371 DEFVAR_LISP_NOPRO ("default-mode-line-format", 5343 DEFVAR_BUFFER_DEFAULTS ("default-mode-line-format",
5372 &buffer_defaults.mode_line_format, 5344 mode_line_format,
5373 doc: /* Default value of `mode-line-format' for buffers that don't override it. 5345 doc: /* Default value of `mode-line-format' for buffers that don't override it.
5374This is the same as (default-value 'mode-line-format). */); 5346This is the same as (default-value 'mode-line-format). */);
5375 5347
5376 DEFVAR_LISP_NOPRO ("default-header-line-format", 5348 DEFVAR_BUFFER_DEFAULTS ("default-header-line-format",
5377 &buffer_defaults.header_line_format, 5349 header_line_format,
5378 doc: /* Default value of `header-line-format' for buffers that don't override it. 5350 doc: /* Default value of `header-line-format' for buffers that don't override it.
5379This is the same as (default-value 'header-line-format). */); 5351This is the same as (default-value 'header-line-format). */);
5380 5352
5381 DEFVAR_LISP_NOPRO ("default-cursor-type", &buffer_defaults.cursor_type, 5353 DEFVAR_BUFFER_DEFAULTS ("default-cursor-type", cursor_type,
5382 doc: /* Default value of `cursor-type' for buffers that don't override it. 5354 doc: /* Default value of `cursor-type' for buffers that don't override it.
5383This is the same as (default-value 'cursor-type). */); 5355This is the same as (default-value 'cursor-type). */);
5384 5356
5385 DEFVAR_LISP_NOPRO ("default-line-spacing", 5357 DEFVAR_BUFFER_DEFAULTS ("default-line-spacing",
5386 &buffer_defaults.extra_line_spacing, 5358 extra_line_spacing,
5387 doc: /* Default value of `line-spacing' for buffers that don't override it. 5359 doc: /* Default value of `line-spacing' for buffers that don't override it.
5388This is the same as (default-value 'line-spacing). */); 5360This is the same as (default-value 'line-spacing). */);
5389 5361
5390 DEFVAR_LISP_NOPRO ("default-cursor-in-non-selected-windows", 5362 DEFVAR_BUFFER_DEFAULTS ("default-cursor-in-non-selected-windows",
5391 &buffer_defaults.cursor_in_non_selected_windows, 5363 cursor_in_non_selected_windows,
5392 doc: /* Default value of `cursor-in-non-selected-windows'. 5364 doc: /* Default value of `cursor-in-non-selected-windows'.
5393This is the same as (default-value 'cursor-in-non-selected-windows). */); 5365This is the same as (default-value 'cursor-in-non-selected-windows). */);
5394 5366
5395 DEFVAR_LISP_NOPRO ("default-abbrev-mode", 5367 DEFVAR_BUFFER_DEFAULTS ("default-abbrev-mode",
5396 &buffer_defaults.abbrev_mode, 5368 abbrev_mode,
5397 doc: /* Default value of `abbrev-mode' for buffers that do not override it. 5369 doc: /* Default value of `abbrev-mode' for buffers that do not override it.
5398This is the same as (default-value 'abbrev-mode). */); 5370This is the same as (default-value 'abbrev-mode). */);
5399 5371
5400 DEFVAR_LISP_NOPRO ("default-ctl-arrow", 5372 DEFVAR_BUFFER_DEFAULTS ("default-ctl-arrow",
5401 &buffer_defaults.ctl_arrow, 5373 ctl_arrow,
5402 doc: /* Default value of `ctl-arrow' for buffers that do not override it. 5374 doc: /* Default value of `ctl-arrow' for buffers that do not override it.
5403This is the same as (default-value 'ctl-arrow). */); 5375This is the same as (default-value 'ctl-arrow). */);
5404 5376
5405 DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", 5377 DEFVAR_BUFFER_DEFAULTS ("default-enable-multibyte-characters",
5406 &buffer_defaults.enable_multibyte_characters, 5378 enable_multibyte_characters,
5407 doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. 5379 doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it.
5408This is the same as (default-value 'enable-multibyte-characters). */); 5380This is the same as (default-value 'enable-multibyte-characters). */);
5409 5381
5410 DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system", 5382 DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-coding-system",
5411 &buffer_defaults.buffer_file_coding_system, 5383 buffer_file_coding_system,
5412 doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. 5384 doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it.
5413This is the same as (default-value 'buffer-file-coding-system). */); 5385This is the same as (default-value 'buffer-file-coding-system). */);
5414 5386
5415 DEFVAR_LISP_NOPRO ("default-truncate-lines", 5387 DEFVAR_BUFFER_DEFAULTS ("default-truncate-lines",
5416 &buffer_defaults.truncate_lines, 5388 truncate_lines,
5417 doc: /* Default value of `truncate-lines' for buffers that do not override it. 5389 doc: /* Default value of `truncate-lines' for buffers that do not override it.
5418This is the same as (default-value 'truncate-lines). */); 5390This is the same as (default-value 'truncate-lines). */);
5419 5391
5420 DEFVAR_LISP_NOPRO ("default-fill-column", 5392 DEFVAR_BUFFER_DEFAULTS ("default-fill-column",
5421 &buffer_defaults.fill_column, 5393 fill_column,
5422 doc: /* Default value of `fill-column' for buffers that do not override it. 5394 doc: /* Default value of `fill-column' for buffers that do not override it.
5423This is the same as (default-value 'fill-column). */); 5395This is the same as (default-value 'fill-column). */);
5424 5396
5425 DEFVAR_LISP_NOPRO ("default-left-margin", 5397 DEFVAR_BUFFER_DEFAULTS ("default-left-margin",
5426 &buffer_defaults.left_margin, 5398 left_margin,
5427 doc: /* Default value of `left-margin' for buffers that do not override it. 5399 doc: /* Default value of `left-margin' for buffers that do not override it.
5428This is the same as (default-value 'left-margin). */); 5400This is the same as (default-value 'left-margin). */);
5429 5401
5430 DEFVAR_LISP_NOPRO ("default-tab-width", 5402 DEFVAR_BUFFER_DEFAULTS ("default-tab-width",
5431 &buffer_defaults.tab_width, 5403 tab_width,
5432 doc: /* Default value of `tab-width' for buffers that do not override it. 5404 doc: /* Default value of `tab-width' for buffers that do not override it.
5433This is the same as (default-value 'tab-width). */); 5405This is the same as (default-value 'tab-width). */);
5434 5406
5435 DEFVAR_LISP_NOPRO ("default-case-fold-search", 5407 DEFVAR_BUFFER_DEFAULTS ("default-case-fold-search",
5436 &buffer_defaults.case_fold_search, 5408 case_fold_search,
5437 doc: /* Default value of `case-fold-search' for buffers that don't override it. 5409 doc: /* Default value of `case-fold-search' for buffers that don't override it.
5438This is the same as (default-value 'case-fold-search). */); 5410This is the same as (default-value 'case-fold-search). */);
5439 5411
5440#ifdef DOS_NT 5412#ifdef DOS_NT
5441 DEFVAR_LISP_NOPRO ("default-buffer-file-type", 5413 DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-type",
5442 &buffer_defaults.buffer_file_type, 5414 buffer_file_type,
5443 doc: /* Default file type for buffers that do not override it. 5415 doc: /* Default file type for buffers that do not override it.
5444This is the same as (default-value 'buffer-file-type). 5416This is the same as (default-value 'buffer-file-type).
5445The file type is nil for text, t for binary. */); 5417The file type is nil for text, t for binary. */);
5446#endif 5418#endif
5447 5419
5448 DEFVAR_LISP_NOPRO ("default-left-margin-width", 5420 DEFVAR_BUFFER_DEFAULTS ("default-left-margin-width",
5449 &buffer_defaults.left_margin_cols, 5421 left_margin_cols,
5450 doc: /* Default value of `left-margin-width' for buffers that don't override it. 5422 doc: /* Default value of `left-margin-width' for buffers that don't override it.
5451This is the same as (default-value 'left-margin-width). */); 5423This is the same as (default-value 'left-margin-width). */);
5452 5424
5453 DEFVAR_LISP_NOPRO ("default-right-margin-width", 5425 DEFVAR_BUFFER_DEFAULTS ("default-right-margin-width",
5454 &buffer_defaults.right_margin_cols, 5426 right_margin_cols,
5455 doc: /* Default value of `right-margin-width' for buffers that don't override it. 5427 doc: /* Default value of `right-margin-width' for buffers that don't override it.
5456This is the same as (default-value 'right-margin-width). */); 5428This is the same as (default-value 'right-margin-width). */);
5457 5429
5458 DEFVAR_LISP_NOPRO ("default-left-fringe-width", 5430 DEFVAR_BUFFER_DEFAULTS ("default-left-fringe-width",
5459 &buffer_defaults.left_fringe_width, 5431 left_fringe_width,
5460 doc: /* Default value of `left-fringe-width' for buffers that don't override it. 5432 doc: /* Default value of `left-fringe-width' for buffers that don't override it.
5461This is the same as (default-value 'left-fringe-width). */); 5433This is the same as (default-value 'left-fringe-width). */);
5462 5434
5463 DEFVAR_LISP_NOPRO ("default-right-fringe-width", 5435 DEFVAR_BUFFER_DEFAULTS ("default-right-fringe-width",
5464 &buffer_defaults.right_fringe_width, 5436 right_fringe_width,
5465 doc: /* Default value of `right-fringe-width' for buffers that don't override it. 5437 doc: /* Default value of `right-fringe-width' for buffers that don't override it.
5466This is the same as (default-value 'right-fringe-width). */); 5438This is the same as (default-value 'right-fringe-width). */);
5467 5439
5468 DEFVAR_LISP_NOPRO ("default-fringes-outside-margins", 5440 DEFVAR_BUFFER_DEFAULTS ("default-fringes-outside-margins",
5469 &buffer_defaults.fringes_outside_margins, 5441 fringes_outside_margins,
5470 doc: /* Default value of `fringes-outside-margins' for buffers that don't override it. 5442 doc: /* Default value of `fringes-outside-margins' for buffers that don't override it.
5471This is the same as (default-value 'fringes-outside-margins). */); 5443This is the same as (default-value 'fringes-outside-margins). */);
5472 5444
5473 DEFVAR_LISP_NOPRO ("default-scroll-bar-width", 5445 DEFVAR_BUFFER_DEFAULTS ("default-scroll-bar-width",
5474 &buffer_defaults.scroll_bar_width, 5446 scroll_bar_width,
5475 doc: /* Default value of `scroll-bar-width' for buffers that don't override it. 5447 doc: /* Default value of `scroll-bar-width' for buffers that don't override it.
5476This is the same as (default-value 'scroll-bar-width). */); 5448This is the same as (default-value 'scroll-bar-width). */);
5477 5449
5478 DEFVAR_LISP_NOPRO ("default-vertical-scroll-bar", 5450 DEFVAR_BUFFER_DEFAULTS ("default-vertical-scroll-bar",
5479 &buffer_defaults.vertical_scroll_bar_type, 5451 vertical_scroll_bar_type,
5480 doc: /* Default value of `vertical-scroll-bar' for buffers that don't override it. 5452 doc: /* Default value of `vertical-scroll-bar' for buffers that don't override it.
5481This is the same as (default-value 'vertical-scroll-bar). */); 5453This is the same as (default-value 'vertical-scroll-bar). */);
5482 5454
5483 DEFVAR_LISP_NOPRO ("default-indicate-empty-lines", 5455 DEFVAR_BUFFER_DEFAULTS ("default-indicate-empty-lines",
5484 &buffer_defaults.indicate_empty_lines, 5456 indicate_empty_lines,
5485 doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. 5457 doc: /* Default value of `indicate-empty-lines' for buffers that don't override it.
5486This is the same as (default-value 'indicate-empty-lines). */); 5458This is the same as (default-value 'indicate-empty-lines). */);
5487 5459
5488 DEFVAR_LISP_NOPRO ("default-indicate-buffer-boundaries", 5460 DEFVAR_BUFFER_DEFAULTS ("default-indicate-buffer-boundaries",
5489 &buffer_defaults.indicate_buffer_boundaries, 5461 indicate_buffer_boundaries,
5490 doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it. 5462 doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it.
5491This is the same as (default-value 'indicate-buffer-boundaries). */); 5463This is the same as (default-value 'indicate-buffer-boundaries). */);
5492 5464
5493 DEFVAR_LISP_NOPRO ("default-fringe-indicator-alist", 5465 DEFVAR_BUFFER_DEFAULTS ("default-fringe-indicator-alist",
5494 &buffer_defaults.fringe_indicator_alist, 5466 fringe_indicator_alist,
5495 doc: /* Default value of `fringe-indicator-alist' for buffers that don't override it. 5467 doc: /* Default value of `fringe-indicator-alist' for buffers that don't override it.
5496This is the same as (default-value 'fringe-indicator-alist'). */); 5468This is the same as (default-value 'fringe-indicator-alist'). */);
5497 5469
5498 DEFVAR_LISP_NOPRO ("default-fringe-cursor-alist", 5470 DEFVAR_BUFFER_DEFAULTS ("default-fringe-cursor-alist",
5499 &buffer_defaults.fringe_cursor_alist, 5471 fringe_cursor_alist,
5500 doc: /* Default value of `fringe-cursor-alist' for buffers that don't override it. 5472 doc: /* Default value of `fringe-cursor-alist' for buffers that don't override it.
5501This is the same as (default-value 'fringe-cursor-alist'). */); 5473This is the same as (default-value 'fringe-cursor-alist'). */);
5502 5474
5503 DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", 5475 DEFVAR_BUFFER_DEFAULTS ("default-scroll-up-aggressively",
5504 &buffer_defaults.scroll_up_aggressively, 5476 scroll_up_aggressively,
5505 doc: /* Default value of `scroll-up-aggressively'. 5477 doc: /* Default value of `scroll-up-aggressively'.
5506This value applies in buffers that don't have their own local values. 5478This value applies in buffers that don't have their own local values.
5507This is the same as (default-value 'scroll-up-aggressively). */); 5479This is the same as (default-value 'scroll-up-aggressively). */);
5508 5480
5509 DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively", 5481 DEFVAR_BUFFER_DEFAULTS ("default-scroll-down-aggressively",
5510 &buffer_defaults.scroll_down_aggressively, 5482 scroll_down_aggressively,
5511 doc: /* Default value of `scroll-down-aggressively'. 5483 doc: /* Default value of `scroll-down-aggressively'.
5512This value applies in buffers that don't have their own local values. 5484This value applies in buffers that don't have their own local values.
5513This is the same as (default-value 'scroll-down-aggressively). */); 5485This is the same as (default-value 'scroll-down-aggressively). */);
5514 5486
@@ -5573,8 +5545,8 @@ A string is printed verbatim in the mode line except for %-constructs:
5573 %% -- print %. %- -- print infinitely many dashes. 5545 %% -- print %. %- -- print infinitely many dashes.
5574Decimal digits after the % specify field width to which to pad. */); 5546Decimal digits after the % specify field width to which to pad. */);
5575 5547
5576 DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode, 5548 DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode,
5577 doc: /* *Value of `major-mode' for new buffers. */); 5549 doc: /* *Value of `major-mode' for new buffers. */);
5578 5550
5579 DEFVAR_PER_BUFFER ("major-mode", &current_buffer->major_mode, 5551 DEFVAR_PER_BUFFER ("major-mode", &current_buffer->major_mode,
5580 make_number (Lisp_Symbol), 5552 make_number (Lisp_Symbol),
@@ -5600,7 +5572,8 @@ Format with `format-mode-line' to produce a string value. */);
5600 doc: /* Local (mode-specific) abbrev table of current buffer. */); 5572 doc: /* Local (mode-specific) abbrev table of current buffer. */);
5601 5573
5602 DEFVAR_PER_BUFFER ("abbrev-mode", &current_buffer->abbrev_mode, Qnil, 5574 DEFVAR_PER_BUFFER ("abbrev-mode", &current_buffer->abbrev_mode, Qnil,
5603 doc: /* Non-nil turns on automatic expansion of abbrevs as they are inserted. */); 5575 doc: /* Non-nil if Abbrev mode is enabled.
5576Use the command `abbrev-mode' to change this variable. */);
5604 5577
5605 DEFVAR_PER_BUFFER ("case-fold-search", &current_buffer->case_fold_search, 5578 DEFVAR_PER_BUFFER ("case-fold-search", &current_buffer->case_fold_search,
5606 Qnil, 5579 Qnil,
@@ -5948,7 +5921,7 @@ between 0.0 and 1.0, inclusive. */);
5948 "Don't ask."); 5921 "Don't ask.");
5949*/ 5922*/
5950 5923
5951 DEFVAR_LISP ("before-change-functions", &Vbefore_change_functions, 5924 DEFVAR_LISP ("before-change-functions", Vbefore_change_functions,
5952 doc: /* List of functions to call before each text change. 5925 doc: /* List of functions to call before each text change.
5953Two arguments are passed to each function: the positions of 5926Two arguments are passed to each function: the positions of
5954the beginning and end of the range of old text to be changed. 5927the beginning and end of the range of old text to be changed.
@@ -5964,7 +5937,7 @@ the variable's value remains nil. That prevents the error
5964from happening repeatedly and making Emacs nonfunctional. */); 5937from happening repeatedly and making Emacs nonfunctional. */);
5965 Vbefore_change_functions = Qnil; 5938 Vbefore_change_functions = Qnil;
5966 5939
5967 DEFVAR_LISP ("after-change-functions", &Vafter_change_functions, 5940 DEFVAR_LISP ("after-change-functions", Vafter_change_functions,
5968 doc: /* List of functions to call after each text change. 5941 doc: /* List of functions to call after each text change.
5969Three arguments are passed to each function: the positions of 5942Three arguments are passed to each function: the positions of
5970the beginning and end of the range of changed text, 5943the beginning and end of the range of changed text,
@@ -5982,7 +5955,7 @@ the variable's value remains nil. That prevents the error
5982from happening repeatedly and making Emacs nonfunctional. */); 5955from happening repeatedly and making Emacs nonfunctional. */);
5983 Vafter_change_functions = Qnil; 5956 Vafter_change_functions = Qnil;
5984 5957
5985 DEFVAR_LISP ("first-change-hook", &Vfirst_change_hook, 5958 DEFVAR_LISP ("first-change-hook", Vfirst_change_hook,
5986 doc: /* A list of functions to call before changing a buffer which is unmodified. 5959 doc: /* A list of functions to call before changing a buffer which is unmodified.
5987The functions are run using the `run-hooks' function. */); 5960The functions are run using the `run-hooks' function. */);
5988 Vfirst_change_hook = Qnil; 5961 Vfirst_change_hook = Qnil;
@@ -6097,14 +6070,28 @@ The function `set-window-buffer' updates this variable
6097to the value obtained by calling `current-time'. 6070to the value obtained by calling `current-time'.
6098If the buffer has never been shown in a window, the value is nil. */); 6071If the buffer has never been shown in a window, the value is nil. */);
6099 6072
6100 DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode, 6073 DEFVAR_LISP ("transient-mark-mode", Vtransient_mark_mode,
6101 doc: /* */); 6074 doc: /* Non-nil if Transient Mark mode is enabled.
6075See the command `transient-mark-mode' for a description of this minor mode.
6076
6077Non-nil also enables highlighting of the region whenever the mark is active.
6078The variable `highlight-nonselected-windows' controls whether to highlight
6079all windows or just the selected window.
6080
6081Lisp programs may give this variable certain special values:
6082
6083- A value of `lambda' enables Transient Mark mode temporarily.
6084 It is disabled again after any subsequent action that would
6085 normally deactivate the mark (e.g. buffer modification).
6086
6087- A value of (only . OLDVAL) enables Transient Mark mode
6088 temporarily. After any subsequent point motion command that is
6089 not shift-translated, or any other action that would normally
6090 deactivate the mark (e.g. buffer modification), the value of
6091 `transient-mark-mode' is set to OLDVAL. */);
6102 Vtransient_mark_mode = Qnil; 6092 Vtransient_mark_mode = Qnil;
6103 /* The docstring is in simple.el. If we put it here, it would be
6104 overwritten when transient-mark-mode is defined using
6105 define-minor-mode. */
6106 6093
6107 DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only, 6094 DEFVAR_LISP ("inhibit-read-only", Vinhibit_read_only,
6108 doc: /* *Non-nil means disregard read-only status of buffers or characters. 6095 doc: /* *Non-nil means disregard read-only status of buffers or characters.
6109If the value is t, disregard `buffer-read-only' and all `read-only' 6096If the value is t, disregard `buffer-read-only' and all `read-only'
6110text properties. If the value is a list, disregard `buffer-read-only' 6097text properties. If the value is a list, disregard `buffer-read-only'
@@ -6140,16 +6127,20 @@ to the default frame line height. A value of nil means add no extra space. */)
6140 6127
6141 DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", 6128 DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows",
6142 &current_buffer->cursor_in_non_selected_windows, Qnil, 6129 &current_buffer->cursor_in_non_selected_windows, Qnil,
6143 doc: /* *Cursor type to display in non-selected windows. 6130 doc: /* *Non-nil means show a cursor in non-selected windows.
6144The value t means to use hollow box cursor. See `cursor-type' for other values. */); 6131If nil, only shows a cursor in the selected window.
6145 6132If t, displays a cursor related to the usual cursor type
6146 DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, 6133\(a solid box becomes hollow, a bar becomes a narrower bar).
6134You can also specify the cursor type as in the `cursor-type' variable.
6135Use Custom to set this variable and update the display." */);
6136
6137 DEFVAR_LISP ("kill-buffer-query-functions", Vkill_buffer_query_functions,
6147 doc: /* List of functions called with no args to query before killing a buffer. 6138 doc: /* List of functions called with no args to query before killing a buffer.
6148The buffer being killed will be current while the functions are running. 6139The buffer being killed will be current while the functions are running.
6149If any of them returns nil, the buffer is not killed. */); 6140If any of them returns nil, the buffer is not killed. */);
6150 Vkill_buffer_query_functions = Qnil; 6141 Vkill_buffer_query_functions = Qnil;
6151 6142
6152 DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook, 6143 DEFVAR_LISP ("change-major-mode-hook", Vchange_major_mode_hook,
6153 doc: /* Normal hook run before changing the major mode of a buffer. 6144 doc: /* Normal hook run before changing the major mode of a buffer.
6154The function `kill-all-local-variables' runs this before doing anything else. */); 6145The function `kill-all-local-variables' runs this before doing anything else. */);
6155 Vchange_major_mode_hook = Qnil; 6146 Vchange_major_mode_hook = Qnil;
@@ -6217,6 +6208,3 @@ keys_of_buffer (void)
6217 initialized when that function gets called. */ 6208 initialized when that function gets called. */
6218 Fput (intern_c_string ("erase-buffer"), Qdisabled, Qt); 6209 Fput (intern_c_string ("erase-buffer"), Qdisabled, Qt);
6219} 6210}
6220
6221/* arch-tag: e48569bf-69a9-4b65-a23b-8e68769436e1
6222 (do not change this comment) */