Mercurial > emacs
comparison src/buffer.c @ 83550:17e0dd217877
Merged from emacs@sv.gnu.org.
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-536
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-537
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-538
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-539
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-540
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-541
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-542
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-543
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-544
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-545
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-546
Update from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-547
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-548
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-549
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-550
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-551
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-552
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-553
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-554
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-555
erc-iswitchb: Temporarily enable iswitchb mode
* emacs@sv.gnu.org/emacs--devo--0--patch-556
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-557
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-558
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-559
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-560
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-561
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-562
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-563
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-564
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-565
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-566
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-567
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-568
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-569
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-570
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-571
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-572
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-573
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-574
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-575
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-576
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-577
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-578
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-579
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-580
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-581
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-582
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-583
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-584
Fix admin/quick-install-emacs to work with recent versions of autoconf
* emacs@sv.gnu.org/gnus--rel--5.10--patch-171
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-172
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-173
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-174
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-175
Update from CVS: lisp/legacy-gnus-agent.el: Add Copyright notice.
* emacs@sv.gnu.org/gnus--rel--5.10--patch-176
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-177
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-178
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-179
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-180
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-181
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-182
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-183
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-184
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-185
Merge from emacs--devo--0
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-590
| author | Karoly Lorentey <lorentey@elte.hu> |
|---|---|
| date | Mon, 01 Jan 2007 17:38:32 +0000 |
| parents | c71725faff1a af518323048e |
| children | b8d9a391daf3 |
comparison
equal
deleted
inserted
replaced
| 83549:8d80de0a1ac6 | 83550:17e0dd217877 |
|---|---|
| 1342 The buffer being killed will be current while the hook is running.\n\ | 1342 The buffer being killed will be current while the hook is running.\n\ |
| 1343 See `kill-buffer'." | 1343 See `kill-buffer'." |
| 1344 */ | 1344 */ |
| 1345 DEFUN ("kill-buffer", Fkill_buffer, Skill_buffer, 1, 1, "bKill buffer: ", | 1345 DEFUN ("kill-buffer", Fkill_buffer, Skill_buffer, 1, 1, "bKill buffer: ", |
| 1346 doc: /* Kill the buffer BUFFER. | 1346 doc: /* Kill the buffer BUFFER. |
| 1347 The argument may be a buffer or may be the name of a buffer. | 1347 The argument may be a buffer or the name of a buffer. |
| 1348 An argument of nil means kill the current buffer. | 1348 With a nil argument, kill the current buffer. |
| 1349 | 1349 |
| 1350 Value is t if the buffer is actually killed, nil if user says no. | 1350 Value is t if the buffer is actually killed, nil otherwise. |
| 1351 | 1351 |
| 1352 The value of `kill-buffer-hook' (which may be local to that buffer), | 1352 The functions in `kill-buffer-query-functions' are called with BUFFER as |
| 1353 if not void, is a list of functions to be called, with no arguments, | 1353 the current buffer. If any of them returns nil, the buffer is not killed. |
| 1354 before the buffer is actually killed. The buffer to be killed is current | 1354 |
| 1355 when the hook functions are called. | 1355 The hook `kill-buffer-hook' is run before the buffer is actually killed. |
| 1356 The buffer being killed will be current while the hook is running. | |
| 1356 | 1357 |
| 1357 Any processes that have this buffer as the `process-buffer' are killed | 1358 Any processes that have this buffer as the `process-buffer' are killed |
| 1358 with SIGHUP. */) | 1359 with SIGHUP. */) |
| 1359 (buffer) | 1360 (buffer) |
| 1360 Lisp_Object buffer; | 1361 Lisp_Object buffer; |
| 5383 &buffer_defaults.left_margin, | 5384 &buffer_defaults.left_margin, |
| 5384 doc: /* Default value of `left-margin' for buffers that do not override it. | 5385 doc: /* Default value of `left-margin' for buffers that do not override it. |
| 5385 This is the same as (default-value 'left-margin). */); | 5386 This is the same as (default-value 'left-margin). */); |
| 5386 | 5387 |
| 5387 DEFVAR_LISP_NOPRO ("default-tab-width", | 5388 DEFVAR_LISP_NOPRO ("default-tab-width", |
| 5388 &buffer_defaults.tab_width, | 5389 &buffer_defaults.tab_width, |
| 5389 doc: /* Default value of `tab-width' for buffers that do not override it. | 5390 doc: /* Default value of `tab-width' for buffers that do not override it. |
| 5390 This is the same as (default-value 'tab-width). */); | 5391 This is the same as (default-value 'tab-width). */); |
| 5391 | 5392 |
| 5392 DEFVAR_LISP_NOPRO ("default-case-fold-search", | 5393 DEFVAR_LISP_NOPRO ("default-case-fold-search", |
| 5393 &buffer_defaults.case_fold_search, | 5394 &buffer_defaults.case_fold_search, |
| 5394 doc: /* Default value of `case-fold-search' for buffers that don't override it. | 5395 doc: /* Default value of `case-fold-search' for buffers that don't override it. |
| 5459 | 5460 |
| 5460 DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", | 5461 DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", |
| 5461 &buffer_defaults.scroll_up_aggressively, | 5462 &buffer_defaults.scroll_up_aggressively, |
| 5462 doc: /* Default value of `scroll-up-aggressively'. | 5463 doc: /* Default value of `scroll-up-aggressively'. |
| 5463 This value applies in buffers that don't have their own local values. | 5464 This value applies in buffers that don't have their own local values. |
| 5464 This variable is an alias for (default-value 'scroll-up-aggressively). */); | 5465 This is the same as (default-value 'scroll-up-aggressively). */); |
| 5465 | 5466 |
| 5466 DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively", | 5467 DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively", |
| 5467 &buffer_defaults.scroll_down_aggressively, | 5468 &buffer_defaults.scroll_down_aggressively, |
| 5468 doc: /* Default value of `scroll-down-aggressively'. | 5469 doc: /* Default value of `scroll-down-aggressively'. |
| 5469 This value applies in buffers that don't have their own local values. | 5470 This value applies in buffers that don't have their own local values. |
| 5470 This variable is an alias for (default-value 'scroll-down-aggressively). */); | 5471 This is the same as (default-value 'scroll-down-aggressively). */); |
| 5471 | 5472 |
| 5472 DEFVAR_PER_BUFFER ("header-line-format", | 5473 DEFVAR_PER_BUFFER ("header-line-format", |
| 5473 ¤t_buffer->header_line_format, | 5474 ¤t_buffer->header_line_format, |
| 5474 Qnil, | 5475 Qnil, |
| 5475 doc: /* Analogous to `mode-line-format', but controls the header line. | 5476 doc: /* Analogous to `mode-line-format', but controls the header line. |
| 5528 %% -- print %. %- -- print infinitely many dashes. | 5529 %% -- print %. %- -- print infinitely many dashes. |
| 5529 Decimal digits after the % specify field width to which to pad. */); | 5530 Decimal digits after the % specify field width to which to pad. */); |
| 5530 | 5531 |
| 5531 DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode, | 5532 DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode, |
| 5532 doc: /* *Major mode for new buffers. Defaults to `fundamental-mode'. | 5533 doc: /* *Major mode for new buffers. Defaults to `fundamental-mode'. |
| 5533 nil here means use current buffer's major mode, provided it is not | 5534 A value of nil means use current buffer's major mode, |
| 5534 marked as "special". | 5535 provided it is not marked as "special". |
| 5535 | 5536 |
| 5536 When a mode is used by default, `find-file' switches to it | 5537 When a mode is used by default, `find-file' switches to it |
| 5537 before it reads the contents into the buffer and before | 5538 before it reads the contents into the buffer and before |
| 5538 it finishes setting up the buffer. Thus, the mode and | 5539 it finishes setting up the buffer. Thus, the mode and |
| 5539 its hooks should not expect certain variables such as | 5540 its hooks should not expect certain variables such as |
| 5559 doc: /* *Column beyond which automatic line-wrapping should happen. | 5560 doc: /* *Column beyond which automatic line-wrapping should happen. |
| 5560 Interactively, you can set the buffer local value using \\[set-fill-column]. */); | 5561 Interactively, you can set the buffer local value using \\[set-fill-column]. */); |
| 5561 | 5562 |
| 5562 DEFVAR_PER_BUFFER ("left-margin", ¤t_buffer->left_margin, | 5563 DEFVAR_PER_BUFFER ("left-margin", ¤t_buffer->left_margin, |
| 5563 make_number (Lisp_Int), | 5564 make_number (Lisp_Int), |
| 5564 doc: /* *Column for the default indent-line-function to indent to. | 5565 doc: /* *Column for the default `indent-line-function' to indent to. |
| 5565 Linefeed indents to this column in Fundamental mode. */); | 5566 Linefeed indents to this column in Fundamental mode. */); |
| 5566 | 5567 |
| 5567 DEFVAR_PER_BUFFER ("tab-width", ¤t_buffer->tab_width, | 5568 DEFVAR_PER_BUFFER ("tab-width", ¤t_buffer->tab_width, |
| 5568 make_number (Lisp_Int), | 5569 make_number (Lisp_Int), |
| 5569 doc: /* *Distance between tab stops (for display of tab characters), in columns. */); | 5570 doc: /* *Distance between tab stops (for display of tab characters), in columns. */); |
| 5706 primitives `aref' and `aset' can be used to access elements of a char-table. | 5707 primitives `aref' and `aset' can be used to access elements of a char-table. |
| 5707 | 5708 |
| 5708 Each of the char-table elements control how to display the corresponding | 5709 Each of the char-table elements control how to display the corresponding |
| 5709 text character: the element at index C in the table says how to display | 5710 text character: the element at index C in the table says how to display |
| 5710 the character whose code is C. Each element should be a vector of | 5711 the character whose code is C. Each element should be a vector of |
| 5711 characters or nil. nil means display the character in the default fashion; | 5712 characters or nil. The value nil means display the character in the |
| 5712 otherwise, the characters from the vector are delivered to the screen | 5713 default fashion; otherwise, the characters from the vector are delivered |
| 5713 instead of the original character. | 5714 to the screen instead of the original character. |
| 5714 | 5715 |
| 5715 For example, (aset buffer-display-table ?X ?Y) will cause Emacs to display | 5716 For example, (aset buffer-display-table ?X ?Y) will cause Emacs to display |
| 5716 a capital Y instead of each X character. | 5717 a capital Y instead of each X character. |
| 5717 | 5718 |
| 5718 In addition, a char-table has six extra slots to control the display of: | 5719 In addition, a char-table has six extra slots to control the display of: |
| 5839 | 5840 |
| 5840 DEFVAR_PER_BUFFER ("scroll-up-aggressively", | 5841 DEFVAR_PER_BUFFER ("scroll-up-aggressively", |
| 5841 ¤t_buffer->scroll_up_aggressively, Qnil, | 5842 ¤t_buffer->scroll_up_aggressively, Qnil, |
| 5842 doc: /* How far to scroll windows upward. | 5843 doc: /* How far to scroll windows upward. |
| 5843 If you move point off the bottom, the window scrolls automatically. | 5844 If you move point off the bottom, the window scrolls automatically. |
| 5844 This variable controls how far it scrolls. nil, the default, | 5845 This variable controls how far it scrolls. The value nil, the default, |
| 5845 means scroll to center point. A fraction means scroll to put point | 5846 means scroll to center point. A fraction means scroll to put point |
| 5846 that fraction of the window's height from the bottom of the window. | 5847 that fraction of the window's height from the bottom of the window. |
| 5847 When the value is 0.0, point goes at the bottom line, which in the simple | 5848 When the value is 0.0, point goes at the bottom line, which in the simple |
| 5848 case that you moved off with C-f means scrolling just one line. 1.0 means | 5849 case that you moved off with C-f means scrolling just one line. 1.0 means |
| 5849 point goes at the top, so that in that simple case, the window | 5850 point goes at the top, so that in that simple case, the window |
| 5852 | 5853 |
| 5853 DEFVAR_PER_BUFFER ("scroll-down-aggressively", | 5854 DEFVAR_PER_BUFFER ("scroll-down-aggressively", |
| 5854 ¤t_buffer->scroll_down_aggressively, Qnil, | 5855 ¤t_buffer->scroll_down_aggressively, Qnil, |
| 5855 doc: /* How far to scroll windows downward. | 5856 doc: /* How far to scroll windows downward. |
| 5856 If you move point off the top, the window scrolls automatically. | 5857 If you move point off the top, the window scrolls automatically. |
| 5857 This variable controls how far it scrolls. nil, the default, | 5858 This variable controls how far it scrolls. The value nil, the default, |
| 5858 means scroll to center point. A fraction means scroll to put point | 5859 means scroll to center point. A fraction means scroll to put point |
| 5859 that fraction of the window's height from the top of the window. | 5860 that fraction of the window's height from the top of the window. |
| 5860 When the value is 0.0, point goes at the top line, which in the simple | 5861 When the value is 0.0, point goes at the top line, which in the simple |
| 5861 case that you moved off with C-b means scrolling just one line. 1.0 means | 5862 case that you moved off with C-b means scrolling just one line. 1.0 means |
| 5862 point goes at the bottom, so that in that simple case, the window | 5863 point goes at the bottom, so that in that simple case, the window |
| 6043 and disregard a `read-only' text property if the property value | 6044 and disregard a `read-only' text property if the property value |
| 6044 is a member of the list. */); | 6045 is a member of the list. */); |
| 6045 Vinhibit_read_only = Qnil; | 6046 Vinhibit_read_only = Qnil; |
| 6046 | 6047 |
| 6047 DEFVAR_PER_BUFFER ("cursor-type", ¤t_buffer->cursor_type, Qnil, | 6048 DEFVAR_PER_BUFFER ("cursor-type", ¤t_buffer->cursor_type, Qnil, |
| 6048 doc: /* Cursor to use when this buffer is in the selected window. | 6049 doc: /* Cursor to use when this buffer is in the selected window. |
| 6049 Values are interpreted as follows: | 6050 Values are interpreted as follows: |
| 6050 | 6051 |
| 6051 t use the cursor specified for the frame | 6052 t use the cursor specified for the frame |
| 6052 nil don't display a cursor | 6053 nil don't display a cursor |
| 6053 box display a filled box cursor | 6054 box display a filled box cursor |
| 6064 DEFVAR_PER_BUFFER ("line-spacing", | 6065 DEFVAR_PER_BUFFER ("line-spacing", |
| 6065 ¤t_buffer->extra_line_spacing, Qnil, | 6066 ¤t_buffer->extra_line_spacing, Qnil, |
| 6066 doc: /* Additional space to put between lines when displaying a buffer. | 6067 doc: /* Additional space to put between lines when displaying a buffer. |
| 6067 The space is measured in pixels, and put below lines on window systems. | 6068 The space is measured in pixels, and put below lines on window systems. |
| 6068 If value is a floating point number, it specifies the spacing relative | 6069 If value is a floating point number, it specifies the spacing relative |
| 6069 to the default frame line height. nil means add no extra space. */); | 6070 to the default frame line height. A value of nil means add no extra space. */); |
| 6070 | 6071 |
| 6071 DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", | 6072 DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", |
| 6072 ¤t_buffer->cursor_in_non_selected_windows, Qnil, | 6073 ¤t_buffer->cursor_in_non_selected_windows, Qnil, |
| 6073 doc: /* *Cursor type to display in non-selected windows. | 6074 doc: /* *Cursor type to display in non-selected windows. |
| 6074 t means to use hollow box cursor. See `cursor-type' for other values. */); | 6075 The value t means to use hollow box cursor. See `cursor-type' for other values. */); |
| 6075 | 6076 |
| 6076 DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, | 6077 DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, |
| 6077 doc: /* List of functions called with no args to query before killing a buffer. */); | 6078 doc: /* List of functions called with no args to query before killing a buffer. |
| 6079 The buffer being killed will be current while the functions are running. | |
| 6080 If any of them returns nil, the buffer is not killed. */); | |
| 6078 Vkill_buffer_query_functions = Qnil; | 6081 Vkill_buffer_query_functions = Qnil; |
| 6079 | 6082 |
| 6080 DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook, | 6083 DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook, |
| 6081 doc: /* Normal hook run before changing the major mode of a buffer. | 6084 doc: /* Normal hook run before changing the major mode of a buffer. |
| 6082 The function `kill-all-local-variables' runs this before doing anything else. */); | 6085 The function `kill-all-local-variables' runs this before doing anything else. */); |
