diff options
| author | Joakim Verona | 2011-02-05 11:23:09 +0100 |
|---|---|---|
| committer | Joakim Verona | 2011-02-05 11:23:09 +0100 |
| commit | 4bd51ad5c3445b644dfb017d5b57b10a90aa325f (patch) | |
| tree | 894801e7308ce4ecc34933f959e28f4b9cff9533 /src/buffer.c | |
| parent | 13cfe8df462ab8da9f0028e16cc84dcaceaca3d1 (diff) | |
| parent | 9bcaafce5351d270ac514e23cb69ff1a5fd35229 (diff) | |
| download | emacs-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.c | 260 |
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, | 3 | Copyright (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 | ||
| 7 | This file is part of GNU Emacs. | 5 | This 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 | ||
| 106 | int last_per_buffer_idx; | 101 | int last_per_buffer_idx; |
| 107 | 102 | ||
| 108 | EXFUN (Fset_buffer, 1); | ||
| 109 | static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, | 103 | static 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. */ |
| 118 | Lisp_Object Vbuffer_alist; | 112 | Lisp_Object Vbuffer_alist; |
| 119 | 113 | ||
| 120 | /* Functions to call before and after each text change. */ | ||
| 121 | Lisp_Object Vbefore_change_functions; | ||
| 122 | Lisp_Object Vafter_change_functions; | ||
| 123 | |||
| 124 | Lisp_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. */ | ||
| 129 | Lisp_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. */ | ||
| 133 | Lisp_Object Vkill_buffer_query_functions; | ||
| 134 | Lisp_Object Qkill_buffer_query_functions; | 114 | Lisp_Object Qkill_buffer_query_functions; |
| 135 | 115 | ||
| 136 | /* Hook run before changing a major mode. */ | 116 | /* Hook run before changing a major mode. */ |
| 137 | Lisp_Object Vchange_major_mode_hook, Qchange_major_mode_hook; | 117 | Lisp_Object Qchange_major_mode_hook; |
| 138 | |||
| 139 | /* List of functions to call before changing an unmodified buffer. */ | ||
| 140 | Lisp_Object Vfirst_change_hook; | ||
| 141 | 118 | ||
| 142 | Lisp_Object Qfirst_change_hook; | 119 | Lisp_Object Qfirst_change_hook; |
| 143 | Lisp_Object Qbefore_change_functions; | 120 | Lisp_Object Qbefore_change_functions; |
| 144 | Lisp_Object Qafter_change_functions; | 121 | Lisp_Object Qafter_change_functions; |
| 145 | Lisp_Object Qucs_set_table_for_input; | 122 | Lisp_Object Qucs_set_table_for_input; |
| 146 | 123 | ||
| 147 | /* If nonzero, all modification hooks are suppressed. */ | ||
| 148 | int inhibit_modification_hooks; | ||
| 149 | |||
| 150 | Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; | 124 | Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; |
| 151 | Lisp_Object Qpermanent_local_hook; | 125 | Lisp_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 | ||
| 3780 | Lisp_Object Fdelete_overlay (Lisp_Object overlay); | ||
| 3781 | |||
| 3782 | static struct Lisp_Overlay * | 3754 | static struct Lisp_Overlay * |
| 3783 | unchain_overlay (struct Lisp_Overlay *list, struct Lisp_Overlay *overlay) | 3755 | unchain_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. |
| 5374 | This is the same as (default-value 'mode-line-format). */); | 5346 | This 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. |
| 5379 | This is the same as (default-value 'header-line-format). */); | 5351 | This 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. |
| 5383 | This is the same as (default-value 'cursor-type). */); | 5355 | This 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. |
| 5388 | This is the same as (default-value 'line-spacing). */); | 5360 | This 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'. |
| 5393 | This is the same as (default-value 'cursor-in-non-selected-windows). */); | 5365 | This 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. |
| 5398 | This is the same as (default-value 'abbrev-mode). */); | 5370 | This 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. |
| 5403 | This is the same as (default-value 'ctl-arrow). */); | 5375 | This 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. |
| 5408 | This is the same as (default-value 'enable-multibyte-characters). */); | 5380 | This 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. |
| 5413 | This is the same as (default-value 'buffer-file-coding-system). */); | 5385 | This 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. |
| 5418 | This is the same as (default-value 'truncate-lines). */); | 5390 | This 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. |
| 5423 | This is the same as (default-value 'fill-column). */); | 5395 | This 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. |
| 5428 | This is the same as (default-value 'left-margin). */); | 5400 | This 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. |
| 5433 | This is the same as (default-value 'tab-width). */); | 5405 | This 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. |
| 5438 | This is the same as (default-value 'case-fold-search). */); | 5410 | This 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. |
| 5444 | This is the same as (default-value 'buffer-file-type). | 5416 | This is the same as (default-value 'buffer-file-type). |
| 5445 | The file type is nil for text, t for binary. */); | 5417 | The 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. |
| 5451 | This is the same as (default-value 'left-margin-width). */); | 5423 | This 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. |
| 5456 | This is the same as (default-value 'right-margin-width). */); | 5428 | This 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. |
| 5461 | This is the same as (default-value 'left-fringe-width). */); | 5433 | This 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. |
| 5466 | This is the same as (default-value 'right-fringe-width). */); | 5438 | This 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. |
| 5471 | This is the same as (default-value 'fringes-outside-margins). */); | 5443 | This 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. |
| 5476 | This is the same as (default-value 'scroll-bar-width). */); | 5448 | This 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. |
| 5481 | This is the same as (default-value 'vertical-scroll-bar). */); | 5453 | This 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. |
| 5486 | This is the same as (default-value 'indicate-empty-lines). */); | 5458 | This 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. |
| 5491 | This is the same as (default-value 'indicate-buffer-boundaries). */); | 5463 | This 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. |
| 5496 | This is the same as (default-value 'fringe-indicator-alist'). */); | 5468 | This 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. |
| 5501 | This is the same as (default-value 'fringe-cursor-alist'). */); | 5473 | This 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'. |
| 5506 | This value applies in buffers that don't have their own local values. | 5478 | This value applies in buffers that don't have their own local values. |
| 5507 | This is the same as (default-value 'scroll-up-aggressively). */); | 5479 | This 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'. |
| 5512 | This value applies in buffers that don't have their own local values. | 5484 | This value applies in buffers that don't have their own local values. |
| 5513 | This is the same as (default-value 'scroll-down-aggressively). */); | 5485 | This 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. |
| 5574 | Decimal digits after the % specify field width to which to pad. */); | 5546 | Decimal 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", ¤t_buffer->major_mode, | 5551 | DEFVAR_PER_BUFFER ("major-mode", ¤t_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", ¤t_buffer->abbrev_mode, Qnil, | 5574 | DEFVAR_PER_BUFFER ("abbrev-mode", ¤t_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. |
| 5576 | Use the command `abbrev-mode' to change this variable. */); | ||
| 5604 | 5577 | ||
| 5605 | DEFVAR_PER_BUFFER ("case-fold-search", ¤t_buffer->case_fold_search, | 5578 | DEFVAR_PER_BUFFER ("case-fold-search", ¤t_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. |
| 5953 | Two arguments are passed to each function: the positions of | 5926 | Two arguments are passed to each function: the positions of |
| 5954 | the beginning and end of the range of old text to be changed. | 5927 | the 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 | |||
| 5964 | from happening repeatedly and making Emacs nonfunctional. */); | 5937 | from 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. |
| 5969 | Three arguments are passed to each function: the positions of | 5942 | Three arguments are passed to each function: the positions of |
| 5970 | the beginning and end of the range of changed text, | 5943 | the beginning and end of the range of changed text, |
| @@ -5982,7 +5955,7 @@ the variable's value remains nil. That prevents the error | |||
| 5982 | from happening repeatedly and making Emacs nonfunctional. */); | 5955 | from 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. |
| 5987 | The functions are run using the `run-hooks' function. */); | 5960 | The 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 | |||
| 6097 | to the value obtained by calling `current-time'. | 6070 | to the value obtained by calling `current-time'. |
| 6098 | If the buffer has never been shown in a window, the value is nil. */); | 6071 | If 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. |
| 6075 | See the command `transient-mark-mode' for a description of this minor mode. | ||
| 6076 | |||
| 6077 | Non-nil also enables highlighting of the region whenever the mark is active. | ||
| 6078 | The variable `highlight-nonselected-windows' controls whether to highlight | ||
| 6079 | all windows or just the selected window. | ||
| 6080 | |||
| 6081 | Lisp 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. |
| 6109 | If the value is t, disregard `buffer-read-only' and all `read-only' | 6096 | If the value is t, disregard `buffer-read-only' and all `read-only' |
| 6110 | text properties. If the value is a list, disregard `buffer-read-only' | 6097 | text 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 | ¤t_buffer->cursor_in_non_selected_windows, Qnil, | 6129 | ¤t_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. |
| 6144 | The value t means to use hollow box cursor. See `cursor-type' for other values. */); | 6131 | If nil, only shows a cursor in the selected window. |
| 6145 | 6132 | If 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). |
| 6134 | You can also specify the cursor type as in the `cursor-type' variable. | ||
| 6135 | Use 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. |
| 6148 | The buffer being killed will be current while the functions are running. | 6139 | The buffer being killed will be current while the functions are running. |
| 6149 | If any of them returns nil, the buffer is not killed. */); | 6140 | If 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. |
| 6154 | The function `kill-all-local-variables' runs this before doing anything else. */); | 6145 | The 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) */ | ||