aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c239
1 files changed, 106 insertions, 133 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 8f8bfb54a21..7a0260f584a 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 2
3Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 1997, 3Copyright (C) 1985-1989, 1993-1995, 1997-2011 Free Software Foundation, Inc.
4 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
5 2009, 2010 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
@@ -5369,147 +5341,147 @@ syms_of_buffer (void)
5369 /* All these use DEFVAR_LISP_NOPRO because the slots in 5341 /* All these use DEFVAR_LISP_NOPRO because the slots in
5370 buffer_defaults will all be marked via Vbuffer_defaults. */ 5342 buffer_defaults will all be marked via Vbuffer_defaults. */
5371 5343
5372 DEFVAR_LISP_NOPRO ("default-mode-line-format", 5344 DEFVAR_BUFFER_DEFAULTS ("default-mode-line-format",
5373 &buffer_defaults.mode_line_format, 5345 mode_line_format,
5374 doc: /* Default value of `mode-line-format' for buffers that don't override it. 5346 doc: /* Default value of `mode-line-format' for buffers that don't override it.
5375This is the same as (default-value 'mode-line-format). */); 5347This is the same as (default-value 'mode-line-format). */);
5376 5348
5377 DEFVAR_LISP_NOPRO ("default-header-line-format", 5349 DEFVAR_BUFFER_DEFAULTS ("default-header-line-format",
5378 &buffer_defaults.header_line_format, 5350 header_line_format,
5379 doc: /* Default value of `header-line-format' for buffers that don't override it. 5351 doc: /* Default value of `header-line-format' for buffers that don't override it.
5380This is the same as (default-value 'header-line-format). */); 5352This is the same as (default-value 'header-line-format). */);
5381 5353
5382 DEFVAR_LISP_NOPRO ("default-cursor-type", &buffer_defaults.cursor_type, 5354 DEFVAR_BUFFER_DEFAULTS ("default-cursor-type", cursor_type,
5383 doc: /* Default value of `cursor-type' for buffers that don't override it. 5355 doc: /* Default value of `cursor-type' for buffers that don't override it.
5384This is the same as (default-value 'cursor-type). */); 5356This is the same as (default-value 'cursor-type). */);
5385 5357
5386 DEFVAR_LISP_NOPRO ("default-line-spacing", 5358 DEFVAR_BUFFER_DEFAULTS ("default-line-spacing",
5387 &buffer_defaults.extra_line_spacing, 5359 extra_line_spacing,
5388 doc: /* Default value of `line-spacing' for buffers that don't override it. 5360 doc: /* Default value of `line-spacing' for buffers that don't override it.
5389This is the same as (default-value 'line-spacing). */); 5361This is the same as (default-value 'line-spacing). */);
5390 5362
5391 DEFVAR_LISP_NOPRO ("default-cursor-in-non-selected-windows", 5363 DEFVAR_BUFFER_DEFAULTS ("default-cursor-in-non-selected-windows",
5392 &buffer_defaults.cursor_in_non_selected_windows, 5364 cursor_in_non_selected_windows,
5393 doc: /* Default value of `cursor-in-non-selected-windows'. 5365 doc: /* Default value of `cursor-in-non-selected-windows'.
5394This is the same as (default-value 'cursor-in-non-selected-windows). */); 5366This is the same as (default-value 'cursor-in-non-selected-windows). */);
5395 5367
5396 DEFVAR_LISP_NOPRO ("default-abbrev-mode", 5368 DEFVAR_BUFFER_DEFAULTS ("default-abbrev-mode",
5397 &buffer_defaults.abbrev_mode, 5369 abbrev_mode,
5398 doc: /* Default value of `abbrev-mode' for buffers that do not override it. 5370 doc: /* Default value of `abbrev-mode' for buffers that do not override it.
5399This is the same as (default-value 'abbrev-mode). */); 5371This is the same as (default-value 'abbrev-mode). */);
5400 5372
5401 DEFVAR_LISP_NOPRO ("default-ctl-arrow", 5373 DEFVAR_BUFFER_DEFAULTS ("default-ctl-arrow",
5402 &buffer_defaults.ctl_arrow, 5374 ctl_arrow,
5403 doc: /* Default value of `ctl-arrow' for buffers that do not override it. 5375 doc: /* Default value of `ctl-arrow' for buffers that do not override it.
5404This is the same as (default-value 'ctl-arrow). */); 5376This is the same as (default-value 'ctl-arrow). */);
5405 5377
5406 DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", 5378 DEFVAR_BUFFER_DEFAULTS ("default-enable-multibyte-characters",
5407 &buffer_defaults.enable_multibyte_characters, 5379 enable_multibyte_characters,
5408 doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. 5380 doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it.
5409This is the same as (default-value 'enable-multibyte-characters). */); 5381This is the same as (default-value 'enable-multibyte-characters). */);
5410 5382
5411 DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system", 5383 DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-coding-system",
5412 &buffer_defaults.buffer_file_coding_system, 5384 buffer_file_coding_system,
5413 doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. 5385 doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it.
5414This is the same as (default-value 'buffer-file-coding-system). */); 5386This is the same as (default-value 'buffer-file-coding-system). */);
5415 5387
5416 DEFVAR_LISP_NOPRO ("default-truncate-lines", 5388 DEFVAR_BUFFER_DEFAULTS ("default-truncate-lines",
5417 &buffer_defaults.truncate_lines, 5389 truncate_lines,
5418 doc: /* Default value of `truncate-lines' for buffers that do not override it. 5390 doc: /* Default value of `truncate-lines' for buffers that do not override it.
5419This is the same as (default-value 'truncate-lines). */); 5391This is the same as (default-value 'truncate-lines). */);
5420 5392
5421 DEFVAR_LISP_NOPRO ("default-fill-column", 5393 DEFVAR_BUFFER_DEFAULTS ("default-fill-column",
5422 &buffer_defaults.fill_column, 5394 fill_column,
5423 doc: /* Default value of `fill-column' for buffers that do not override it. 5395 doc: /* Default value of `fill-column' for buffers that do not override it.
5424This is the same as (default-value 'fill-column). */); 5396This is the same as (default-value 'fill-column). */);
5425 5397
5426 DEFVAR_LISP_NOPRO ("default-left-margin", 5398 DEFVAR_BUFFER_DEFAULTS ("default-left-margin",
5427 &buffer_defaults.left_margin, 5399 left_margin,
5428 doc: /* Default value of `left-margin' for buffers that do not override it. 5400 doc: /* Default value of `left-margin' for buffers that do not override it.
5429This is the same as (default-value 'left-margin). */); 5401This is the same as (default-value 'left-margin). */);
5430 5402
5431 DEFVAR_LISP_NOPRO ("default-tab-width", 5403 DEFVAR_BUFFER_DEFAULTS ("default-tab-width",
5432 &buffer_defaults.tab_width, 5404 tab_width,
5433 doc: /* Default value of `tab-width' for buffers that do not override it. 5405 doc: /* Default value of `tab-width' for buffers that do not override it.
5434This is the same as (default-value 'tab-width). */); 5406This is the same as (default-value 'tab-width). */);
5435 5407
5436 DEFVAR_LISP_NOPRO ("default-case-fold-search", 5408 DEFVAR_BUFFER_DEFAULTS ("default-case-fold-search",
5437 &buffer_defaults.case_fold_search, 5409 case_fold_search,
5438 doc: /* Default value of `case-fold-search' for buffers that don't override it. 5410 doc: /* Default value of `case-fold-search' for buffers that don't override it.
5439This is the same as (default-value 'case-fold-search). */); 5411This is the same as (default-value 'case-fold-search). */);
5440 5412
5441#ifdef DOS_NT 5413#ifdef DOS_NT
5442 DEFVAR_LISP_NOPRO ("default-buffer-file-type", 5414 DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-type",
5443 &buffer_defaults.buffer_file_type, 5415 buffer_file_type,
5444 doc: /* Default file type for buffers that do not override it. 5416 doc: /* Default file type for buffers that do not override it.
5445This is the same as (default-value 'buffer-file-type). 5417This is the same as (default-value 'buffer-file-type).
5446The file type is nil for text, t for binary. */); 5418The file type is nil for text, t for binary. */);
5447#endif 5419#endif
5448 5420
5449 DEFVAR_LISP_NOPRO ("default-left-margin-width", 5421 DEFVAR_BUFFER_DEFAULTS ("default-left-margin-width",
5450 &buffer_defaults.left_margin_cols, 5422 left_margin_cols,
5451 doc: /* Default value of `left-margin-width' for buffers that don't override it. 5423 doc: /* Default value of `left-margin-width' for buffers that don't override it.
5452This is the same as (default-value 'left-margin-width). */); 5424This is the same as (default-value 'left-margin-width). */);
5453 5425
5454 DEFVAR_LISP_NOPRO ("default-right-margin-width", 5426 DEFVAR_BUFFER_DEFAULTS ("default-right-margin-width",
5455 &buffer_defaults.right_margin_cols, 5427 right_margin_cols,
5456 doc: /* Default value of `right-margin-width' for buffers that don't override it. 5428 doc: /* Default value of `right-margin-width' for buffers that don't override it.
5457This is the same as (default-value 'right-margin-width). */); 5429This is the same as (default-value 'right-margin-width). */);
5458 5430
5459 DEFVAR_LISP_NOPRO ("default-left-fringe-width", 5431 DEFVAR_BUFFER_DEFAULTS ("default-left-fringe-width",
5460 &buffer_defaults.left_fringe_width, 5432 left_fringe_width,
5461 doc: /* Default value of `left-fringe-width' for buffers that don't override it. 5433 doc: /* Default value of `left-fringe-width' for buffers that don't override it.
5462This is the same as (default-value 'left-fringe-width). */); 5434This is the same as (default-value 'left-fringe-width). */);
5463 5435
5464 DEFVAR_LISP_NOPRO ("default-right-fringe-width", 5436 DEFVAR_BUFFER_DEFAULTS ("default-right-fringe-width",
5465 &buffer_defaults.right_fringe_width, 5437 right_fringe_width,
5466 doc: /* Default value of `right-fringe-width' for buffers that don't override it. 5438 doc: /* Default value of `right-fringe-width' for buffers that don't override it.
5467This is the same as (default-value 'right-fringe-width). */); 5439This is the same as (default-value 'right-fringe-width). */);
5468 5440
5469 DEFVAR_LISP_NOPRO ("default-fringes-outside-margins", 5441 DEFVAR_BUFFER_DEFAULTS ("default-fringes-outside-margins",
5470 &buffer_defaults.fringes_outside_margins, 5442 fringes_outside_margins,
5471 doc: /* Default value of `fringes-outside-margins' for buffers that don't override it. 5443 doc: /* Default value of `fringes-outside-margins' for buffers that don't override it.
5472This is the same as (default-value 'fringes-outside-margins). */); 5444This is the same as (default-value 'fringes-outside-margins). */);
5473 5445
5474 DEFVAR_LISP_NOPRO ("default-scroll-bar-width", 5446 DEFVAR_BUFFER_DEFAULTS ("default-scroll-bar-width",
5475 &buffer_defaults.scroll_bar_width, 5447 scroll_bar_width,
5476 doc: /* Default value of `scroll-bar-width' for buffers that don't override it. 5448 doc: /* Default value of `scroll-bar-width' for buffers that don't override it.
5477This is the same as (default-value 'scroll-bar-width). */); 5449This is the same as (default-value 'scroll-bar-width). */);
5478 5450
5479 DEFVAR_LISP_NOPRO ("default-vertical-scroll-bar", 5451 DEFVAR_BUFFER_DEFAULTS ("default-vertical-scroll-bar",
5480 &buffer_defaults.vertical_scroll_bar_type, 5452 vertical_scroll_bar_type,
5481 doc: /* Default value of `vertical-scroll-bar' for buffers that don't override it. 5453 doc: /* Default value of `vertical-scroll-bar' for buffers that don't override it.
5482This is the same as (default-value 'vertical-scroll-bar). */); 5454This is the same as (default-value 'vertical-scroll-bar). */);
5483 5455
5484 DEFVAR_LISP_NOPRO ("default-indicate-empty-lines", 5456 DEFVAR_BUFFER_DEFAULTS ("default-indicate-empty-lines",
5485 &buffer_defaults.indicate_empty_lines, 5457 indicate_empty_lines,
5486 doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. 5458 doc: /* Default value of `indicate-empty-lines' for buffers that don't override it.
5487This is the same as (default-value 'indicate-empty-lines). */); 5459This is the same as (default-value 'indicate-empty-lines). */);
5488 5460
5489 DEFVAR_LISP_NOPRO ("default-indicate-buffer-boundaries", 5461 DEFVAR_BUFFER_DEFAULTS ("default-indicate-buffer-boundaries",
5490 &buffer_defaults.indicate_buffer_boundaries, 5462 indicate_buffer_boundaries,
5491 doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it. 5463 doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it.
5492This is the same as (default-value 'indicate-buffer-boundaries). */); 5464This is the same as (default-value 'indicate-buffer-boundaries). */);
5493 5465
5494 DEFVAR_LISP_NOPRO ("default-fringe-indicator-alist", 5466 DEFVAR_BUFFER_DEFAULTS ("default-fringe-indicator-alist",
5495 &buffer_defaults.fringe_indicator_alist, 5467 fringe_indicator_alist,
5496 doc: /* Default value of `fringe-indicator-alist' for buffers that don't override it. 5468 doc: /* Default value of `fringe-indicator-alist' for buffers that don't override it.
5497This is the same as (default-value 'fringe-indicator-alist'). */); 5469This is the same as (default-value 'fringe-indicator-alist'). */);
5498 5470
5499 DEFVAR_LISP_NOPRO ("default-fringe-cursor-alist", 5471 DEFVAR_BUFFER_DEFAULTS ("default-fringe-cursor-alist",
5500 &buffer_defaults.fringe_cursor_alist, 5472 fringe_cursor_alist,
5501 doc: /* Default value of `fringe-cursor-alist' for buffers that don't override it. 5473 doc: /* Default value of `fringe-cursor-alist' for buffers that don't override it.
5502This is the same as (default-value 'fringe-cursor-alist'). */); 5474This is the same as (default-value 'fringe-cursor-alist'). */);
5503 5475
5504 DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", 5476 DEFVAR_BUFFER_DEFAULTS ("default-scroll-up-aggressively",
5505 &buffer_defaults.scroll_up_aggressively, 5477 scroll_up_aggressively,
5506 doc: /* Default value of `scroll-up-aggressively'. 5478 doc: /* Default value of `scroll-up-aggressively'.
5507This value applies in buffers that don't have their own local values. 5479This value applies in buffers that don't have their own local values.
5508This is the same as (default-value 'scroll-up-aggressively). */); 5480This is the same as (default-value 'scroll-up-aggressively). */);
5509 5481
5510 DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively", 5482 DEFVAR_BUFFER_DEFAULTS ("default-scroll-down-aggressively",
5511 &buffer_defaults.scroll_down_aggressively, 5483 scroll_down_aggressively,
5512 doc: /* Default value of `scroll-down-aggressively'. 5484 doc: /* Default value of `scroll-down-aggressively'.
5513This value applies in buffers that don't have their own local values. 5485This value applies in buffers that don't have their own local values.
5514This is the same as (default-value 'scroll-down-aggressively). */); 5486This is the same as (default-value 'scroll-down-aggressively). */);
5515 5487
@@ -5574,8 +5546,8 @@ A string is printed verbatim in the mode line except for %-constructs:
5574 %% -- print %. %- -- print infinitely many dashes. 5546 %% -- print %. %- -- print infinitely many dashes.
5575Decimal digits after the % specify field width to which to pad. */); 5547Decimal digits after the % specify field width to which to pad. */);
5576 5548
5577 DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode, 5549 DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode,
5578 doc: /* *Value of `major-mode' for new buffers. */); 5550 doc: /* *Value of `major-mode' for new buffers. */);
5579 5551
5580 DEFVAR_PER_BUFFER ("major-mode", &current_buffer->major_mode, 5552 DEFVAR_PER_BUFFER ("major-mode", &current_buffer->major_mode,
5581 make_number (Lisp_Symbol), 5553 make_number (Lisp_Symbol),
@@ -5950,7 +5922,7 @@ between 0.0 and 1.0, inclusive. */);
5950 "Don't ask."); 5922 "Don't ask.");
5951*/ 5923*/
5952 5924
5953 DEFVAR_LISP ("before-change-functions", &Vbefore_change_functions, 5925 DEFVAR_LISP ("before-change-functions", Vbefore_change_functions,
5954 doc: /* List of functions to call before each text change. 5926 doc: /* List of functions to call before each text change.
5955Two arguments are passed to each function: the positions of 5927Two arguments are passed to each function: the positions of
5956the beginning and end of the range of old text to be changed. 5928the beginning and end of the range of old text to be changed.
@@ -5966,7 +5938,7 @@ the variable's value remains nil. That prevents the error
5966from happening repeatedly and making Emacs nonfunctional. */); 5938from happening repeatedly and making Emacs nonfunctional. */);
5967 Vbefore_change_functions = Qnil; 5939 Vbefore_change_functions = Qnil;
5968 5940
5969 DEFVAR_LISP ("after-change-functions", &Vafter_change_functions, 5941 DEFVAR_LISP ("after-change-functions", Vafter_change_functions,
5970 doc: /* List of functions to call after each text change. 5942 doc: /* List of functions to call after each text change.
5971Three arguments are passed to each function: the positions of 5943Three arguments are passed to each function: the positions of
5972the beginning and end of the range of changed text, 5944the beginning and end of the range of changed text,
@@ -5984,7 +5956,7 @@ the variable's value remains nil. That prevents the error
5984from happening repeatedly and making Emacs nonfunctional. */); 5956from happening repeatedly and making Emacs nonfunctional. */);
5985 Vafter_change_functions = Qnil; 5957 Vafter_change_functions = Qnil;
5986 5958
5987 DEFVAR_LISP ("first-change-hook", &Vfirst_change_hook, 5959 DEFVAR_LISP ("first-change-hook", Vfirst_change_hook,
5988 doc: /* A list of functions to call before changing a buffer which is unmodified. 5960 doc: /* A list of functions to call before changing a buffer which is unmodified.
5989The functions are run using the `run-hooks' function. */); 5961The functions are run using the `run-hooks' function. */);
5990 Vfirst_change_hook = Qnil; 5962 Vfirst_change_hook = Qnil;
@@ -6099,7 +6071,7 @@ The function `set-window-buffer' updates this variable
6099to the value obtained by calling `current-time'. 6071to the value obtained by calling `current-time'.
6100If the buffer has never been shown in a window, the value is nil. */); 6072If the buffer has never been shown in a window, the value is nil. */);
6101 6073
6102 DEFVAR_LISP ("transient-mark-mode", &Vtransient_mark_mode, 6074 DEFVAR_LISP ("transient-mark-mode", Vtransient_mark_mode,
6103 doc: /* Non-nil if Transient Mark mode is enabled. 6075 doc: /* Non-nil if Transient Mark mode is enabled.
6104See the command `transient-mark-mode' for a description of this minor mode. 6076See the command `transient-mark-mode' for a description of this minor mode.
6105 6077
@@ -6107,18 +6079,20 @@ Non-nil also enables highlighting of the region whenever the mark is active.
6107The variable `highlight-nonselected-windows' controls whether to highlight 6079The variable `highlight-nonselected-windows' controls whether to highlight
6108all windows or just the selected window. 6080all windows or just the selected window.
6109 6081
6110If the value is `lambda', that enables Transient Mark mode temporarily. 6082Lisp programs may give this variable certain special values:
6111After any subsequent action that would normally deactivate the mark
6112\(such as buffer modification), Transient Mark mode is turned off.
6113 6083
6114If the value is (only . OLDVAL), that enables Transient Mark mode 6084- A value of `lambda' enables Transient Mark mode temporarily.
6115temporarily. After any subsequent point motion command that is not 6085 It is disabled again after any subsequent action that would
6116shift-translated, or any other action that would normally deactivate 6086 normally deactivate the mark (e.g. buffer modification).
6117the mark (such as buffer modification), the value of 6087
6118`transient-mark-mode' is set to OLDVAL. */); 6088- A value of (only . OLDVAL) enables Transient Mark mode
6089 temporarily. After any subsequent point motion command that is
6090 not shift-translated, or any other action that would normally
6091 deactivate the mark (e.g. buffer modification), the value of
6092 `transient-mark-mode' is set to OLDVAL. */);
6119 Vtransient_mark_mode = Qnil; 6093 Vtransient_mark_mode = Qnil;
6120 6094
6121 DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only, 6095 DEFVAR_LISP ("inhibit-read-only", Vinhibit_read_only,
6122 doc: /* *Non-nil means disregard read-only status of buffers or characters. 6096 doc: /* *Non-nil means disregard read-only status of buffers or characters.
6123If the value is t, disregard `buffer-read-only' and all `read-only' 6097If the value is t, disregard `buffer-read-only' and all `read-only'
6124text properties. If the value is a list, disregard `buffer-read-only' 6098text properties. If the value is a list, disregard `buffer-read-only'
@@ -6161,13 +6135,13 @@ If t, displays a cursor related to the usual cursor type
6161You can also specify the cursor type as in the `cursor-type' variable. 6135You can also specify the cursor type as in the `cursor-type' variable.
6162Use Custom to set this variable and update the display." */); 6136Use Custom to set this variable and update the display." */);
6163 6137
6164 DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, 6138 DEFVAR_LISP ("kill-buffer-query-functions", Vkill_buffer_query_functions,
6165 doc: /* List of functions called with no args to query before killing a buffer. 6139 doc: /* List of functions called with no args to query before killing a buffer.
6166The buffer being killed will be current while the functions are running. 6140The buffer being killed will be current while the functions are running.
6167If any of them returns nil, the buffer is not killed. */); 6141If any of them returns nil, the buffer is not killed. */);
6168 Vkill_buffer_query_functions = Qnil; 6142 Vkill_buffer_query_functions = Qnil;
6169 6143
6170 DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook, 6144 DEFVAR_LISP ("change-major-mode-hook", Vchange_major_mode_hook,
6171 doc: /* Normal hook run before changing the major mode of a buffer. 6145 doc: /* Normal hook run before changing the major mode of a buffer.
6172The function `kill-all-local-variables' runs this before doing anything else. */); 6146The function `kill-all-local-variables' runs this before doing anything else. */);
6173 Vchange_major_mode_hook = Qnil; 6147 Vchange_major_mode_hook = Qnil;
@@ -6235,4 +6209,3 @@ keys_of_buffer (void)
6235 initialized when that function gets called. */ 6209 initialized when that function gets called. */
6236 Fput (intern_c_string ("erase-buffer"), Qdisabled, Qt); 6210 Fput (intern_c_string ("erase-buffer"), Qdisabled, Qt);
6237} 6211}
6238