diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 680 |
1 files changed, 343 insertions, 337 deletions
diff --git a/src/buffer.c b/src/buffer.c index 05cc12eea6f..fc2dd3a4691 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -162,7 +162,7 @@ DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, | |||
| 162 | Value is nil if OBJECT is not a buffer or if it has been killed. */) | 162 | Value is nil if OBJECT is not a buffer or if it has been killed. */) |
| 163 | (Lisp_Object object) | 163 | (Lisp_Object object) |
| 164 | { | 164 | { |
| 165 | return ((BUFFERP (object) && ! NILP (XBUFFER (object)->name)) | 165 | return ((BUFFERP (object) && ! NILP (B_ (XBUFFER (object), name))) |
| 166 | ? Qt : Qnil); | 166 | ? Qt : Qnil); |
| 167 | } | 167 | } |
| 168 | 168 | ||
| @@ -266,8 +266,8 @@ See also `find-buffer-visiting'. */) | |||
| 266 | { | 266 | { |
| 267 | buf = Fcdr (XCAR (tail)); | 267 | buf = Fcdr (XCAR (tail)); |
| 268 | if (!BUFFERP (buf)) continue; | 268 | if (!BUFFERP (buf)) continue; |
| 269 | if (!STRINGP (XBUFFER (buf)->filename)) continue; | 269 | if (!STRINGP (B_ (XBUFFER (buf), filename))) continue; |
| 270 | tem = Fstring_equal (XBUFFER (buf)->filename, filename); | 270 | tem = Fstring_equal (B_ (XBUFFER (buf), filename), filename); |
| 271 | if (!NILP (tem)) | 271 | if (!NILP (tem)) |
| 272 | return buf; | 272 | return buf; |
| 273 | } | 273 | } |
| @@ -283,8 +283,8 @@ get_truename_buffer (register Lisp_Object filename) | |||
| 283 | { | 283 | { |
| 284 | buf = Fcdr (XCAR (tail)); | 284 | buf = Fcdr (XCAR (tail)); |
| 285 | if (!BUFFERP (buf)) continue; | 285 | if (!BUFFERP (buf)) continue; |
| 286 | if (!STRINGP (XBUFFER (buf)->file_truename)) continue; | 286 | if (!STRINGP (B_ (XBUFFER (buf), file_truename))) continue; |
| 287 | tem = Fstring_equal (XBUFFER (buf)->file_truename, filename); | 287 | tem = Fstring_equal (B_ (XBUFFER (buf), file_truename), filename); |
| 288 | if (!NILP (tem)) | 288 | if (!NILP (tem)) |
| 289 | return buf; | 289 | return buf; |
| 290 | } | 290 | } |
| @@ -353,7 +353,7 @@ even if it is dead. The return value is never nil. */) | |||
| 353 | 353 | ||
| 354 | b->newline_cache = 0; | 354 | b->newline_cache = 0; |
| 355 | b->width_run_cache = 0; | 355 | b->width_run_cache = 0; |
| 356 | b->width_table = Qnil; | 356 | B_ (b, width_table) = Qnil; |
| 357 | b->prevent_redisplay_optimizations_p = 1; | 357 | b->prevent_redisplay_optimizations_p = 1; |
| 358 | 358 | ||
| 359 | /* Put this on the chain of all buffers including killed ones. */ | 359 | /* Put this on the chain of all buffers including killed ones. */ |
| @@ -362,22 +362,22 @@ even if it is dead. The return value is never nil. */) | |||
| 362 | 362 | ||
| 363 | /* An ordinary buffer normally doesn't need markers | 363 | /* An ordinary buffer normally doesn't need markers |
| 364 | to handle BEGV and ZV. */ | 364 | to handle BEGV and ZV. */ |
| 365 | b->pt_marker = Qnil; | 365 | B_ (b, pt_marker) = Qnil; |
| 366 | b->begv_marker = Qnil; | 366 | B_ (b, begv_marker) = Qnil; |
| 367 | b->zv_marker = Qnil; | 367 | B_ (b, zv_marker) = Qnil; |
| 368 | 368 | ||
| 369 | name = Fcopy_sequence (buffer_or_name); | 369 | name = Fcopy_sequence (buffer_or_name); |
| 370 | STRING_SET_INTERVALS (name, NULL_INTERVAL); | 370 | STRING_SET_INTERVALS (name, NULL_INTERVAL); |
| 371 | b->name = name; | 371 | B_ (b, name) = name; |
| 372 | 372 | ||
| 373 | b->undo_list = (SREF (name, 0) != ' ') ? Qnil : Qt; | 373 | B_ (b, undo_list) = (SREF (name, 0) != ' ') ? Qnil : Qt; |
| 374 | 374 | ||
| 375 | reset_buffer (b); | 375 | reset_buffer (b); |
| 376 | reset_buffer_local_variables (b, 1); | 376 | reset_buffer_local_variables (b, 1); |
| 377 | 377 | ||
| 378 | b->mark = Fmake_marker (); | 378 | B_ (b, mark) = Fmake_marker (); |
| 379 | BUF_MARKERS (b) = NULL; | 379 | BUF_MARKERS (b) = NULL; |
| 380 | b->name = name; | 380 | B_ (b, name) = name; |
| 381 | 381 | ||
| 382 | /* Put this in the alist of all live buffers. */ | 382 | /* Put this in the alist of all live buffers. */ |
| 383 | XSETBUFFER (buffer, b); | 383 | XSETBUFFER (buffer, b); |
| @@ -486,7 +486,7 @@ clone_per_buffer_values (struct buffer *from, struct buffer *to) | |||
| 486 | 486 | ||
| 487 | /* Get (a copy of) the alist of Lisp-level local variables of FROM | 487 | /* Get (a copy of) the alist of Lisp-level local variables of FROM |
| 488 | and install that in TO. */ | 488 | and install that in TO. */ |
| 489 | to->local_var_alist = buffer_lisp_local_variables (from); | 489 | B_ (to, local_var_alist) = buffer_lisp_local_variables (from); |
| 490 | } | 490 | } |
| 491 | 491 | ||
| 492 | DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, | 492 | DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, |
| @@ -512,7 +512,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) | |||
| 512 | base_buffer = Fget_buffer (base_buffer); | 512 | base_buffer = Fget_buffer (base_buffer); |
| 513 | if (NILP (base_buffer)) | 513 | if (NILP (base_buffer)) |
| 514 | error ("No such buffer: `%s'", SDATA (tem)); | 514 | error ("No such buffer: `%s'", SDATA (tem)); |
| 515 | if (NILP (XBUFFER (base_buffer)->name)) | 515 | if (NILP (B_ (XBUFFER (base_buffer), name))) |
| 516 | error ("Base buffer has been killed"); | 516 | error ("Base buffer has been killed"); |
| 517 | 517 | ||
| 518 | if (SCHARS (name) == 0) | 518 | if (SCHARS (name) == 0) |
| @@ -536,7 +536,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) | |||
| 536 | 536 | ||
| 537 | b->newline_cache = 0; | 537 | b->newline_cache = 0; |
| 538 | b->width_run_cache = 0; | 538 | b->width_run_cache = 0; |
| 539 | b->width_table = Qnil; | 539 | B_ (b, width_table) = Qnil; |
| 540 | 540 | ||
| 541 | /* Put this on the chain of all buffers including killed ones. */ | 541 | /* Put this on the chain of all buffers including killed ones. */ |
| 542 | b->next = all_buffers; | 542 | b->next = all_buffers; |
| @@ -544,7 +544,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) | |||
| 544 | 544 | ||
| 545 | name = Fcopy_sequence (name); | 545 | name = Fcopy_sequence (name); |
| 546 | STRING_SET_INTERVALS (name, NULL_INTERVAL); | 546 | STRING_SET_INTERVALS (name, NULL_INTERVAL); |
| 547 | b->name = name; | 547 | B_ (b, name) = name; |
| 548 | 548 | ||
| 549 | reset_buffer (b); | 549 | reset_buffer (b); |
| 550 | reset_buffer_local_variables (b, 1); | 550 | reset_buffer_local_variables (b, 1); |
| @@ -553,57 +553,57 @@ CLONE nil means the indirect buffer's state is reset to default values. */) | |||
| 553 | XSETBUFFER (buf, b); | 553 | XSETBUFFER (buf, b); |
| 554 | Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil)); | 554 | Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil)); |
| 555 | 555 | ||
| 556 | b->mark = Fmake_marker (); | 556 | B_ (b, mark) = Fmake_marker (); |
| 557 | b->name = name; | 557 | B_ (b, name) = name; |
| 558 | 558 | ||
| 559 | /* The multibyte status belongs to the base buffer. */ | 559 | /* The multibyte status belongs to the base buffer. */ |
| 560 | b->enable_multibyte_characters = b->base_buffer->enable_multibyte_characters; | 560 | B_ (b, enable_multibyte_characters) = B_ (b->base_buffer, enable_multibyte_characters); |
| 561 | 561 | ||
| 562 | /* Make sure the base buffer has markers for its narrowing. */ | 562 | /* Make sure the base buffer has markers for its narrowing. */ |
| 563 | if (NILP (b->base_buffer->pt_marker)) | 563 | if (NILP (B_ (b->base_buffer, pt_marker))) |
| 564 | { | 564 | { |
| 565 | b->base_buffer->pt_marker = Fmake_marker (); | 565 | B_ (b->base_buffer, pt_marker) = Fmake_marker (); |
| 566 | set_marker_both (b->base_buffer->pt_marker, base_buffer, | 566 | set_marker_both (B_ (b->base_buffer, pt_marker), base_buffer, |
| 567 | BUF_PT (b->base_buffer), | 567 | BUF_PT (b->base_buffer), |
| 568 | BUF_PT_BYTE (b->base_buffer)); | 568 | BUF_PT_BYTE (b->base_buffer)); |
| 569 | } | 569 | } |
| 570 | if (NILP (b->base_buffer->begv_marker)) | 570 | if (NILP (B_ (b->base_buffer, begv_marker))) |
| 571 | { | 571 | { |
| 572 | b->base_buffer->begv_marker = Fmake_marker (); | 572 | B_ (b->base_buffer, begv_marker) = Fmake_marker (); |
| 573 | set_marker_both (b->base_buffer->begv_marker, base_buffer, | 573 | set_marker_both (B_ (b->base_buffer, begv_marker), base_buffer, |
| 574 | BUF_BEGV (b->base_buffer), | 574 | BUF_BEGV (b->base_buffer), |
| 575 | BUF_BEGV_BYTE (b->base_buffer)); | 575 | BUF_BEGV_BYTE (b->base_buffer)); |
| 576 | } | 576 | } |
| 577 | if (NILP (b->base_buffer->zv_marker)) | 577 | if (NILP (B_ (b->base_buffer, zv_marker))) |
| 578 | { | 578 | { |
| 579 | b->base_buffer->zv_marker = Fmake_marker (); | 579 | B_ (b->base_buffer, zv_marker) = Fmake_marker (); |
| 580 | set_marker_both (b->base_buffer->zv_marker, base_buffer, | 580 | set_marker_both (B_ (b->base_buffer, zv_marker), base_buffer, |
| 581 | BUF_ZV (b->base_buffer), | 581 | BUF_ZV (b->base_buffer), |
| 582 | BUF_ZV_BYTE (b->base_buffer)); | 582 | BUF_ZV_BYTE (b->base_buffer)); |
| 583 | XMARKER (b->base_buffer->zv_marker)->insertion_type = 1; | 583 | XMARKER (B_ (b->base_buffer, zv_marker))->insertion_type = 1; |
| 584 | } | 584 | } |
| 585 | 585 | ||
| 586 | if (NILP (clone)) | 586 | if (NILP (clone)) |
| 587 | { | 587 | { |
| 588 | /* Give the indirect buffer markers for its narrowing. */ | 588 | /* Give the indirect buffer markers for its narrowing. */ |
| 589 | b->pt_marker = Fmake_marker (); | 589 | B_ (b, pt_marker) = Fmake_marker (); |
| 590 | set_marker_both (b->pt_marker, buf, BUF_PT (b), BUF_PT_BYTE (b)); | 590 | set_marker_both (B_ (b, pt_marker), buf, BUF_PT (b), BUF_PT_BYTE (b)); |
| 591 | b->begv_marker = Fmake_marker (); | 591 | B_ (b, begv_marker) = Fmake_marker (); |
| 592 | set_marker_both (b->begv_marker, buf, BUF_BEGV (b), BUF_BEGV_BYTE (b)); | 592 | set_marker_both (B_ (b, begv_marker), buf, BUF_BEGV (b), BUF_BEGV_BYTE (b)); |
| 593 | b->zv_marker = Fmake_marker (); | 593 | B_ (b, zv_marker) = Fmake_marker (); |
| 594 | set_marker_both (b->zv_marker, buf, BUF_ZV (b), BUF_ZV_BYTE (b)); | 594 | set_marker_both (B_ (b, zv_marker), buf, BUF_ZV (b), BUF_ZV_BYTE (b)); |
| 595 | XMARKER (b->zv_marker)->insertion_type = 1; | 595 | XMARKER (B_ (b, zv_marker))->insertion_type = 1; |
| 596 | } | 596 | } |
| 597 | else | 597 | else |
| 598 | { | 598 | { |
| 599 | struct buffer *old_b = current_buffer; | 599 | struct buffer *old_b = current_buffer; |
| 600 | 600 | ||
| 601 | clone_per_buffer_values (b->base_buffer, b); | 601 | clone_per_buffer_values (b->base_buffer, b); |
| 602 | b->filename = Qnil; | 602 | B_ (b, filename) = Qnil; |
| 603 | b->file_truename = Qnil; | 603 | B_ (b, file_truename) = Qnil; |
| 604 | b->display_count = make_number (0); | 604 | B_ (b, display_count) = make_number (0); |
| 605 | b->backed_up = Qnil; | 605 | B_ (b, backed_up) = Qnil; |
| 606 | b->auto_save_file_name = Qnil; | 606 | B_ (b, auto_save_file_name) = Qnil; |
| 607 | set_buffer_internal_1 (b); | 607 | set_buffer_internal_1 (b); |
| 608 | Fset (intern ("buffer-save-without-query"), Qnil); | 608 | Fset (intern ("buffer-save-without-query"), Qnil); |
| 609 | Fset (intern ("buffer-file-number"), Qnil); | 609 | Fset (intern ("buffer-file-number"), Qnil); |
| @@ -647,34 +647,34 @@ delete_all_overlays (struct buffer *b) | |||
| 647 | void | 647 | void |
| 648 | reset_buffer (register struct buffer *b) | 648 | reset_buffer (register struct buffer *b) |
| 649 | { | 649 | { |
| 650 | b->filename = Qnil; | 650 | B_ (b, filename) = Qnil; |
| 651 | b->file_truename = Qnil; | 651 | B_ (b, file_truename) = Qnil; |
| 652 | b->directory = (current_buffer) ? current_buffer->directory : Qnil; | 652 | B_ (b, directory) = (current_buffer) ? B_ (current_buffer, directory) : Qnil; |
| 653 | b->modtime = 0; | 653 | b->modtime = 0; |
| 654 | b->modtime_size = -1; | 654 | b->modtime_size = -1; |
| 655 | XSETFASTINT (b->save_length, 0); | 655 | XSETFASTINT (B_ (b, save_length), 0); |
| 656 | b->last_window_start = 1; | 656 | b->last_window_start = 1; |
| 657 | /* It is more conservative to start out "changed" than "unchanged". */ | 657 | /* It is more conservative to start out "changed" than "unchanged". */ |
| 658 | b->clip_changed = 0; | 658 | b->clip_changed = 0; |
| 659 | b->prevent_redisplay_optimizations_p = 1; | 659 | b->prevent_redisplay_optimizations_p = 1; |
| 660 | b->backed_up = Qnil; | 660 | B_ (b, backed_up) = Qnil; |
| 661 | BUF_AUTOSAVE_MODIFF (b) = 0; | 661 | BUF_AUTOSAVE_MODIFF (b) = 0; |
| 662 | b->auto_save_failure_time = -1; | 662 | b->auto_save_failure_time = -1; |
| 663 | b->auto_save_file_name = Qnil; | 663 | B_ (b, auto_save_file_name) = Qnil; |
| 664 | b->read_only = Qnil; | 664 | B_ (b, read_only) = Qnil; |
| 665 | b->overlays_before = NULL; | 665 | b->overlays_before = NULL; |
| 666 | b->overlays_after = NULL; | 666 | b->overlays_after = NULL; |
| 667 | b->overlay_center = BEG; | 667 | b->overlay_center = BEG; |
| 668 | b->mark_active = Qnil; | 668 | B_ (b, mark_active) = Qnil; |
| 669 | b->point_before_scroll = Qnil; | 669 | B_ (b, point_before_scroll) = Qnil; |
| 670 | b->file_format = Qnil; | 670 | B_ (b, file_format) = Qnil; |
| 671 | b->auto_save_file_format = Qt; | 671 | B_ (b, auto_save_file_format) = Qt; |
| 672 | b->last_selected_window = Qnil; | 672 | B_ (b, last_selected_window) = Qnil; |
| 673 | XSETINT (b->display_count, 0); | 673 | XSETINT (B_ (b, display_count), 0); |
| 674 | b->display_time = Qnil; | 674 | B_ (b, display_time) = Qnil; |
| 675 | b->enable_multibyte_characters = buffer_defaults.enable_multibyte_characters; | 675 | B_ (b, enable_multibyte_characters) = B_ (&buffer_defaults, enable_multibyte_characters); |
| 676 | b->cursor_type = buffer_defaults.cursor_type; | 676 | B_ (b, cursor_type) = B_ (&buffer_defaults, cursor_type); |
| 677 | b->extra_line_spacing = buffer_defaults.extra_line_spacing; | 677 | B_ (b, extra_line_spacing) = B_ (&buffer_defaults, extra_line_spacing); |
| 678 | 678 | ||
| 679 | b->display_error_modiff = 0; | 679 | b->display_error_modiff = 0; |
| 680 | } | 680 | } |
| @@ -698,10 +698,10 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too) | |||
| 698 | things that depend on the major mode. | 698 | things that depend on the major mode. |
| 699 | default-major-mode is handled at a higher level. | 699 | default-major-mode is handled at a higher level. |
| 700 | We ignore it here. */ | 700 | We ignore it here. */ |
| 701 | b->major_mode = Qfundamental_mode; | 701 | B_ (b, major_mode) = Qfundamental_mode; |
| 702 | b->keymap = Qnil; | 702 | B_ (b, keymap) = Qnil; |
| 703 | b->mode_name = QSFundamental; | 703 | B_ (b, mode_name) = QSFundamental; |
| 704 | b->minor_modes = Qnil; | 704 | B_ (b, minor_modes) = Qnil; |
| 705 | 705 | ||
| 706 | /* If the standard case table has been altered and invalidated, | 706 | /* If the standard case table has been altered and invalidated, |
| 707 | fix up its insides first. */ | 707 | fix up its insides first. */ |
| @@ -710,22 +710,22 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too) | |||
| 710 | && CHAR_TABLE_P (XCHAR_TABLE (Vascii_downcase_table)->extras[2]))) | 710 | && CHAR_TABLE_P (XCHAR_TABLE (Vascii_downcase_table)->extras[2]))) |
| 711 | Fset_standard_case_table (Vascii_downcase_table); | 711 | Fset_standard_case_table (Vascii_downcase_table); |
| 712 | 712 | ||
| 713 | b->downcase_table = Vascii_downcase_table; | 713 | B_ (b, downcase_table) = Vascii_downcase_table; |
| 714 | b->upcase_table = XCHAR_TABLE (Vascii_downcase_table)->extras[0]; | 714 | B_ (b, upcase_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[0]; |
| 715 | b->case_canon_table = XCHAR_TABLE (Vascii_downcase_table)->extras[1]; | 715 | B_ (b, case_canon_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[1]; |
| 716 | b->case_eqv_table = XCHAR_TABLE (Vascii_downcase_table)->extras[2]; | 716 | B_ (b, case_eqv_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[2]; |
| 717 | b->invisibility_spec = Qt; | 717 | B_ (b, invisibility_spec) = Qt; |
| 718 | #ifndef DOS_NT | 718 | #ifndef DOS_NT |
| 719 | b->buffer_file_type = Qnil; | 719 | B_ (b, buffer_file_type) = Qnil; |
| 720 | #endif | 720 | #endif |
| 721 | 721 | ||
| 722 | /* Reset all (or most) per-buffer variables to their defaults. */ | 722 | /* Reset all (or most) per-buffer variables to their defaults. */ |
| 723 | if (permanent_too) | 723 | if (permanent_too) |
| 724 | b->local_var_alist = Qnil; | 724 | B_ (b, local_var_alist) = Qnil; |
| 725 | else | 725 | else |
| 726 | { | 726 | { |
| 727 | Lisp_Object tmp, prop, last = Qnil; | 727 | Lisp_Object tmp, prop, last = Qnil; |
| 728 | for (tmp = b->local_var_alist; CONSP (tmp); tmp = XCDR (tmp)) | 728 | for (tmp = B_ (b, local_var_alist); CONSP (tmp); tmp = XCDR (tmp)) |
| 729 | if (!NILP (prop = Fget (XCAR (XCAR (tmp)), Qpermanent_local))) | 729 | if (!NILP (prop = Fget (XCAR (XCAR (tmp)), Qpermanent_local))) |
| 730 | { | 730 | { |
| 731 | /* If permanent-local, keep it. */ | 731 | /* If permanent-local, keep it. */ |
| @@ -755,7 +755,7 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too) | |||
| 755 | } | 755 | } |
| 756 | /* Delete this local variable. */ | 756 | /* Delete this local variable. */ |
| 757 | else if (NILP (last)) | 757 | else if (NILP (last)) |
| 758 | b->local_var_alist = XCDR (tmp); | 758 | B_ (b, local_var_alist) = XCDR (tmp); |
| 759 | else | 759 | else |
| 760 | XSETCDR (last, XCDR (tmp)); | 760 | XSETCDR (last, XCDR (tmp)); |
| 761 | } | 761 | } |
| @@ -830,9 +830,9 @@ Return nil if BUFFER has been killed. */) | |||
| 830 | (register Lisp_Object buffer) | 830 | (register Lisp_Object buffer) |
| 831 | { | 831 | { |
| 832 | if (NILP (buffer)) | 832 | if (NILP (buffer)) |
| 833 | return current_buffer->name; | 833 | return B_ (current_buffer, name); |
| 834 | CHECK_BUFFER (buffer); | 834 | CHECK_BUFFER (buffer); |
| 835 | return XBUFFER (buffer)->name; | 835 | return B_ (XBUFFER (buffer), name); |
| 836 | } | 836 | } |
| 837 | 837 | ||
| 838 | DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, | 838 | DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, |
| @@ -841,9 +841,9 @@ No argument or nil as argument means use the current buffer. */) | |||
| 841 | (register Lisp_Object buffer) | 841 | (register Lisp_Object buffer) |
| 842 | { | 842 | { |
| 843 | if (NILP (buffer)) | 843 | if (NILP (buffer)) |
| 844 | return current_buffer->filename; | 844 | return B_ (current_buffer, filename); |
| 845 | CHECK_BUFFER (buffer); | 845 | CHECK_BUFFER (buffer); |
| 846 | return XBUFFER (buffer)->filename; | 846 | return B_ (XBUFFER (buffer), filename); |
| 847 | } | 847 | } |
| 848 | 848 | ||
| 849 | DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer, | 849 | DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer, |
| @@ -895,7 +895,7 @@ is the default binding of the variable. */) | |||
| 895 | { /* Look in local_var_alist. */ | 895 | { /* Look in local_var_alist. */ |
| 896 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym); | 896 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym); |
| 897 | XSETSYMBOL (variable, sym); /* Update In case of aliasing. */ | 897 | XSETSYMBOL (variable, sym); /* Update In case of aliasing. */ |
| 898 | result = Fassoc (variable, buf->local_var_alist); | 898 | result = Fassoc (variable, B_ (buf, local_var_alist)); |
| 899 | if (!NILP (result)) | 899 | if (!NILP (result)) |
| 900 | { | 900 | { |
| 901 | if (blv->fwd) | 901 | if (blv->fwd) |
| @@ -944,7 +944,7 @@ buffer_lisp_local_variables (struct buffer *buf) | |||
| 944 | { | 944 | { |
| 945 | Lisp_Object result = Qnil; | 945 | Lisp_Object result = Qnil; |
| 946 | register Lisp_Object tail; | 946 | register Lisp_Object tail; |
| 947 | for (tail = buf->local_var_alist; CONSP (tail); tail = XCDR (tail)) | 947 | for (tail = B_ (buf, local_var_alist); CONSP (tail); tail = XCDR (tail)) |
| 948 | { | 948 | { |
| 949 | Lisp_Object val, elt; | 949 | Lisp_Object val, elt; |
| 950 | 950 | ||
| @@ -1043,9 +1043,9 @@ A non-nil FLAG means mark the buffer modified. */) | |||
| 1043 | /* If buffer becoming modified, lock the file. | 1043 | /* If buffer becoming modified, lock the file. |
| 1044 | If buffer becoming unmodified, unlock the file. */ | 1044 | If buffer becoming unmodified, unlock the file. */ |
| 1045 | 1045 | ||
| 1046 | fn = current_buffer->file_truename; | 1046 | fn = B_ (current_buffer, file_truename); |
| 1047 | /* Test buffer-file-name so that binding it to nil is effective. */ | 1047 | /* Test buffer-file-name so that binding it to nil is effective. */ |
| 1048 | if (!NILP (fn) && ! NILP (current_buffer->filename)) | 1048 | if (!NILP (fn) && ! NILP (B_ (current_buffer, filename))) |
| 1049 | { | 1049 | { |
| 1050 | already = SAVE_MODIFF < MODIFF; | 1050 | already = SAVE_MODIFF < MODIFF; |
| 1051 | if (!already && !NILP (flag)) | 1051 | if (!already && !NILP (flag)) |
| @@ -1110,9 +1110,9 @@ state of the current buffer. Use with care. */) | |||
| 1110 | /* If buffer becoming modified, lock the file. | 1110 | /* If buffer becoming modified, lock the file. |
| 1111 | If buffer becoming unmodified, unlock the file. */ | 1111 | If buffer becoming unmodified, unlock the file. */ |
| 1112 | 1112 | ||
| 1113 | fn = current_buffer->file_truename; | 1113 | fn = B_ (current_buffer, file_truename); |
| 1114 | /* Test buffer-file-name so that binding it to nil is effective. */ | 1114 | /* Test buffer-file-name so that binding it to nil is effective. */ |
| 1115 | if (!NILP (fn) && ! NILP (current_buffer->filename)) | 1115 | if (!NILP (fn) && ! NILP (B_ (current_buffer, filename))) |
| 1116 | { | 1116 | { |
| 1117 | int already = SAVE_MODIFF < MODIFF; | 1117 | int already = SAVE_MODIFF < MODIFF; |
| 1118 | if (!already && !NILP (flag)) | 1118 | if (!already && !NILP (flag)) |
| @@ -1199,14 +1199,14 @@ This does not change the name of the visited file (if any). */) | |||
| 1199 | with the original name. It makes UNIQUE equivalent to | 1199 | with the original name. It makes UNIQUE equivalent to |
| 1200 | (rename-buffer (generate-new-buffer-name NEWNAME)). */ | 1200 | (rename-buffer (generate-new-buffer-name NEWNAME)). */ |
| 1201 | if (NILP (unique) && XBUFFER (tem) == current_buffer) | 1201 | if (NILP (unique) && XBUFFER (tem) == current_buffer) |
| 1202 | return current_buffer->name; | 1202 | return B_ (current_buffer, name); |
| 1203 | if (!NILP (unique)) | 1203 | if (!NILP (unique)) |
| 1204 | newname = Fgenerate_new_buffer_name (newname, current_buffer->name); | 1204 | newname = Fgenerate_new_buffer_name (newname, B_ (current_buffer, name)); |
| 1205 | else | 1205 | else |
| 1206 | error ("Buffer name `%s' is in use", SDATA (newname)); | 1206 | error ("Buffer name `%s' is in use", SDATA (newname)); |
| 1207 | } | 1207 | } |
| 1208 | 1208 | ||
| 1209 | current_buffer->name = newname; | 1209 | B_ (current_buffer, name) = newname; |
| 1210 | 1210 | ||
| 1211 | /* Catch redisplay's attention. Unless we do this, the mode lines for | 1211 | /* Catch redisplay's attention. Unless we do this, the mode lines for |
| 1212 | any windows displaying current_buffer will stay unchanged. */ | 1212 | any windows displaying current_buffer will stay unchanged. */ |
| @@ -1214,11 +1214,11 @@ This does not change the name of the visited file (if any). */) | |||
| 1214 | 1214 | ||
| 1215 | XSETBUFFER (buf, current_buffer); | 1215 | XSETBUFFER (buf, current_buffer); |
| 1216 | Fsetcar (Frassq (buf, Vbuffer_alist), newname); | 1216 | Fsetcar (Frassq (buf, Vbuffer_alist), newname); |
| 1217 | if (NILP (current_buffer->filename) | 1217 | if (NILP (B_ (current_buffer, filename)) |
| 1218 | && !NILP (current_buffer->auto_save_file_name)) | 1218 | && !NILP (B_ (current_buffer, auto_save_file_name))) |
| 1219 | call0 (intern ("rename-auto-save-file")); | 1219 | call0 (intern ("rename-auto-save-file")); |
| 1220 | /* Refetch since that last call may have done GC. */ | 1220 | /* Refetch since that last call may have done GC. */ |
| 1221 | return current_buffer->name; | 1221 | return B_ (current_buffer, name); |
| 1222 | } | 1222 | } |
| 1223 | 1223 | ||
| 1224 | DEFUN ("other-buffer", Fother_buffer, Sother_buffer, 0, 3, 0, | 1224 | DEFUN ("other-buffer", Fother_buffer, Sother_buffer, 0, 3, 0, |
| @@ -1263,9 +1263,9 @@ If BUFFER is omitted or nil, some interesting buffer is returned. */) | |||
| 1263 | continue; | 1263 | continue; |
| 1264 | if (NILP (buf)) | 1264 | if (NILP (buf)) |
| 1265 | continue; | 1265 | continue; |
| 1266 | if (NILP (XBUFFER (buf)->name)) | 1266 | if (NILP (B_ (XBUFFER (buf), name))) |
| 1267 | continue; | 1267 | continue; |
| 1268 | if (SREF (XBUFFER (buf)->name, 0) == ' ') | 1268 | if (SREF (B_ (XBUFFER (buf), name), 0) == ' ') |
| 1269 | continue; | 1269 | continue; |
| 1270 | /* If the selected frame has a buffer_predicate, | 1270 | /* If the selected frame has a buffer_predicate, |
| 1271 | disregard buffers that don't fit the predicate. */ | 1271 | disregard buffers that don't fit the predicate. */ |
| @@ -1313,8 +1313,8 @@ No argument or nil as argument means do this for the current buffer. */) | |||
| 1313 | nsberror (buffer); | 1313 | nsberror (buffer); |
| 1314 | } | 1314 | } |
| 1315 | 1315 | ||
| 1316 | if (EQ (XBUFFER (real_buffer)->undo_list, Qt)) | 1316 | if (EQ (B_ (XBUFFER (real_buffer), undo_list), Qt)) |
| 1317 | XBUFFER (real_buffer)->undo_list = Qnil; | 1317 | B_ (XBUFFER (real_buffer), undo_list) = Qnil; |
| 1318 | 1318 | ||
| 1319 | return Qnil; | 1319 | return Qnil; |
| 1320 | } | 1320 | } |
| @@ -1359,16 +1359,16 @@ with SIGHUP. */) | |||
| 1359 | b = XBUFFER (buffer); | 1359 | b = XBUFFER (buffer); |
| 1360 | 1360 | ||
| 1361 | /* Avoid trouble for buffer already dead. */ | 1361 | /* Avoid trouble for buffer already dead. */ |
| 1362 | if (NILP (b->name)) | 1362 | if (NILP (B_ (b, name))) |
| 1363 | return Qnil; | 1363 | return Qnil; |
| 1364 | 1364 | ||
| 1365 | /* Query if the buffer is still modified. */ | 1365 | /* Query if the buffer is still modified. */ |
| 1366 | if (INTERACTIVE && !NILP (b->filename) | 1366 | if (INTERACTIVE && !NILP (B_ (b, filename)) |
| 1367 | && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) | 1367 | && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) |
| 1368 | { | 1368 | { |
| 1369 | GCPRO1 (buffer); | 1369 | GCPRO1 (buffer); |
| 1370 | tem = do_yes_or_no_p (format2 ("Buffer %s modified; kill anyway? ", | 1370 | tem = do_yes_or_no_p (format2 ("Buffer %s modified; kill anyway? ", |
| 1371 | b->name, make_number (0))); | 1371 | B_ (b, name), make_number (0))); |
| 1372 | UNGCPRO; | 1372 | UNGCPRO; |
| 1373 | if (NILP (tem)) | 1373 | if (NILP (tem)) |
| 1374 | return Qnil; | 1374 | return Qnil; |
| @@ -1402,7 +1402,7 @@ with SIGHUP. */) | |||
| 1402 | if (EQ (buffer, XWINDOW (minibuf_window)->buffer)) | 1402 | if (EQ (buffer, XWINDOW (minibuf_window)->buffer)) |
| 1403 | return Qnil; | 1403 | return Qnil; |
| 1404 | 1404 | ||
| 1405 | if (NILP (b->name)) | 1405 | if (NILP (B_ (b, name))) |
| 1406 | return Qnil; | 1406 | return Qnil; |
| 1407 | 1407 | ||
| 1408 | /* When we kill a base buffer, kill all its indirect buffers. | 1408 | /* When we kill a base buffer, kill all its indirect buffers. |
| @@ -1417,7 +1417,7 @@ with SIGHUP. */) | |||
| 1417 | for (other = all_buffers; other; other = other->next) | 1417 | for (other = all_buffers; other; other = other->next) |
| 1418 | /* all_buffers contains dead buffers too; | 1418 | /* all_buffers contains dead buffers too; |
| 1419 | don't re-kill them. */ | 1419 | don't re-kill them. */ |
| 1420 | if (other->base_buffer == b && !NILP (other->name)) | 1420 | if (other->base_buffer == b && !NILP (B_ (other, name))) |
| 1421 | { | 1421 | { |
| 1422 | Lisp_Object buffer; | 1422 | Lisp_Object buffer; |
| 1423 | XSETBUFFER (buffer, other); | 1423 | XSETBUFFER (buffer, other); |
| @@ -1462,7 +1462,7 @@ with SIGHUP. */) | |||
| 1462 | /* Killing buffer processes may run sentinels which may | 1462 | /* Killing buffer processes may run sentinels which may |
| 1463 | have called kill-buffer. */ | 1463 | have called kill-buffer. */ |
| 1464 | 1464 | ||
| 1465 | if (NILP (b->name)) | 1465 | if (NILP (B_ (b, name))) |
| 1466 | return Qnil; | 1466 | return Qnil; |
| 1467 | 1467 | ||
| 1468 | clear_charpos_cache (b); | 1468 | clear_charpos_cache (b); |
| @@ -1476,7 +1476,7 @@ with SIGHUP. */) | |||
| 1476 | 1476 | ||
| 1477 | /* Delete any auto-save file, if we saved it in this session. | 1477 | /* Delete any auto-save file, if we saved it in this session. |
| 1478 | But not if the buffer is modified. */ | 1478 | But not if the buffer is modified. */ |
| 1479 | if (STRINGP (b->auto_save_file_name) | 1479 | if (STRINGP (B_ (b, auto_save_file_name)) |
| 1480 | && BUF_AUTOSAVE_MODIFF (b) != 0 | 1480 | && BUF_AUTOSAVE_MODIFF (b) != 0 |
| 1481 | && BUF_SAVE_MODIFF (b) < BUF_AUTOSAVE_MODIFF (b) | 1481 | && BUF_SAVE_MODIFF (b) < BUF_AUTOSAVE_MODIFF (b) |
| 1482 | && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) | 1482 | && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) |
| @@ -1485,7 +1485,7 @@ with SIGHUP. */) | |||
| 1485 | Lisp_Object tem; | 1485 | Lisp_Object tem; |
| 1486 | tem = Fsymbol_value (intern ("delete-auto-save-files")); | 1486 | tem = Fsymbol_value (intern ("delete-auto-save-files")); |
| 1487 | if (! NILP (tem)) | 1487 | if (! NILP (tem)) |
| 1488 | internal_delete_file (b->auto_save_file_name); | 1488 | internal_delete_file (B_ (b, auto_save_file_name)); |
| 1489 | } | 1489 | } |
| 1490 | 1490 | ||
| 1491 | if (b->base_buffer) | 1491 | if (b->base_buffer) |
| @@ -1525,7 +1525,7 @@ with SIGHUP. */) | |||
| 1525 | swap_out_buffer_local_variables (b); | 1525 | swap_out_buffer_local_variables (b); |
| 1526 | reset_buffer_local_variables (b, 1); | 1526 | reset_buffer_local_variables (b, 1); |
| 1527 | 1527 | ||
| 1528 | b->name = Qnil; | 1528 | B_ (b, name) = Qnil; |
| 1529 | 1529 | ||
| 1530 | BLOCK_INPUT; | 1530 | BLOCK_INPUT; |
| 1531 | if (! b->base_buffer) | 1531 | if (! b->base_buffer) |
| @@ -1541,9 +1541,9 @@ with SIGHUP. */) | |||
| 1541 | free_region_cache (b->width_run_cache); | 1541 | free_region_cache (b->width_run_cache); |
| 1542 | b->width_run_cache = 0; | 1542 | b->width_run_cache = 0; |
| 1543 | } | 1543 | } |
| 1544 | b->width_table = Qnil; | 1544 | B_ (b, width_table) = Qnil; |
| 1545 | UNBLOCK_INPUT; | 1545 | UNBLOCK_INPUT; |
| 1546 | b->undo_list = Qnil; | 1546 | B_ (b, undo_list) = Qnil; |
| 1547 | 1547 | ||
| 1548 | return Qt; | 1548 | return Qt; |
| 1549 | } | 1549 | } |
| @@ -1637,15 +1637,15 @@ the current buffer's major mode. */) | |||
| 1637 | 1637 | ||
| 1638 | CHECK_BUFFER (buffer); | 1638 | CHECK_BUFFER (buffer); |
| 1639 | 1639 | ||
| 1640 | if (STRINGP (XBUFFER (buffer)->name) | 1640 | if (STRINGP (B_ (XBUFFER (buffer), name)) |
| 1641 | && strcmp (SSDATA (XBUFFER (buffer)->name), "*scratch*") == 0) | 1641 | && strcmp (SSDATA (B_ (XBUFFER (buffer), name)), "*scratch*") == 0) |
| 1642 | function = find_symbol_value (intern ("initial-major-mode")); | 1642 | function = find_symbol_value (intern ("initial-major-mode")); |
| 1643 | else | 1643 | else |
| 1644 | { | 1644 | { |
| 1645 | function = buffer_defaults.major_mode; | 1645 | function = B_ (&buffer_defaults, major_mode); |
| 1646 | if (NILP (function) | 1646 | if (NILP (function) |
| 1647 | && NILP (Fget (current_buffer->major_mode, Qmode_class))) | 1647 | && NILP (Fget (B_ (current_buffer, major_mode), Qmode_class))) |
| 1648 | function = current_buffer->major_mode; | 1648 | function = B_ (current_buffer, major_mode); |
| 1649 | } | 1649 | } |
| 1650 | 1650 | ||
| 1651 | if (NILP (function) || EQ (function, Qfundamental_mode)) | 1651 | if (NILP (function) || EQ (function, Qfundamental_mode)) |
| @@ -1795,29 +1795,29 @@ set_buffer_internal_1 (register struct buffer *b) | |||
| 1795 | /* Put the undo list back in the base buffer, so that it appears | 1795 | /* Put the undo list back in the base buffer, so that it appears |
| 1796 | that an indirect buffer shares the undo list of its base. */ | 1796 | that an indirect buffer shares the undo list of its base. */ |
| 1797 | if (old_buf->base_buffer) | 1797 | if (old_buf->base_buffer) |
| 1798 | old_buf->base_buffer->undo_list = old_buf->undo_list; | 1798 | B_ (old_buf->base_buffer, undo_list) = B_ (old_buf, undo_list); |
| 1799 | 1799 | ||
| 1800 | /* If the old current buffer has markers to record PT, BEGV and ZV | 1800 | /* If the old current buffer has markers to record PT, BEGV and ZV |
| 1801 | when it is not current, update them now. */ | 1801 | when it is not current, update them now. */ |
| 1802 | if (! NILP (old_buf->pt_marker)) | 1802 | if (! NILP (B_ (old_buf, pt_marker))) |
| 1803 | { | 1803 | { |
| 1804 | Lisp_Object obuf; | 1804 | Lisp_Object obuf; |
| 1805 | XSETBUFFER (obuf, old_buf); | 1805 | XSETBUFFER (obuf, old_buf); |
| 1806 | set_marker_both (old_buf->pt_marker, obuf, | 1806 | set_marker_both (B_ (old_buf, pt_marker), obuf, |
| 1807 | BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); | 1807 | BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); |
| 1808 | } | 1808 | } |
| 1809 | if (! NILP (old_buf->begv_marker)) | 1809 | if (! NILP (B_ (old_buf, begv_marker))) |
| 1810 | { | 1810 | { |
| 1811 | Lisp_Object obuf; | 1811 | Lisp_Object obuf; |
| 1812 | XSETBUFFER (obuf, old_buf); | 1812 | XSETBUFFER (obuf, old_buf); |
| 1813 | set_marker_both (old_buf->begv_marker, obuf, | 1813 | set_marker_both (B_ (old_buf, begv_marker), obuf, |
| 1814 | BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); | 1814 | BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); |
| 1815 | } | 1815 | } |
| 1816 | if (! NILP (old_buf->zv_marker)) | 1816 | if (! NILP (B_ (old_buf, zv_marker))) |
| 1817 | { | 1817 | { |
| 1818 | Lisp_Object obuf; | 1818 | Lisp_Object obuf; |
| 1819 | XSETBUFFER (obuf, old_buf); | 1819 | XSETBUFFER (obuf, old_buf); |
| 1820 | set_marker_both (old_buf->zv_marker, obuf, | 1820 | set_marker_both (B_ (old_buf, zv_marker), obuf, |
| 1821 | BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); | 1821 | BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); |
| 1822 | } | 1822 | } |
| 1823 | } | 1823 | } |
| @@ -1825,24 +1825,24 @@ set_buffer_internal_1 (register struct buffer *b) | |||
| 1825 | /* Get the undo list from the base buffer, so that it appears | 1825 | /* Get the undo list from the base buffer, so that it appears |
| 1826 | that an indirect buffer shares the undo list of its base. */ | 1826 | that an indirect buffer shares the undo list of its base. */ |
| 1827 | if (b->base_buffer) | 1827 | if (b->base_buffer) |
| 1828 | b->undo_list = b->base_buffer->undo_list; | 1828 | B_ (b, undo_list) = B_ (b->base_buffer, undo_list); |
| 1829 | 1829 | ||
| 1830 | /* If the new current buffer has markers to record PT, BEGV and ZV | 1830 | /* If the new current buffer has markers to record PT, BEGV and ZV |
| 1831 | when it is not current, fetch them now. */ | 1831 | when it is not current, fetch them now. */ |
| 1832 | if (! NILP (b->pt_marker)) | 1832 | if (! NILP (B_ (b, pt_marker))) |
| 1833 | { | 1833 | { |
| 1834 | BUF_PT (b) = marker_position (b->pt_marker); | 1834 | BUF_PT (b) = marker_position (B_ (b, pt_marker)); |
| 1835 | BUF_PT_BYTE (b) = marker_byte_position (b->pt_marker); | 1835 | BUF_PT_BYTE (b) = marker_byte_position (B_ (b, pt_marker)); |
| 1836 | } | 1836 | } |
| 1837 | if (! NILP (b->begv_marker)) | 1837 | if (! NILP (B_ (b, begv_marker))) |
| 1838 | { | 1838 | { |
| 1839 | BUF_BEGV (b) = marker_position (b->begv_marker); | 1839 | BUF_BEGV (b) = marker_position (B_ (b, begv_marker)); |
| 1840 | BUF_BEGV_BYTE (b) = marker_byte_position (b->begv_marker); | 1840 | BUF_BEGV_BYTE (b) = marker_byte_position (B_ (b, begv_marker)); |
| 1841 | } | 1841 | } |
| 1842 | if (! NILP (b->zv_marker)) | 1842 | if (! NILP (B_ (b, zv_marker))) |
| 1843 | { | 1843 | { |
| 1844 | BUF_ZV (b) = marker_position (b->zv_marker); | 1844 | BUF_ZV (b) = marker_position (B_ (b, zv_marker)); |
| 1845 | BUF_ZV_BYTE (b) = marker_byte_position (b->zv_marker); | 1845 | BUF_ZV_BYTE (b) = marker_byte_position (B_ (b, zv_marker)); |
| 1846 | } | 1846 | } |
| 1847 | 1847 | ||
| 1848 | /* Look down buffer's list of local Lisp variables | 1848 | /* Look down buffer's list of local Lisp variables |
| @@ -1850,7 +1850,7 @@ set_buffer_internal_1 (register struct buffer *b) | |||
| 1850 | 1850 | ||
| 1851 | do | 1851 | do |
| 1852 | { | 1852 | { |
| 1853 | for (tail = b->local_var_alist; CONSP (tail); tail = XCDR (tail)) | 1853 | for (tail = B_ (b, local_var_alist); CONSP (tail); tail = XCDR (tail)) |
| 1854 | { | 1854 | { |
| 1855 | Lisp_Object var = XCAR (XCAR (tail)); | 1855 | Lisp_Object var = XCAR (XCAR (tail)); |
| 1856 | struct Lisp_Symbol *sym = XSYMBOL (var); | 1856 | struct Lisp_Symbol *sym = XSYMBOL (var); |
| @@ -1883,45 +1883,45 @@ set_buffer_temp (struct buffer *b) | |||
| 1883 | { | 1883 | { |
| 1884 | /* If the old current buffer has markers to record PT, BEGV and ZV | 1884 | /* If the old current buffer has markers to record PT, BEGV and ZV |
| 1885 | when it is not current, update them now. */ | 1885 | when it is not current, update them now. */ |
| 1886 | if (! NILP (old_buf->pt_marker)) | 1886 | if (! NILP (B_ (old_buf, pt_marker))) |
| 1887 | { | 1887 | { |
| 1888 | Lisp_Object obuf; | 1888 | Lisp_Object obuf; |
| 1889 | XSETBUFFER (obuf, old_buf); | 1889 | XSETBUFFER (obuf, old_buf); |
| 1890 | set_marker_both (old_buf->pt_marker, obuf, | 1890 | set_marker_both (B_ (old_buf, pt_marker), obuf, |
| 1891 | BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); | 1891 | BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); |
| 1892 | } | 1892 | } |
| 1893 | if (! NILP (old_buf->begv_marker)) | 1893 | if (! NILP (B_ (old_buf, begv_marker))) |
| 1894 | { | 1894 | { |
| 1895 | Lisp_Object obuf; | 1895 | Lisp_Object obuf; |
| 1896 | XSETBUFFER (obuf, old_buf); | 1896 | XSETBUFFER (obuf, old_buf); |
| 1897 | set_marker_both (old_buf->begv_marker, obuf, | 1897 | set_marker_both (B_ (old_buf, begv_marker), obuf, |
| 1898 | BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); | 1898 | BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); |
| 1899 | } | 1899 | } |
| 1900 | if (! NILP (old_buf->zv_marker)) | 1900 | if (! NILP (B_ (old_buf, zv_marker))) |
| 1901 | { | 1901 | { |
| 1902 | Lisp_Object obuf; | 1902 | Lisp_Object obuf; |
| 1903 | XSETBUFFER (obuf, old_buf); | 1903 | XSETBUFFER (obuf, old_buf); |
| 1904 | set_marker_both (old_buf->zv_marker, obuf, | 1904 | set_marker_both (B_ (old_buf, zv_marker), obuf, |
| 1905 | BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); | 1905 | BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); |
| 1906 | } | 1906 | } |
| 1907 | } | 1907 | } |
| 1908 | 1908 | ||
| 1909 | /* If the new current buffer has markers to record PT, BEGV and ZV | 1909 | /* If the new current buffer has markers to record PT, BEGV and ZV |
| 1910 | when it is not current, fetch them now. */ | 1910 | when it is not current, fetch them now. */ |
| 1911 | if (! NILP (b->pt_marker)) | 1911 | if (! NILP (B_ (b, pt_marker))) |
| 1912 | { | 1912 | { |
| 1913 | BUF_PT (b) = marker_position (b->pt_marker); | 1913 | BUF_PT (b) = marker_position (B_ (b, pt_marker)); |
| 1914 | BUF_PT_BYTE (b) = marker_byte_position (b->pt_marker); | 1914 | BUF_PT_BYTE (b) = marker_byte_position (B_ (b, pt_marker)); |
| 1915 | } | 1915 | } |
| 1916 | if (! NILP (b->begv_marker)) | 1916 | if (! NILP (B_ (b, begv_marker))) |
| 1917 | { | 1917 | { |
| 1918 | BUF_BEGV (b) = marker_position (b->begv_marker); | 1918 | BUF_BEGV (b) = marker_position (B_ (b, begv_marker)); |
| 1919 | BUF_BEGV_BYTE (b) = marker_byte_position (b->begv_marker); | 1919 | BUF_BEGV_BYTE (b) = marker_byte_position (B_ (b, begv_marker)); |
| 1920 | } | 1920 | } |
| 1921 | if (! NILP (b->zv_marker)) | 1921 | if (! NILP (B_ (b, zv_marker))) |
| 1922 | { | 1922 | { |
| 1923 | BUF_ZV (b) = marker_position (b->zv_marker); | 1923 | BUF_ZV (b) = marker_position (B_ (b, zv_marker)); |
| 1924 | BUF_ZV_BYTE (b) = marker_byte_position (b->zv_marker); | 1924 | BUF_ZV_BYTE (b) = marker_byte_position (B_ (b, zv_marker)); |
| 1925 | } | 1925 | } |
| 1926 | } | 1926 | } |
| 1927 | 1927 | ||
| @@ -1938,7 +1938,7 @@ ends when the current command terminates. Use `switch-to-buffer' or | |||
| 1938 | buffer = Fget_buffer (buffer_or_name); | 1938 | buffer = Fget_buffer (buffer_or_name); |
| 1939 | if (NILP (buffer)) | 1939 | if (NILP (buffer)) |
| 1940 | nsberror (buffer_or_name); | 1940 | nsberror (buffer_or_name); |
| 1941 | if (NILP (XBUFFER (buffer)->name)) | 1941 | if (NILP (B_ (XBUFFER (buffer), name))) |
| 1942 | error ("Selecting deleted buffer"); | 1942 | error ("Selecting deleted buffer"); |
| 1943 | set_buffer_internal (XBUFFER (buffer)); | 1943 | set_buffer_internal (XBUFFER (buffer)); |
| 1944 | return buffer; | 1944 | return buffer; |
| @@ -1949,7 +1949,7 @@ ends when the current command terminates. Use `switch-to-buffer' or | |||
| 1949 | Lisp_Object | 1949 | Lisp_Object |
| 1950 | set_buffer_if_live (Lisp_Object buffer) | 1950 | set_buffer_if_live (Lisp_Object buffer) |
| 1951 | { | 1951 | { |
| 1952 | if (! NILP (XBUFFER (buffer)->name)) | 1952 | if (! NILP (B_ (XBUFFER (buffer), name))) |
| 1953 | Fset_buffer (buffer); | 1953 | Fset_buffer (buffer); |
| 1954 | return Qnil; | 1954 | return Qnil; |
| 1955 | } | 1955 | } |
| @@ -1959,7 +1959,7 @@ DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, | |||
| 1959 | doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */) | 1959 | doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */) |
| 1960 | (void) | 1960 | (void) |
| 1961 | { | 1961 | { |
| 1962 | if (!NILP (current_buffer->read_only) | 1962 | if (!NILP (B_ (current_buffer, read_only)) |
| 1963 | && NILP (Vinhibit_read_only)) | 1963 | && NILP (Vinhibit_read_only)) |
| 1964 | xsignal1 (Qbuffer_read_only, Fcurrent_buffer ()); | 1964 | xsignal1 (Qbuffer_read_only, Fcurrent_buffer ()); |
| 1965 | return Qnil; | 1965 | return Qnil; |
| @@ -2008,7 +2008,7 @@ its frame, iconify that frame. */) | |||
| 2008 | 2008 | ||
| 2009 | /* Move buffer to the end of the buffer list. Do nothing if the | 2009 | /* Move buffer to the end of the buffer list. Do nothing if the |
| 2010 | buffer is killed. */ | 2010 | buffer is killed. */ |
| 2011 | if (!NILP (XBUFFER (buffer)->name)) | 2011 | if (!NILP (B_ (XBUFFER (buffer), name))) |
| 2012 | { | 2012 | { |
| 2013 | Lisp_Object aelt, link; | 2013 | Lisp_Object aelt, link; |
| 2014 | 2014 | ||
| @@ -2041,7 +2041,7 @@ so the buffer is truly empty after this. */) | |||
| 2041 | /* Prevent warnings, or suspension of auto saving, that would happen | 2041 | /* Prevent warnings, or suspension of auto saving, that would happen |
| 2042 | if future size is less than past size. Use of erase-buffer | 2042 | if future size is less than past size. Use of erase-buffer |
| 2043 | implies that the future text is not really related to the past text. */ | 2043 | implies that the future text is not really related to the past text. */ |
| 2044 | XSETFASTINT (current_buffer->save_length, 0); | 2044 | XSETFASTINT (B_ (current_buffer, save_length), 0); |
| 2045 | return Qnil; | 2045 | return Qnil; |
| 2046 | } | 2046 | } |
| 2047 | 2047 | ||
| @@ -2111,7 +2111,7 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, | |||
| 2111 | CHECK_BUFFER (buffer); | 2111 | CHECK_BUFFER (buffer); |
| 2112 | other_buffer = XBUFFER (buffer); | 2112 | other_buffer = XBUFFER (buffer); |
| 2113 | 2113 | ||
| 2114 | if (NILP (other_buffer->name)) | 2114 | if (NILP (B_ (other_buffer, name))) |
| 2115 | error ("Cannot swap a dead buffer's text"); | 2115 | error ("Cannot swap a dead buffer's text"); |
| 2116 | 2116 | ||
| 2117 | /* Actually, it probably works just fine. | 2117 | /* Actually, it probably works just fine. |
| @@ -2138,6 +2138,12 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, | |||
| 2138 | other_buffer->field = current_buffer->field; \ | 2138 | other_buffer->field = current_buffer->field; \ |
| 2139 | current_buffer->field = tmp##field; \ | 2139 | current_buffer->field = tmp##field; \ |
| 2140 | } while (0) | 2140 | } while (0) |
| 2141 | #define swapfield_(field, type) \ | ||
| 2142 | do { \ | ||
| 2143 | type tmp##field = B_ (other_buffer, field); \ | ||
| 2144 | B_ (other_buffer, field) = B_ (current_buffer, field); \ | ||
| 2145 | B_ (current_buffer, field) = tmp##field; \ | ||
| 2146 | } while (0) | ||
| 2141 | 2147 | ||
| 2142 | swapfield (own_text, struct buffer_text); | 2148 | swapfield (own_text, struct buffer_text); |
| 2143 | eassert (current_buffer->text == ¤t_buffer->own_text); | 2149 | eassert (current_buffer->text == ¤t_buffer->own_text); |
| @@ -2165,18 +2171,18 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, | |||
| 2165 | swapfield (overlays_before, struct Lisp_Overlay *); | 2171 | swapfield (overlays_before, struct Lisp_Overlay *); |
| 2166 | swapfield (overlays_after, struct Lisp_Overlay *); | 2172 | swapfield (overlays_after, struct Lisp_Overlay *); |
| 2167 | swapfield (overlay_center, EMACS_INT); | 2173 | swapfield (overlay_center, EMACS_INT); |
| 2168 | swapfield (undo_list, Lisp_Object); | 2174 | swapfield_ (undo_list, Lisp_Object); |
| 2169 | swapfield (mark, Lisp_Object); | 2175 | swapfield_ (mark, Lisp_Object); |
| 2170 | swapfield (enable_multibyte_characters, Lisp_Object); | 2176 | swapfield_ (enable_multibyte_characters, Lisp_Object); |
| 2171 | swapfield (bidi_display_reordering, Lisp_Object); | 2177 | swapfield_ (bidi_display_reordering, Lisp_Object); |
| 2172 | swapfield (bidi_paragraph_direction, Lisp_Object); | 2178 | swapfield_ (bidi_paragraph_direction, Lisp_Object); |
| 2173 | /* FIXME: Not sure what we should do with these *_marker fields. | 2179 | /* FIXME: Not sure what we should do with these *_marker fields. |
| 2174 | Hopefully they're just nil anyway. */ | 2180 | Hopefully they're just nil anyway. */ |
| 2175 | swapfield (pt_marker, Lisp_Object); | 2181 | swapfield_ (pt_marker, Lisp_Object); |
| 2176 | swapfield (begv_marker, Lisp_Object); | 2182 | swapfield_ (begv_marker, Lisp_Object); |
| 2177 | swapfield (zv_marker, Lisp_Object); | 2183 | swapfield_ (zv_marker, Lisp_Object); |
| 2178 | current_buffer->point_before_scroll = Qnil; | 2184 | B_ (current_buffer, point_before_scroll) = Qnil; |
| 2179 | other_buffer->point_before_scroll = Qnil; | 2185 | B_ (other_buffer, point_before_scroll) = Qnil; |
| 2180 | 2186 | ||
| 2181 | current_buffer->text->modiff++; other_buffer->text->modiff++; | 2187 | current_buffer->text->modiff++; other_buffer->text->modiff++; |
| 2182 | current_buffer->text->chars_modiff++; other_buffer->text->chars_modiff++; | 2188 | current_buffer->text->chars_modiff++; other_buffer->text->chars_modiff++; |
| @@ -2250,21 +2256,21 @@ current buffer is cleared. */) | |||
| 2250 | EMACS_INT begv, zv; | 2256 | EMACS_INT begv, zv; |
| 2251 | int narrowed = (BEG != BEGV || Z != ZV); | 2257 | int narrowed = (BEG != BEGV || Z != ZV); |
| 2252 | int modified_p = !NILP (Fbuffer_modified_p (Qnil)); | 2258 | int modified_p = !NILP (Fbuffer_modified_p (Qnil)); |
| 2253 | Lisp_Object old_undo = current_buffer->undo_list; | 2259 | Lisp_Object old_undo = B_ (current_buffer, undo_list); |
| 2254 | struct gcpro gcpro1; | 2260 | struct gcpro gcpro1; |
| 2255 | 2261 | ||
| 2256 | if (current_buffer->base_buffer) | 2262 | if (current_buffer->base_buffer) |
| 2257 | error ("Cannot do `set-buffer-multibyte' on an indirect buffer"); | 2263 | error ("Cannot do `set-buffer-multibyte' on an indirect buffer"); |
| 2258 | 2264 | ||
| 2259 | /* Do nothing if nothing actually changes. */ | 2265 | /* Do nothing if nothing actually changes. */ |
| 2260 | if (NILP (flag) == NILP (current_buffer->enable_multibyte_characters)) | 2266 | if (NILP (flag) == NILP (B_ (current_buffer, enable_multibyte_characters))) |
| 2261 | return flag; | 2267 | return flag; |
| 2262 | 2268 | ||
| 2263 | GCPRO1 (old_undo); | 2269 | GCPRO1 (old_undo); |
| 2264 | 2270 | ||
| 2265 | /* Don't record these buffer changes. We will put a special undo entry | 2271 | /* Don't record these buffer changes. We will put a special undo entry |
| 2266 | instead. */ | 2272 | instead. */ |
| 2267 | current_buffer->undo_list = Qt; | 2273 | B_ (current_buffer, undo_list) = Qt; |
| 2268 | 2274 | ||
| 2269 | /* If the cached position is for this buffer, clear it out. */ | 2275 | /* If the cached position is for this buffer, clear it out. */ |
| 2270 | clear_charpos_cache (current_buffer); | 2276 | clear_charpos_cache (current_buffer); |
| @@ -2286,7 +2292,7 @@ current buffer is cleared. */) | |||
| 2286 | to calculate the old correspondences. */ | 2292 | to calculate the old correspondences. */ |
| 2287 | set_intervals_multibyte (0); | 2293 | set_intervals_multibyte (0); |
| 2288 | 2294 | ||
| 2289 | current_buffer->enable_multibyte_characters = Qnil; | 2295 | B_ (current_buffer, enable_multibyte_characters) = Qnil; |
| 2290 | 2296 | ||
| 2291 | Z = Z_BYTE; | 2297 | Z = Z_BYTE; |
| 2292 | BEGV = BEGV_BYTE; | 2298 | BEGV = BEGV_BYTE; |
| @@ -2424,7 +2430,7 @@ current buffer is cleared. */) | |||
| 2424 | 2430 | ||
| 2425 | /* Do this first, so that chars_in_text asks the right question. | 2431 | /* Do this first, so that chars_in_text asks the right question. |
| 2426 | set_intervals_multibyte needs it too. */ | 2432 | set_intervals_multibyte needs it too. */ |
| 2427 | current_buffer->enable_multibyte_characters = Qt; | 2433 | B_ (current_buffer, enable_multibyte_characters) = Qt; |
| 2428 | 2434 | ||
| 2429 | GPT_BYTE = advance_to_char_boundary (GPT_BYTE); | 2435 | GPT_BYTE = advance_to_char_boundary (GPT_BYTE); |
| 2430 | GPT = chars_in_text (BEG_ADDR, GPT_BYTE - BEG_BYTE) + BEG; | 2436 | GPT = chars_in_text (BEG_ADDR, GPT_BYTE - BEG_BYTE) + BEG; |
| @@ -2482,7 +2488,7 @@ current buffer is cleared. */) | |||
| 2482 | if (!EQ (old_undo, Qt)) | 2488 | if (!EQ (old_undo, Qt)) |
| 2483 | { | 2489 | { |
| 2484 | /* Represent all the above changes by a special undo entry. */ | 2490 | /* Represent all the above changes by a special undo entry. */ |
| 2485 | current_buffer->undo_list = Fcons (list3 (Qapply, | 2491 | B_ (current_buffer, undo_list) = Fcons (list3 (Qapply, |
| 2486 | intern ("set-buffer-multibyte"), | 2492 | intern ("set-buffer-multibyte"), |
| 2487 | NILP (flag) ? Qt : Qnil), | 2493 | NILP (flag) ? Qt : Qnil), |
| 2488 | old_undo); | 2494 | old_undo); |
| @@ -2498,10 +2504,10 @@ current buffer is cleared. */) | |||
| 2498 | /* Copy this buffer's new multibyte status | 2504 | /* Copy this buffer's new multibyte status |
| 2499 | into all of its indirect buffers. */ | 2505 | into all of its indirect buffers. */ |
| 2500 | for (other = all_buffers; other; other = other->next) | 2506 | for (other = all_buffers; other; other = other->next) |
| 2501 | if (other->base_buffer == current_buffer && !NILP (other->name)) | 2507 | if (other->base_buffer == current_buffer && !NILP (B_ (other, name))) |
| 2502 | { | 2508 | { |
| 2503 | other->enable_multibyte_characters | 2509 | B_ (other, enable_multibyte_characters) |
| 2504 | = current_buffer->enable_multibyte_characters; | 2510 | = B_ (current_buffer, enable_multibyte_characters); |
| 2505 | other->prevent_redisplay_optimizations_p = 1; | 2511 | other->prevent_redisplay_optimizations_p = 1; |
| 2506 | } | 2512 | } |
| 2507 | 2513 | ||
| @@ -2568,7 +2574,7 @@ swap_out_buffer_local_variables (struct buffer *b) | |||
| 2568 | Lisp_Object oalist, alist, buffer; | 2574 | Lisp_Object oalist, alist, buffer; |
| 2569 | 2575 | ||
| 2570 | XSETBUFFER (buffer, b); | 2576 | XSETBUFFER (buffer, b); |
| 2571 | oalist = b->local_var_alist; | 2577 | oalist = B_ (b, local_var_alist); |
| 2572 | 2578 | ||
| 2573 | for (alist = oalist; CONSP (alist); alist = XCDR (alist)) | 2579 | for (alist = oalist; CONSP (alist); alist = XCDR (alist)) |
| 2574 | { | 2580 | { |
| @@ -3072,7 +3078,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str | |||
| 3072 | ssl->buf[ssl->used].priority = (INTEGERP (pri) ? XINT (pri) : 0); | 3078 | ssl->buf[ssl->used].priority = (INTEGERP (pri) ? XINT (pri) : 0); |
| 3073 | ssl->used++; | 3079 | ssl->used++; |
| 3074 | 3080 | ||
| 3075 | if (NILP (current_buffer->enable_multibyte_characters)) | 3081 | if (NILP (B_ (current_buffer, enable_multibyte_characters))) |
| 3076 | nbytes = SCHARS (str); | 3082 | nbytes = SCHARS (str); |
| 3077 | else if (! STRING_MULTIBYTE (str)) | 3083 | else if (! STRING_MULTIBYTE (str)) |
| 3078 | nbytes = count_size_as_multibyte (SDATA (str), | 3084 | nbytes = count_size_as_multibyte (SDATA (str), |
| @@ -3084,7 +3090,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str | |||
| 3084 | 3090 | ||
| 3085 | if (STRINGP (str2)) | 3091 | if (STRINGP (str2)) |
| 3086 | { | 3092 | { |
| 3087 | if (NILP (current_buffer->enable_multibyte_characters)) | 3093 | if (NILP (B_ (current_buffer, enable_multibyte_characters))) |
| 3088 | nbytes = SCHARS (str2); | 3094 | nbytes = SCHARS (str2); |
| 3089 | else if (! STRING_MULTIBYTE (str2)) | 3095 | else if (! STRING_MULTIBYTE (str2)) |
| 3090 | nbytes = count_size_as_multibyte (SDATA (str2), | 3096 | nbytes = count_size_as_multibyte (SDATA (str2), |
| @@ -3114,7 +3120,7 @@ overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr) | |||
| 3114 | Lisp_Object overlay, window, str; | 3120 | Lisp_Object overlay, window, str; |
| 3115 | struct Lisp_Overlay *ov; | 3121 | struct Lisp_Overlay *ov; |
| 3116 | EMACS_INT startpos, endpos; | 3122 | EMACS_INT startpos, endpos; |
| 3117 | int multibyte = ! NILP (current_buffer->enable_multibyte_characters); | 3123 | int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); |
| 3118 | 3124 | ||
| 3119 | overlay_heads.used = overlay_heads.bytes = 0; | 3125 | overlay_heads.used = overlay_heads.bytes = 0; |
| 3120 | overlay_tails.used = overlay_tails.bytes = 0; | 3126 | overlay_tails.used = overlay_tails.bytes = 0; |
| @@ -4985,9 +4991,9 @@ init_buffer_once (void) | |||
| 4985 | /* Make sure all markable slots in buffer_defaults | 4991 | /* Make sure all markable slots in buffer_defaults |
| 4986 | are initialized reasonably, so mark_buffer won't choke. */ | 4992 | are initialized reasonably, so mark_buffer won't choke. */ |
| 4987 | reset_buffer (&buffer_defaults); | 4993 | reset_buffer (&buffer_defaults); |
| 4988 | eassert (EQ (buffer_defaults.name, make_number (0))); | 4994 | eassert (EQ (B_ (&buffer_defaults, name), make_number (0))); |
| 4989 | reset_buffer_local_variables (&buffer_defaults, 1); | 4995 | reset_buffer_local_variables (&buffer_defaults, 1); |
| 4990 | eassert (EQ (buffer_local_symbols.name, make_number (0))); | 4996 | eassert (EQ (B_ (&buffer_local_symbols, name), make_number (0))); |
| 4991 | reset_buffer (&buffer_local_symbols); | 4997 | reset_buffer (&buffer_local_symbols); |
| 4992 | reset_buffer_local_variables (&buffer_local_symbols, 1); | 4998 | reset_buffer_local_variables (&buffer_local_symbols, 1); |
| 4993 | /* Prevent GC from getting confused. */ | 4999 | /* Prevent GC from getting confused. */ |
| @@ -5004,60 +5010,60 @@ init_buffer_once (void) | |||
| 5004 | /* Must do these before making the first buffer! */ | 5010 | /* Must do these before making the first buffer! */ |
| 5005 | 5011 | ||
| 5006 | /* real setup is done in bindings.el */ | 5012 | /* real setup is done in bindings.el */ |
| 5007 | buffer_defaults.mode_line_format = make_pure_c_string ("%-"); | 5013 | B_ (&buffer_defaults, mode_line_format) = make_pure_c_string ("%-"); |
| 5008 | buffer_defaults.header_line_format = Qnil; | 5014 | B_ (&buffer_defaults, header_line_format) = Qnil; |
| 5009 | buffer_defaults.abbrev_mode = Qnil; | 5015 | B_ (&buffer_defaults, abbrev_mode) = Qnil; |
| 5010 | buffer_defaults.overwrite_mode = Qnil; | 5016 | B_ (&buffer_defaults, overwrite_mode) = Qnil; |
| 5011 | buffer_defaults.case_fold_search = Qt; | 5017 | B_ (&buffer_defaults, case_fold_search) = Qt; |
| 5012 | buffer_defaults.auto_fill_function = Qnil; | 5018 | B_ (&buffer_defaults, auto_fill_function) = Qnil; |
| 5013 | buffer_defaults.selective_display = Qnil; | 5019 | B_ (&buffer_defaults, selective_display) = Qnil; |
| 5014 | #ifndef old | 5020 | #ifndef old |
| 5015 | buffer_defaults.selective_display_ellipses = Qt; | 5021 | B_ (&buffer_defaults, selective_display_ellipses) = Qt; |
| 5016 | #endif | 5022 | #endif |
| 5017 | buffer_defaults.abbrev_table = Qnil; | 5023 | B_ (&buffer_defaults, abbrev_table) = Qnil; |
| 5018 | buffer_defaults.display_table = Qnil; | 5024 | B_ (&buffer_defaults, display_table) = Qnil; |
| 5019 | buffer_defaults.undo_list = Qnil; | 5025 | B_ (&buffer_defaults, undo_list) = Qnil; |
| 5020 | buffer_defaults.mark_active = Qnil; | 5026 | B_ (&buffer_defaults, mark_active) = Qnil; |
| 5021 | buffer_defaults.file_format = Qnil; | 5027 | B_ (&buffer_defaults, file_format) = Qnil; |
| 5022 | buffer_defaults.auto_save_file_format = Qt; | 5028 | B_ (&buffer_defaults, auto_save_file_format) = Qt; |
| 5023 | buffer_defaults.overlays_before = NULL; | 5029 | buffer_defaults.overlays_before = NULL; |
| 5024 | buffer_defaults.overlays_after = NULL; | 5030 | buffer_defaults.overlays_after = NULL; |
| 5025 | buffer_defaults.overlay_center = BEG; | 5031 | buffer_defaults.overlay_center = BEG; |
| 5026 | 5032 | ||
| 5027 | XSETFASTINT (buffer_defaults.tab_width, 8); | 5033 | XSETFASTINT (B_ (&buffer_defaults, tab_width), 8); |
| 5028 | buffer_defaults.truncate_lines = Qnil; | 5034 | B_ (&buffer_defaults, truncate_lines) = Qnil; |
| 5029 | buffer_defaults.word_wrap = Qnil; | 5035 | B_ (&buffer_defaults, word_wrap) = Qnil; |
| 5030 | buffer_defaults.ctl_arrow = Qt; | 5036 | B_ (&buffer_defaults, ctl_arrow) = Qt; |
| 5031 | buffer_defaults.bidi_display_reordering = Qnil; | 5037 | B_ (&buffer_defaults, bidi_display_reordering) = Qnil; |
| 5032 | buffer_defaults.bidi_paragraph_direction = Qnil; | 5038 | B_ (&buffer_defaults, bidi_paragraph_direction) = Qnil; |
| 5033 | buffer_defaults.cursor_type = Qt; | 5039 | B_ (&buffer_defaults, cursor_type) = Qt; |
| 5034 | buffer_defaults.extra_line_spacing = Qnil; | 5040 | B_ (&buffer_defaults, extra_line_spacing) = Qnil; |
| 5035 | buffer_defaults.cursor_in_non_selected_windows = Qt; | 5041 | B_ (&buffer_defaults, cursor_in_non_selected_windows) = Qt; |
| 5036 | 5042 | ||
| 5037 | #ifdef DOS_NT | 5043 | #ifdef DOS_NT |
| 5038 | buffer_defaults.buffer_file_type = Qnil; /* TEXT */ | 5044 | buffer_defaults.buffer_file_type = Qnil; /* TEXT */ |
| 5039 | #endif | 5045 | #endif |
| 5040 | buffer_defaults.enable_multibyte_characters = Qt; | 5046 | B_ (&buffer_defaults, enable_multibyte_characters) = Qt; |
| 5041 | buffer_defaults.buffer_file_coding_system = Qnil; | 5047 | B_ (&buffer_defaults, buffer_file_coding_system) = Qnil; |
| 5042 | XSETFASTINT (buffer_defaults.fill_column, 70); | 5048 | XSETFASTINT (B_ (&buffer_defaults, fill_column), 70); |
| 5043 | XSETFASTINT (buffer_defaults.left_margin, 0); | 5049 | XSETFASTINT (B_ (&buffer_defaults, left_margin), 0); |
| 5044 | buffer_defaults.cache_long_line_scans = Qnil; | 5050 | B_ (&buffer_defaults, cache_long_line_scans) = Qnil; |
| 5045 | buffer_defaults.file_truename = Qnil; | 5051 | B_ (&buffer_defaults, file_truename) = Qnil; |
| 5046 | XSETFASTINT (buffer_defaults.display_count, 0); | 5052 | XSETFASTINT (B_ (&buffer_defaults, display_count), 0); |
| 5047 | XSETFASTINT (buffer_defaults.left_margin_cols, 0); | 5053 | XSETFASTINT (B_ (&buffer_defaults, left_margin_cols), 0); |
| 5048 | XSETFASTINT (buffer_defaults.right_margin_cols, 0); | 5054 | XSETFASTINT (B_ (&buffer_defaults, right_margin_cols), 0); |
| 5049 | buffer_defaults.left_fringe_width = Qnil; | 5055 | B_ (&buffer_defaults, left_fringe_width) = Qnil; |
| 5050 | buffer_defaults.right_fringe_width = Qnil; | 5056 | B_ (&buffer_defaults, right_fringe_width) = Qnil; |
| 5051 | buffer_defaults.fringes_outside_margins = Qnil; | 5057 | B_ (&buffer_defaults, fringes_outside_margins) = Qnil; |
| 5052 | buffer_defaults.scroll_bar_width = Qnil; | 5058 | B_ (&buffer_defaults, scroll_bar_width) = Qnil; |
| 5053 | buffer_defaults.vertical_scroll_bar_type = Qt; | 5059 | B_ (&buffer_defaults, vertical_scroll_bar_type) = Qt; |
| 5054 | buffer_defaults.indicate_empty_lines = Qnil; | 5060 | B_ (&buffer_defaults, indicate_empty_lines) = Qnil; |
| 5055 | buffer_defaults.indicate_buffer_boundaries = Qnil; | 5061 | B_ (&buffer_defaults, indicate_buffer_boundaries) = Qnil; |
| 5056 | buffer_defaults.fringe_indicator_alist = Qnil; | 5062 | B_ (&buffer_defaults, fringe_indicator_alist) = Qnil; |
| 5057 | buffer_defaults.fringe_cursor_alist = Qnil; | 5063 | B_ (&buffer_defaults, fringe_cursor_alist) = Qnil; |
| 5058 | buffer_defaults.scroll_up_aggressively = Qnil; | 5064 | B_ (&buffer_defaults, scroll_up_aggressively) = Qnil; |
| 5059 | buffer_defaults.scroll_down_aggressively = Qnil; | 5065 | B_ (&buffer_defaults, scroll_down_aggressively) = Qnil; |
| 5060 | buffer_defaults.display_time = Qnil; | 5066 | B_ (&buffer_defaults, display_time) = Qnil; |
| 5061 | 5067 | ||
| 5062 | /* Assign the local-flags to the slots that have default values. | 5068 | /* Assign the local-flags to the slots that have default values. |
| 5063 | The local flag is a bit that is used in the buffer | 5069 | The local flag is a bit that is used in the buffer |
| @@ -5069,73 +5075,73 @@ init_buffer_once (void) | |||
| 5069 | 5075 | ||
| 5070 | /* 0 means not a lisp var, -1 means always local, else mask */ | 5076 | /* 0 means not a lisp var, -1 means always local, else mask */ |
| 5071 | memset (&buffer_local_flags, 0, sizeof buffer_local_flags); | 5077 | memset (&buffer_local_flags, 0, sizeof buffer_local_flags); |
| 5072 | XSETINT (buffer_local_flags.filename, -1); | 5078 | XSETINT (B_ (&buffer_local_flags, filename), -1); |
| 5073 | XSETINT (buffer_local_flags.directory, -1); | 5079 | XSETINT (B_ (&buffer_local_flags, directory), -1); |
| 5074 | XSETINT (buffer_local_flags.backed_up, -1); | 5080 | XSETINT (B_ (&buffer_local_flags, backed_up), -1); |
| 5075 | XSETINT (buffer_local_flags.save_length, -1); | 5081 | XSETINT (B_ (&buffer_local_flags, save_length), -1); |
| 5076 | XSETINT (buffer_local_flags.auto_save_file_name, -1); | 5082 | XSETINT (B_ (&buffer_local_flags, auto_save_file_name), -1); |
| 5077 | XSETINT (buffer_local_flags.read_only, -1); | 5083 | XSETINT (B_ (&buffer_local_flags, read_only), -1); |
| 5078 | XSETINT (buffer_local_flags.major_mode, -1); | 5084 | XSETINT (B_ (&buffer_local_flags, major_mode), -1); |
| 5079 | XSETINT (buffer_local_flags.mode_name, -1); | 5085 | XSETINT (B_ (&buffer_local_flags, mode_name), -1); |
| 5080 | XSETINT (buffer_local_flags.undo_list, -1); | 5086 | XSETINT (B_ (&buffer_local_flags, undo_list), -1); |
| 5081 | XSETINT (buffer_local_flags.mark_active, -1); | 5087 | XSETINT (B_ (&buffer_local_flags, mark_active), -1); |
| 5082 | XSETINT (buffer_local_flags.point_before_scroll, -1); | 5088 | XSETINT (B_ (&buffer_local_flags, point_before_scroll), -1); |
| 5083 | XSETINT (buffer_local_flags.file_truename, -1); | 5089 | XSETINT (B_ (&buffer_local_flags, file_truename), -1); |
| 5084 | XSETINT (buffer_local_flags.invisibility_spec, -1); | 5090 | XSETINT (B_ (&buffer_local_flags, invisibility_spec), -1); |
| 5085 | XSETINT (buffer_local_flags.file_format, -1); | 5091 | XSETINT (B_ (&buffer_local_flags, file_format), -1); |
| 5086 | XSETINT (buffer_local_flags.auto_save_file_format, -1); | 5092 | XSETINT (B_ (&buffer_local_flags, auto_save_file_format), -1); |
| 5087 | XSETINT (buffer_local_flags.display_count, -1); | 5093 | XSETINT (B_ (&buffer_local_flags, display_count), -1); |
| 5088 | XSETINT (buffer_local_flags.display_time, -1); | 5094 | XSETINT (B_ (&buffer_local_flags, display_time), -1); |
| 5089 | XSETINT (buffer_local_flags.enable_multibyte_characters, -1); | 5095 | XSETINT (B_ (&buffer_local_flags, enable_multibyte_characters), -1); |
| 5090 | 5096 | ||
| 5091 | idx = 1; | 5097 | idx = 1; |
| 5092 | XSETFASTINT (buffer_local_flags.mode_line_format, idx); ++idx; | 5098 | XSETFASTINT (B_ (&buffer_local_flags, mode_line_format), idx); ++idx; |
| 5093 | XSETFASTINT (buffer_local_flags.abbrev_mode, idx); ++idx; | 5099 | XSETFASTINT (B_ (&buffer_local_flags, abbrev_mode), idx); ++idx; |
| 5094 | XSETFASTINT (buffer_local_flags.overwrite_mode, idx); ++idx; | 5100 | XSETFASTINT (B_ (&buffer_local_flags, overwrite_mode), idx); ++idx; |
| 5095 | XSETFASTINT (buffer_local_flags.case_fold_search, idx); ++idx; | 5101 | XSETFASTINT (B_ (&buffer_local_flags, case_fold_search), idx); ++idx; |
| 5096 | XSETFASTINT (buffer_local_flags.auto_fill_function, idx); ++idx; | 5102 | XSETFASTINT (B_ (&buffer_local_flags, auto_fill_function), idx); ++idx; |
| 5097 | XSETFASTINT (buffer_local_flags.selective_display, idx); ++idx; | 5103 | XSETFASTINT (B_ (&buffer_local_flags, selective_display), idx); ++idx; |
| 5098 | #ifndef old | 5104 | #ifndef old |
| 5099 | XSETFASTINT (buffer_local_flags.selective_display_ellipses, idx); ++idx; | 5105 | XSETFASTINT (B_ (&buffer_local_flags, selective_display_ellipses), idx); ++idx; |
| 5100 | #endif | 5106 | #endif |
| 5101 | XSETFASTINT (buffer_local_flags.tab_width, idx); ++idx; | 5107 | XSETFASTINT (B_ (&buffer_local_flags, tab_width), idx); ++idx; |
| 5102 | XSETFASTINT (buffer_local_flags.truncate_lines, idx); ++idx; | 5108 | XSETFASTINT (B_ (&buffer_local_flags, truncate_lines), idx); ++idx; |
| 5103 | XSETFASTINT (buffer_local_flags.word_wrap, idx); ++idx; | 5109 | XSETFASTINT (B_ (&buffer_local_flags, word_wrap), idx); ++idx; |
| 5104 | XSETFASTINT (buffer_local_flags.ctl_arrow, idx); ++idx; | 5110 | XSETFASTINT (B_ (&buffer_local_flags, ctl_arrow), idx); ++idx; |
| 5105 | XSETFASTINT (buffer_local_flags.fill_column, idx); ++idx; | 5111 | XSETFASTINT (B_ (&buffer_local_flags, fill_column), idx); ++idx; |
| 5106 | XSETFASTINT (buffer_local_flags.left_margin, idx); ++idx; | 5112 | XSETFASTINT (B_ (&buffer_local_flags, left_margin), idx); ++idx; |
| 5107 | XSETFASTINT (buffer_local_flags.abbrev_table, idx); ++idx; | 5113 | XSETFASTINT (B_ (&buffer_local_flags, abbrev_table), idx); ++idx; |
| 5108 | XSETFASTINT (buffer_local_flags.display_table, idx); ++idx; | 5114 | XSETFASTINT (B_ (&buffer_local_flags, display_table), idx); ++idx; |
| 5109 | #ifdef DOS_NT | 5115 | #ifdef DOS_NT |
| 5110 | XSETFASTINT (buffer_local_flags.buffer_file_type, idx); | 5116 | XSETFASTINT (buffer_local_flags.buffer_file_type, idx); |
| 5111 | /* Make this one a permanent local. */ | 5117 | /* Make this one a permanent local. */ |
| 5112 | buffer_permanent_local_flags[idx++] = 1; | 5118 | buffer_permanent_local_flags[idx++] = 1; |
| 5113 | #endif | 5119 | #endif |
| 5114 | XSETFASTINT (buffer_local_flags.syntax_table, idx); ++idx; | 5120 | XSETFASTINT (B_ (&buffer_local_flags, syntax_table), idx); ++idx; |
| 5115 | XSETFASTINT (buffer_local_flags.cache_long_line_scans, idx); ++idx; | 5121 | XSETFASTINT (B_ (&buffer_local_flags, cache_long_line_scans), idx); ++idx; |
| 5116 | XSETFASTINT (buffer_local_flags.category_table, idx); ++idx; | 5122 | XSETFASTINT (B_ (&buffer_local_flags, category_table), idx); ++idx; |
| 5117 | XSETFASTINT (buffer_local_flags.bidi_display_reordering, idx); ++idx; | 5123 | XSETFASTINT (B_ (&buffer_local_flags, bidi_display_reordering), idx); ++idx; |
| 5118 | XSETFASTINT (buffer_local_flags.bidi_paragraph_direction, idx); ++idx; | 5124 | XSETFASTINT (B_ (&buffer_local_flags, bidi_paragraph_direction), idx); ++idx; |
| 5119 | XSETFASTINT (buffer_local_flags.buffer_file_coding_system, idx); | 5125 | XSETFASTINT (B_ (&buffer_local_flags, buffer_file_coding_system), idx); |
| 5120 | /* Make this one a permanent local. */ | 5126 | /* Make this one a permanent local. */ |
| 5121 | buffer_permanent_local_flags[idx++] = 1; | 5127 | buffer_permanent_local_flags[idx++] = 1; |
| 5122 | XSETFASTINT (buffer_local_flags.left_margin_cols, idx); ++idx; | 5128 | XSETFASTINT (B_ (&buffer_local_flags, left_margin_cols), idx); ++idx; |
| 5123 | XSETFASTINT (buffer_local_flags.right_margin_cols, idx); ++idx; | 5129 | XSETFASTINT (B_ (&buffer_local_flags, right_margin_cols), idx); ++idx; |
| 5124 | XSETFASTINT (buffer_local_flags.left_fringe_width, idx); ++idx; | 5130 | XSETFASTINT (B_ (&buffer_local_flags, left_fringe_width), idx); ++idx; |
| 5125 | XSETFASTINT (buffer_local_flags.right_fringe_width, idx); ++idx; | 5131 | XSETFASTINT (B_ (&buffer_local_flags, right_fringe_width), idx); ++idx; |
| 5126 | XSETFASTINT (buffer_local_flags.fringes_outside_margins, idx); ++idx; | 5132 | XSETFASTINT (B_ (&buffer_local_flags, fringes_outside_margins), idx); ++idx; |
| 5127 | XSETFASTINT (buffer_local_flags.scroll_bar_width, idx); ++idx; | 5133 | XSETFASTINT (B_ (&buffer_local_flags, scroll_bar_width), idx); ++idx; |
| 5128 | XSETFASTINT (buffer_local_flags.vertical_scroll_bar_type, idx); ++idx; | 5134 | XSETFASTINT (B_ (&buffer_local_flags, vertical_scroll_bar_type), idx); ++idx; |
| 5129 | XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx; | 5135 | XSETFASTINT (B_ (&buffer_local_flags, indicate_empty_lines), idx); ++idx; |
| 5130 | XSETFASTINT (buffer_local_flags.indicate_buffer_boundaries, idx); ++idx; | 5136 | XSETFASTINT (B_ (&buffer_local_flags, indicate_buffer_boundaries), idx); ++idx; |
| 5131 | XSETFASTINT (buffer_local_flags.fringe_indicator_alist, idx); ++idx; | 5137 | XSETFASTINT (B_ (&buffer_local_flags, fringe_indicator_alist), idx); ++idx; |
| 5132 | XSETFASTINT (buffer_local_flags.fringe_cursor_alist, idx); ++idx; | 5138 | XSETFASTINT (B_ (&buffer_local_flags, fringe_cursor_alist), idx); ++idx; |
| 5133 | XSETFASTINT (buffer_local_flags.scroll_up_aggressively, idx); ++idx; | 5139 | XSETFASTINT (B_ (&buffer_local_flags, scroll_up_aggressively), idx); ++idx; |
| 5134 | XSETFASTINT (buffer_local_flags.scroll_down_aggressively, idx); ++idx; | 5140 | XSETFASTINT (B_ (&buffer_local_flags, scroll_down_aggressively), idx); ++idx; |
| 5135 | XSETFASTINT (buffer_local_flags.header_line_format, idx); ++idx; | 5141 | XSETFASTINT (B_ (&buffer_local_flags, header_line_format), idx); ++idx; |
| 5136 | XSETFASTINT (buffer_local_flags.cursor_type, idx); ++idx; | 5142 | XSETFASTINT (B_ (&buffer_local_flags, cursor_type), idx); ++idx; |
| 5137 | XSETFASTINT (buffer_local_flags.extra_line_spacing, idx); ++idx; | 5143 | XSETFASTINT (B_ (&buffer_local_flags, extra_line_spacing), idx); ++idx; |
| 5138 | XSETFASTINT (buffer_local_flags.cursor_in_non_selected_windows, idx); ++idx; | 5144 | XSETFASTINT (B_ (&buffer_local_flags, cursor_in_non_selected_windows), idx); ++idx; |
| 5139 | 5145 | ||
| 5140 | /* Need more room? */ | 5146 | /* Need more room? */ |
| 5141 | if (idx >= MAX_PER_BUFFER_VARS) | 5147 | if (idx >= MAX_PER_BUFFER_VARS) |
| @@ -5149,7 +5155,7 @@ init_buffer_once (void) | |||
| 5149 | QSFundamental = make_pure_c_string ("Fundamental"); | 5155 | QSFundamental = make_pure_c_string ("Fundamental"); |
| 5150 | 5156 | ||
| 5151 | Qfundamental_mode = intern_c_string ("fundamental-mode"); | 5157 | Qfundamental_mode = intern_c_string ("fundamental-mode"); |
| 5152 | buffer_defaults.major_mode = Qfundamental_mode; | 5158 | B_ (&buffer_defaults, major_mode) = Qfundamental_mode; |
| 5153 | 5159 | ||
| 5154 | Qmode_class = intern_c_string ("mode-class"); | 5160 | Qmode_class = intern_c_string ("mode-class"); |
| 5155 | 5161 | ||
| @@ -5192,7 +5198,7 @@ init_buffer (void) | |||
| 5192 | #endif /* USE_MMAP_FOR_BUFFERS */ | 5198 | #endif /* USE_MMAP_FOR_BUFFERS */ |
| 5193 | 5199 | ||
| 5194 | Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); | 5200 | Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); |
| 5195 | if (NILP (buffer_defaults.enable_multibyte_characters)) | 5201 | if (NILP (B_ (&buffer_defaults, enable_multibyte_characters))) |
| 5196 | Fset_buffer_multibyte (Qnil); | 5202 | Fset_buffer_multibyte (Qnil); |
| 5197 | 5203 | ||
| 5198 | pwd = get_current_dir_name (); | 5204 | pwd = get_current_dir_name (); |
| @@ -5213,28 +5219,28 @@ init_buffer (void) | |||
| 5213 | pwd[len + 1] = '\0'; | 5219 | pwd[len + 1] = '\0'; |
| 5214 | } | 5220 | } |
| 5215 | 5221 | ||
| 5216 | current_buffer->directory = make_unibyte_string (pwd, strlen (pwd)); | 5222 | B_ (current_buffer, directory) = make_unibyte_string (pwd, strlen (pwd)); |
| 5217 | if (! NILP (buffer_defaults.enable_multibyte_characters)) | 5223 | if (! NILP (B_ (&buffer_defaults, enable_multibyte_characters))) |
| 5218 | /* At this moment, we still don't know how to decode the | 5224 | /* At this moment, we still don't know how to decode the |
| 5219 | directory name. So, we keep the bytes in multibyte form so | 5225 | directory name. So, we keep the bytes in multibyte form so |
| 5220 | that ENCODE_FILE correctly gets the original bytes. */ | 5226 | that ENCODE_FILE correctly gets the original bytes. */ |
| 5221 | current_buffer->directory | 5227 | B_ (current_buffer, directory) |
| 5222 | = string_to_multibyte (current_buffer->directory); | 5228 | = string_to_multibyte (B_ (current_buffer, directory)); |
| 5223 | 5229 | ||
| 5224 | /* Add /: to the front of the name | 5230 | /* Add /: to the front of the name |
| 5225 | if it would otherwise be treated as magic. */ | 5231 | if it would otherwise be treated as magic. */ |
| 5226 | temp = Ffind_file_name_handler (current_buffer->directory, Qt); | 5232 | temp = Ffind_file_name_handler (B_ (current_buffer, directory), Qt); |
| 5227 | if (! NILP (temp) | 5233 | if (! NILP (temp) |
| 5228 | /* If the default dir is just /, TEMP is non-nil | 5234 | /* If the default dir is just /, TEMP is non-nil |
| 5229 | because of the ange-ftp completion handler. | 5235 | because of the ange-ftp completion handler. |
| 5230 | However, it is not necessary to turn / into /:/. | 5236 | However, it is not necessary to turn / into /:/. |
| 5231 | So avoid doing that. */ | 5237 | So avoid doing that. */ |
| 5232 | && strcmp ("/", SSDATA (current_buffer->directory))) | 5238 | && strcmp ("/", SSDATA (B_ (current_buffer, directory)))) |
| 5233 | current_buffer->directory | 5239 | B_ (current_buffer, directory) |
| 5234 | = concat2 (build_string ("/:"), current_buffer->directory); | 5240 | = concat2 (build_string ("/:"), B_ (current_buffer, directory)); |
| 5235 | 5241 | ||
| 5236 | temp = get_minibuffer (0); | 5242 | temp = get_minibuffer (0); |
| 5237 | XBUFFER (temp)->directory = current_buffer->directory; | 5243 | B_ (XBUFFER (temp), directory) = B_ (current_buffer, directory); |
| 5238 | 5244 | ||
| 5239 | free (pwd); | 5245 | free (pwd); |
| 5240 | } | 5246 | } |
| @@ -5485,13 +5491,13 @@ This value applies in buffers that don't have their own local values. | |||
| 5485 | This is the same as (default-value 'scroll-down-aggressively). */); | 5491 | This is the same as (default-value 'scroll-down-aggressively). */); |
| 5486 | 5492 | ||
| 5487 | DEFVAR_PER_BUFFER ("header-line-format", | 5493 | DEFVAR_PER_BUFFER ("header-line-format", |
| 5488 | ¤t_buffer->header_line_format, | 5494 | &B_ (current_buffer, header_line_format), |
| 5489 | Qnil, | 5495 | Qnil, |
| 5490 | doc: /* Analogous to `mode-line-format', but controls the header line. | 5496 | doc: /* Analogous to `mode-line-format', but controls the header line. |
| 5491 | The header line appears, optionally, at the top of a window; | 5497 | The header line appears, optionally, at the top of a window; |
| 5492 | the mode line appears at the bottom. */); | 5498 | the mode line appears at the bottom. */); |
| 5493 | 5499 | ||
| 5494 | DEFVAR_PER_BUFFER ("mode-line-format", ¤t_buffer->mode_line_format, | 5500 | DEFVAR_PER_BUFFER ("mode-line-format", &B_ (current_buffer, mode_line_format), |
| 5495 | Qnil, | 5501 | Qnil, |
| 5496 | doc: /* Template for displaying mode line for current buffer. | 5502 | doc: /* Template for displaying mode line for current buffer. |
| 5497 | Each buffer has its own value of this variable. | 5503 | Each buffer has its own value of this variable. |
| @@ -5548,7 +5554,7 @@ Decimal digits after the % specify field width to which to pad. */); | |||
| 5548 | DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode, | 5554 | DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode, |
| 5549 | doc: /* *Value of `major-mode' for new buffers. */); | 5555 | doc: /* *Value of `major-mode' for new buffers. */); |
| 5550 | 5556 | ||
| 5551 | DEFVAR_PER_BUFFER ("major-mode", ¤t_buffer->major_mode, | 5557 | DEFVAR_PER_BUFFER ("major-mode", &B_ (current_buffer, major_mode), |
| 5552 | make_number (Lisp_Symbol), | 5558 | make_number (Lisp_Symbol), |
| 5553 | doc: /* Symbol for current buffer's major mode. | 5559 | doc: /* Symbol for current buffer's major mode. |
| 5554 | The default value (normally `fundamental-mode') affects new buffers. | 5560 | The default value (normally `fundamental-mode') affects new buffers. |
| @@ -5561,46 +5567,46 @@ the buffer. Thus, the mode and its hooks should not expect certain | |||
| 5561 | variables such as `buffer-read-only' and `buffer-file-coding-system' | 5567 | variables such as `buffer-read-only' and `buffer-file-coding-system' |
| 5562 | to be set up. */); | 5568 | to be set up. */); |
| 5563 | 5569 | ||
| 5564 | DEFVAR_PER_BUFFER ("mode-name", ¤t_buffer->mode_name, | 5570 | DEFVAR_PER_BUFFER ("mode-name", &B_ (current_buffer, mode_name), |
| 5565 | Qnil, | 5571 | Qnil, |
| 5566 | doc: /* Pretty name of current buffer's major mode. | 5572 | doc: /* Pretty name of current buffer's major mode. |
| 5567 | Usually a string, but can use any of the constructs for `mode-line-format', | 5573 | Usually a string, but can use any of the constructs for `mode-line-format', |
| 5568 | which see. | 5574 | which see. |
| 5569 | Format with `format-mode-line' to produce a string value. */); | 5575 | Format with `format-mode-line' to produce a string value. */); |
| 5570 | 5576 | ||
| 5571 | DEFVAR_PER_BUFFER ("local-abbrev-table", ¤t_buffer->abbrev_table, Qnil, | 5577 | DEFVAR_PER_BUFFER ("local-abbrev-table", &B_ (current_buffer, abbrev_table), Qnil, |
| 5572 | doc: /* Local (mode-specific) abbrev table of current buffer. */); | 5578 | doc: /* Local (mode-specific) abbrev table of current buffer. */); |
| 5573 | 5579 | ||
| 5574 | DEFVAR_PER_BUFFER ("abbrev-mode", ¤t_buffer->abbrev_mode, Qnil, | 5580 | DEFVAR_PER_BUFFER ("abbrev-mode", &B_ (current_buffer, abbrev_mode), Qnil, |
| 5575 | doc: /* Non-nil if Abbrev mode is enabled. | 5581 | doc: /* Non-nil if Abbrev mode is enabled. |
| 5576 | Use the command `abbrev-mode' to change this variable. */); | 5582 | Use the command `abbrev-mode' to change this variable. */); |
| 5577 | 5583 | ||
| 5578 | DEFVAR_PER_BUFFER ("case-fold-search", ¤t_buffer->case_fold_search, | 5584 | DEFVAR_PER_BUFFER ("case-fold-search", &B_ (current_buffer, case_fold_search), |
| 5579 | Qnil, | 5585 | Qnil, |
| 5580 | doc: /* *Non-nil if searches and matches should ignore case. */); | 5586 | doc: /* *Non-nil if searches and matches should ignore case. */); |
| 5581 | 5587 | ||
| 5582 | DEFVAR_PER_BUFFER ("fill-column", ¤t_buffer->fill_column, | 5588 | DEFVAR_PER_BUFFER ("fill-column", &B_ (current_buffer, fill_column), |
| 5583 | make_number (LISP_INT_TAG), | 5589 | make_number (LISP_INT_TAG), |
| 5584 | doc: /* *Column beyond which automatic line-wrapping should happen. | 5590 | doc: /* *Column beyond which automatic line-wrapping should happen. |
| 5585 | Interactively, you can set the buffer local value using \\[set-fill-column]. */); | 5591 | Interactively, you can set the buffer local value using \\[set-fill-column]. */); |
| 5586 | 5592 | ||
| 5587 | DEFVAR_PER_BUFFER ("left-margin", ¤t_buffer->left_margin, | 5593 | DEFVAR_PER_BUFFER ("left-margin", &B_ (current_buffer, left_margin), |
| 5588 | make_number (LISP_INT_TAG), | 5594 | make_number (LISP_INT_TAG), |
| 5589 | doc: /* *Column for the default `indent-line-function' to indent to. | 5595 | doc: /* *Column for the default `indent-line-function' to indent to. |
| 5590 | Linefeed indents to this column in Fundamental mode. */); | 5596 | Linefeed indents to this column in Fundamental mode. */); |
| 5591 | 5597 | ||
| 5592 | DEFVAR_PER_BUFFER ("tab-width", ¤t_buffer->tab_width, | 5598 | DEFVAR_PER_BUFFER ("tab-width", &B_ (current_buffer, tab_width), |
| 5593 | make_number (LISP_INT_TAG), | 5599 | make_number (LISP_INT_TAG), |
| 5594 | doc: /* *Distance between tab stops (for display of tab characters), in columns. */); | 5600 | doc: /* *Distance between tab stops (for display of tab characters), in columns. */); |
| 5595 | 5601 | ||
| 5596 | DEFVAR_PER_BUFFER ("ctl-arrow", ¤t_buffer->ctl_arrow, Qnil, | 5602 | DEFVAR_PER_BUFFER ("ctl-arrow", &B_ (current_buffer, ctl_arrow), Qnil, |
| 5597 | doc: /* *Non-nil means display control chars with uparrow. | 5603 | doc: /* *Non-nil means display control chars with uparrow. |
| 5598 | A value of nil means use backslash and octal digits. | 5604 | A value of nil means use backslash and octal digits. |
| 5599 | This variable does not apply to characters whose display is specified | 5605 | This variable does not apply to characters whose display is specified |
| 5600 | in the current display table (if there is one). */); | 5606 | in the current display table (if there is one). */); |
| 5601 | 5607 | ||
| 5602 | DEFVAR_PER_BUFFER ("enable-multibyte-characters", | 5608 | DEFVAR_PER_BUFFER ("enable-multibyte-characters", |
| 5603 | ¤t_buffer->enable_multibyte_characters, | 5609 | &B_ (current_buffer, enable_multibyte_characters), |
| 5604 | Qnil, | 5610 | Qnil, |
| 5605 | doc: /* Non-nil means the buffer contents are regarded as multi-byte characters. | 5611 | doc: /* Non-nil means the buffer contents are regarded as multi-byte characters. |
| 5606 | Otherwise they are regarded as unibyte. This affects the display, | 5612 | Otherwise they are regarded as unibyte. This affects the display, |
| @@ -5614,7 +5620,7 @@ See also variable `default-enable-multibyte-characters' and Info node | |||
| 5614 | XSYMBOL (intern_c_string ("enable-multibyte-characters"))->constant = 1; | 5620 | XSYMBOL (intern_c_string ("enable-multibyte-characters"))->constant = 1; |
| 5615 | 5621 | ||
| 5616 | DEFVAR_PER_BUFFER ("buffer-file-coding-system", | 5622 | DEFVAR_PER_BUFFER ("buffer-file-coding-system", |
| 5617 | ¤t_buffer->buffer_file_coding_system, Qnil, | 5623 | &B_ (current_buffer, buffer_file_coding_system), Qnil, |
| 5618 | doc: /* Coding system to be used for encoding the buffer contents on saving. | 5624 | doc: /* Coding system to be used for encoding the buffer contents on saving. |
| 5619 | This variable applies to saving the buffer, and also to `write-region' | 5625 | This variable applies to saving the buffer, and also to `write-region' |
| 5620 | and other functions that use `write-region'. | 5626 | and other functions that use `write-region'. |
| @@ -5632,11 +5638,11 @@ The variable `coding-system-for-write', if non-nil, overrides this variable. | |||
| 5632 | This variable is never applied to a way of decoding a file while reading it. */); | 5638 | This variable is never applied to a way of decoding a file while reading it. */); |
| 5633 | 5639 | ||
| 5634 | DEFVAR_PER_BUFFER ("bidi-display-reordering", | 5640 | DEFVAR_PER_BUFFER ("bidi-display-reordering", |
| 5635 | ¤t_buffer->bidi_display_reordering, Qnil, | 5641 | &B_ (current_buffer, bidi_display_reordering), Qnil, |
| 5636 | doc: /* Non-nil means reorder bidirectional text for display in the visual order. */); | 5642 | doc: /* Non-nil means reorder bidirectional text for display in the visual order. */); |
| 5637 | 5643 | ||
| 5638 | DEFVAR_PER_BUFFER ("bidi-paragraph-direction", | 5644 | DEFVAR_PER_BUFFER ("bidi-paragraph-direction", |
| 5639 | ¤t_buffer->bidi_paragraph_direction, Qnil, | 5645 | &B_ (current_buffer, bidi_paragraph_direction), Qnil, |
| 5640 | doc: /* *If non-nil, forces directionality of text paragraphs in the buffer. | 5646 | doc: /* *If non-nil, forces directionality of text paragraphs in the buffer. |
| 5641 | 5647 | ||
| 5642 | If this is nil (the default), the direction of each paragraph is | 5648 | If this is nil (the default), the direction of each paragraph is |
| @@ -5647,7 +5653,7 @@ Any other value is treated as nil. | |||
| 5647 | This variable has no effect unless the buffer's value of | 5653 | This variable has no effect unless the buffer's value of |
| 5648 | \`bidi-display-reordering' is non-nil. */); | 5654 | \`bidi-display-reordering' is non-nil. */); |
| 5649 | 5655 | ||
| 5650 | DEFVAR_PER_BUFFER ("truncate-lines", ¤t_buffer->truncate_lines, Qnil, | 5656 | DEFVAR_PER_BUFFER ("truncate-lines", &B_ (current_buffer, truncate_lines), Qnil, |
| 5651 | doc: /* *Non-nil means do not display continuation lines. | 5657 | doc: /* *Non-nil means do not display continuation lines. |
| 5652 | Instead, give each line of text just one screen line. | 5658 | Instead, give each line of text just one screen line. |
| 5653 | 5659 | ||
| @@ -5655,7 +5661,7 @@ Note that this is overridden by the variable | |||
| 5655 | `truncate-partial-width-windows' if that variable is non-nil | 5661 | `truncate-partial-width-windows' if that variable is non-nil |
| 5656 | and this buffer is not full-frame width. */); | 5662 | and this buffer is not full-frame width. */); |
| 5657 | 5663 | ||
| 5658 | DEFVAR_PER_BUFFER ("word-wrap", ¤t_buffer->word_wrap, Qnil, | 5664 | DEFVAR_PER_BUFFER ("word-wrap", &B_ (current_buffer, word_wrap), Qnil, |
| 5659 | doc: /* *Non-nil means to use word-wrapping for continuation lines. | 5665 | doc: /* *Non-nil means to use word-wrapping for continuation lines. |
| 5660 | When word-wrapping is on, continuation lines are wrapped at the space | 5666 | When word-wrapping is on, continuation lines are wrapped at the space |
| 5661 | or tab character nearest to the right window edge. | 5667 | or tab character nearest to the right window edge. |
| @@ -5676,12 +5682,12 @@ On those systems, it is automatically local in every buffer. | |||
| 5676 | On other systems, this variable is normally always nil. */); | 5682 | On other systems, this variable is normally always nil. */); |
| 5677 | #endif | 5683 | #endif |
| 5678 | 5684 | ||
| 5679 | DEFVAR_PER_BUFFER ("default-directory", ¤t_buffer->directory, | 5685 | DEFVAR_PER_BUFFER ("default-directory", &B_ (current_buffer, directory), |
| 5680 | make_number (Lisp_String), | 5686 | make_number (Lisp_String), |
| 5681 | doc: /* Name of default directory of current buffer. Should end with slash. | 5687 | doc: /* Name of default directory of current buffer. Should end with slash. |
| 5682 | To interactively change the default directory, use command `cd'. */); | 5688 | To interactively change the default directory, use command `cd'. */); |
| 5683 | 5689 | ||
| 5684 | DEFVAR_PER_BUFFER ("auto-fill-function", ¤t_buffer->auto_fill_function, | 5690 | DEFVAR_PER_BUFFER ("auto-fill-function", &B_ (current_buffer, auto_fill_function), |
| 5685 | Qnil, | 5691 | Qnil, |
| 5686 | doc: /* Function called (if non-nil) to perform auto-fill. | 5692 | doc: /* Function called (if non-nil) to perform auto-fill. |
| 5687 | It is called after self-inserting any character specified in | 5693 | It is called after self-inserting any character specified in |
| @@ -5689,30 +5695,30 @@ the `auto-fill-chars' table. | |||
| 5689 | NOTE: This variable is not a hook; | 5695 | NOTE: This variable is not a hook; |
| 5690 | its value may not be a list of functions. */); | 5696 | its value may not be a list of functions. */); |
| 5691 | 5697 | ||
| 5692 | DEFVAR_PER_BUFFER ("buffer-file-name", ¤t_buffer->filename, | 5698 | DEFVAR_PER_BUFFER ("buffer-file-name", &B_ (current_buffer, filename), |
| 5693 | make_number (Lisp_String), | 5699 | make_number (Lisp_String), |
| 5694 | doc: /* Name of file visited in current buffer, or nil if not visiting a file. */); | 5700 | doc: /* Name of file visited in current buffer, or nil if not visiting a file. */); |
| 5695 | 5701 | ||
| 5696 | DEFVAR_PER_BUFFER ("buffer-file-truename", ¤t_buffer->file_truename, | 5702 | DEFVAR_PER_BUFFER ("buffer-file-truename", &B_ (current_buffer, file_truename), |
| 5697 | make_number (Lisp_String), | 5703 | make_number (Lisp_String), |
| 5698 | doc: /* Abbreviated truename of file visited in current buffer, or nil if none. | 5704 | doc: /* Abbreviated truename of file visited in current buffer, or nil if none. |
| 5699 | The truename of a file is calculated by `file-truename' | 5705 | The truename of a file is calculated by `file-truename' |
| 5700 | and then abbreviated with `abbreviate-file-name'. */); | 5706 | and then abbreviated with `abbreviate-file-name'. */); |
| 5701 | 5707 | ||
| 5702 | DEFVAR_PER_BUFFER ("buffer-auto-save-file-name", | 5708 | DEFVAR_PER_BUFFER ("buffer-auto-save-file-name", |
| 5703 | ¤t_buffer->auto_save_file_name, | 5709 | &B_ (current_buffer, auto_save_file_name), |
| 5704 | make_number (Lisp_String), | 5710 | make_number (Lisp_String), |
| 5705 | doc: /* Name of file for auto-saving current buffer. | 5711 | doc: /* Name of file for auto-saving current buffer. |
| 5706 | If it is nil, that means don't auto-save this buffer. */); | 5712 | If it is nil, that means don't auto-save this buffer. */); |
| 5707 | 5713 | ||
| 5708 | DEFVAR_PER_BUFFER ("buffer-read-only", ¤t_buffer->read_only, Qnil, | 5714 | DEFVAR_PER_BUFFER ("buffer-read-only", &B_ (current_buffer, read_only), Qnil, |
| 5709 | doc: /* Non-nil if this buffer is read-only. */); | 5715 | doc: /* Non-nil if this buffer is read-only. */); |
| 5710 | 5716 | ||
| 5711 | DEFVAR_PER_BUFFER ("buffer-backed-up", ¤t_buffer->backed_up, Qnil, | 5717 | DEFVAR_PER_BUFFER ("buffer-backed-up", &B_ (current_buffer, backed_up), Qnil, |
| 5712 | doc: /* Non-nil if this buffer's file has been backed up. | 5718 | doc: /* Non-nil if this buffer's file has been backed up. |
| 5713 | Backing up is done before the first time the file is saved. */); | 5719 | Backing up is done before the first time the file is saved. */); |
| 5714 | 5720 | ||
| 5715 | DEFVAR_PER_BUFFER ("buffer-saved-size", ¤t_buffer->save_length, | 5721 | DEFVAR_PER_BUFFER ("buffer-saved-size", &B_ (current_buffer, save_length), |
| 5716 | make_number (LISP_INT_TAG), | 5722 | make_number (LISP_INT_TAG), |
| 5717 | doc: /* Length of current buffer when last read in, saved or auto-saved. | 5723 | doc: /* Length of current buffer when last read in, saved or auto-saved. |
| 5718 | 0 initially. | 5724 | 0 initially. |
| @@ -5722,7 +5728,7 @@ If you set this to -2, that means don't turn off auto-saving in this buffer | |||
| 5722 | if its text size shrinks. If you use `buffer-swap-text' on a buffer, | 5728 | if its text size shrinks. If you use `buffer-swap-text' on a buffer, |
| 5723 | you probably should set this to -2 in that buffer. */); | 5729 | you probably should set this to -2 in that buffer. */); |
| 5724 | 5730 | ||
| 5725 | DEFVAR_PER_BUFFER ("selective-display", ¤t_buffer->selective_display, | 5731 | DEFVAR_PER_BUFFER ("selective-display", &B_ (current_buffer, selective_display), |
| 5726 | Qnil, | 5732 | Qnil, |
| 5727 | doc: /* Non-nil enables selective display. | 5733 | doc: /* Non-nil enables selective display. |
| 5728 | An integer N as value means display only lines | 5734 | An integer N as value means display only lines |
| @@ -5733,12 +5739,12 @@ in a file, save the ^M as a newline. */); | |||
| 5733 | 5739 | ||
| 5734 | #ifndef old | 5740 | #ifndef old |
| 5735 | DEFVAR_PER_BUFFER ("selective-display-ellipses", | 5741 | DEFVAR_PER_BUFFER ("selective-display-ellipses", |
| 5736 | ¤t_buffer->selective_display_ellipses, | 5742 | &B_ (current_buffer, selective_display_ellipses), |
| 5737 | Qnil, | 5743 | Qnil, |
| 5738 | doc: /* Non-nil means display ... on previous line when a line is invisible. */); | 5744 | doc: /* Non-nil means display ... on previous line when a line is invisible. */); |
| 5739 | #endif | 5745 | #endif |
| 5740 | 5746 | ||
| 5741 | DEFVAR_PER_BUFFER ("overwrite-mode", ¤t_buffer->overwrite_mode, Qnil, | 5747 | DEFVAR_PER_BUFFER ("overwrite-mode", &B_ (current_buffer, overwrite_mode), Qnil, |
| 5742 | doc: /* Non-nil if self-insertion should replace existing text. | 5748 | doc: /* Non-nil if self-insertion should replace existing text. |
| 5743 | The value should be one of `overwrite-mode-textual', | 5749 | The value should be one of `overwrite-mode-textual', |
| 5744 | `overwrite-mode-binary', or nil. | 5750 | `overwrite-mode-binary', or nil. |
| @@ -5747,7 +5753,7 @@ inserts at the end of a line, and inserts when point is before a tab, | |||
| 5747 | until the tab is filled in. | 5753 | until the tab is filled in. |
| 5748 | If `overwrite-mode-binary', self-insertion replaces newlines and tabs too. */); | 5754 | If `overwrite-mode-binary', self-insertion replaces newlines and tabs too. */); |
| 5749 | 5755 | ||
| 5750 | DEFVAR_PER_BUFFER ("buffer-display-table", ¤t_buffer->display_table, | 5756 | DEFVAR_PER_BUFFER ("buffer-display-table", &B_ (current_buffer, display_table), |
| 5751 | Qnil, | 5757 | Qnil, |
| 5752 | doc: /* Display table that controls display of the contents of current buffer. | 5758 | doc: /* Display table that controls display of the contents of current buffer. |
| 5753 | 5759 | ||
| @@ -5784,39 +5790,39 @@ In addition, a char-table has six extra slots to control the display of: | |||
| 5784 | 5790 | ||
| 5785 | See also the functions `display-table-slot' and `set-display-table-slot'. */); | 5791 | See also the functions `display-table-slot' and `set-display-table-slot'. */); |
| 5786 | 5792 | ||
| 5787 | DEFVAR_PER_BUFFER ("left-margin-width", ¤t_buffer->left_margin_cols, | 5793 | DEFVAR_PER_BUFFER ("left-margin-width", &B_ (current_buffer, left_margin_cols), |
| 5788 | Qnil, | 5794 | Qnil, |
| 5789 | doc: /* *Width of left marginal area for display of a buffer. | 5795 | doc: /* *Width of left marginal area for display of a buffer. |
| 5790 | A value of nil means no marginal area. */); | 5796 | A value of nil means no marginal area. */); |
| 5791 | 5797 | ||
| 5792 | DEFVAR_PER_BUFFER ("right-margin-width", ¤t_buffer->right_margin_cols, | 5798 | DEFVAR_PER_BUFFER ("right-margin-width", &B_ (current_buffer, right_margin_cols), |
| 5793 | Qnil, | 5799 | Qnil, |
| 5794 | doc: /* *Width of right marginal area for display of a buffer. | 5800 | doc: /* *Width of right marginal area for display of a buffer. |
| 5795 | A value of nil means no marginal area. */); | 5801 | A value of nil means no marginal area. */); |
| 5796 | 5802 | ||
| 5797 | DEFVAR_PER_BUFFER ("left-fringe-width", ¤t_buffer->left_fringe_width, | 5803 | DEFVAR_PER_BUFFER ("left-fringe-width", &B_ (current_buffer, left_fringe_width), |
| 5798 | Qnil, | 5804 | Qnil, |
| 5799 | doc: /* *Width of this buffer's left fringe (in pixels). | 5805 | doc: /* *Width of this buffer's left fringe (in pixels). |
| 5800 | A value of 0 means no left fringe is shown in this buffer's window. | 5806 | A value of 0 means no left fringe is shown in this buffer's window. |
| 5801 | A value of nil means to use the left fringe width from the window's frame. */); | 5807 | A value of nil means to use the left fringe width from the window's frame. */); |
| 5802 | 5808 | ||
| 5803 | DEFVAR_PER_BUFFER ("right-fringe-width", ¤t_buffer->right_fringe_width, | 5809 | DEFVAR_PER_BUFFER ("right-fringe-width", &B_ (current_buffer, right_fringe_width), |
| 5804 | Qnil, | 5810 | Qnil, |
| 5805 | doc: /* *Width of this buffer's right fringe (in pixels). | 5811 | doc: /* *Width of this buffer's right fringe (in pixels). |
| 5806 | A value of 0 means no right fringe is shown in this buffer's window. | 5812 | A value of 0 means no right fringe is shown in this buffer's window. |
| 5807 | A value of nil means to use the right fringe width from the window's frame. */); | 5813 | A value of nil means to use the right fringe width from the window's frame. */); |
| 5808 | 5814 | ||
| 5809 | DEFVAR_PER_BUFFER ("fringes-outside-margins", ¤t_buffer->fringes_outside_margins, | 5815 | DEFVAR_PER_BUFFER ("fringes-outside-margins", &B_ (current_buffer, fringes_outside_margins), |
| 5810 | Qnil, | 5816 | Qnil, |
| 5811 | doc: /* *Non-nil means to display fringes outside display margins. | 5817 | doc: /* *Non-nil means to display fringes outside display margins. |
| 5812 | A value of nil means to display fringes between margins and buffer text. */); | 5818 | A value of nil means to display fringes between margins and buffer text. */); |
| 5813 | 5819 | ||
| 5814 | DEFVAR_PER_BUFFER ("scroll-bar-width", ¤t_buffer->scroll_bar_width, | 5820 | DEFVAR_PER_BUFFER ("scroll-bar-width", &B_ (current_buffer, scroll_bar_width), |
| 5815 | Qnil, | 5821 | Qnil, |
| 5816 | doc: /* *Width of this buffer's scroll bars in pixels. | 5822 | doc: /* *Width of this buffer's scroll bars in pixels. |
| 5817 | A value of nil means to use the scroll bar width from the window's frame. */); | 5823 | A value of nil means to use the scroll bar width from the window's frame. */); |
| 5818 | 5824 | ||
| 5819 | DEFVAR_PER_BUFFER ("vertical-scroll-bar", ¤t_buffer->vertical_scroll_bar_type, | 5825 | DEFVAR_PER_BUFFER ("vertical-scroll-bar", &B_ (current_buffer, vertical_scroll_bar_type), |
| 5820 | Qnil, | 5826 | Qnil, |
| 5821 | doc: /* *Position of this buffer's vertical scroll bar. | 5827 | doc: /* *Position of this buffer's vertical scroll bar. |
| 5822 | The value takes effect whenever you tell a window to display this buffer; | 5828 | The value takes effect whenever you tell a window to display this buffer; |
| @@ -5827,13 +5833,13 @@ of the window; a value of nil means don't show any vertical scroll bars. | |||
| 5827 | A value of t (the default) means do whatever the window's frame specifies. */); | 5833 | A value of t (the default) means do whatever the window's frame specifies. */); |
| 5828 | 5834 | ||
| 5829 | DEFVAR_PER_BUFFER ("indicate-empty-lines", | 5835 | DEFVAR_PER_BUFFER ("indicate-empty-lines", |
| 5830 | ¤t_buffer->indicate_empty_lines, Qnil, | 5836 | &B_ (current_buffer, indicate_empty_lines), Qnil, |
| 5831 | doc: /* *Visually indicate empty lines after the buffer end. | 5837 | doc: /* *Visually indicate empty lines after the buffer end. |
| 5832 | If non-nil, a bitmap is displayed in the left fringe of a window on | 5838 | If non-nil, a bitmap is displayed in the left fringe of a window on |
| 5833 | window-systems. */); | 5839 | window-systems. */); |
| 5834 | 5840 | ||
| 5835 | DEFVAR_PER_BUFFER ("indicate-buffer-boundaries", | 5841 | DEFVAR_PER_BUFFER ("indicate-buffer-boundaries", |
| 5836 | ¤t_buffer->indicate_buffer_boundaries, Qnil, | 5842 | &B_ (current_buffer, indicate_buffer_boundaries), Qnil, |
| 5837 | doc: /* *Visually indicate buffer boundaries and scrolling. | 5843 | doc: /* *Visually indicate buffer boundaries and scrolling. |
| 5838 | If non-nil, the first and last line of the buffer are marked in the fringe | 5844 | If non-nil, the first and last line of the buffer are marked in the fringe |
| 5839 | of a window on window-systems with angle bitmaps, or if the window can be | 5845 | of a window on window-systems with angle bitmaps, or if the window can be |
| @@ -5858,7 +5864,7 @@ bitmaps in right fringe. To show just the angle bitmaps in the left | |||
| 5858 | fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). */); | 5864 | fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). */); |
| 5859 | 5865 | ||
| 5860 | DEFVAR_PER_BUFFER ("fringe-indicator-alist", | 5866 | DEFVAR_PER_BUFFER ("fringe-indicator-alist", |
| 5861 | ¤t_buffer->fringe_indicator_alist, Qnil, | 5867 | &B_ (current_buffer, fringe_indicator_alist), Qnil, |
| 5862 | doc: /* *Mapping from logical to physical fringe indicator bitmaps. | 5868 | doc: /* *Mapping from logical to physical fringe indicator bitmaps. |
| 5863 | The value is an alist where each element (INDICATOR . BITMAPS) | 5869 | The value is an alist where each element (INDICATOR . BITMAPS) |
| 5864 | specifies the fringe bitmaps used to display a specific logical | 5870 | specifies the fringe bitmaps used to display a specific logical |
| @@ -5877,7 +5883,7 @@ last (only) line has no final newline. BITMAPS may also be a single | |||
| 5877 | symbol which is used in both left and right fringes. */); | 5883 | symbol which is used in both left and right fringes. */); |
| 5878 | 5884 | ||
| 5879 | DEFVAR_PER_BUFFER ("fringe-cursor-alist", | 5885 | DEFVAR_PER_BUFFER ("fringe-cursor-alist", |
| 5880 | ¤t_buffer->fringe_cursor_alist, Qnil, | 5886 | &B_ (current_buffer, fringe_cursor_alist), Qnil, |
| 5881 | doc: /* *Mapping from logical to physical fringe cursor bitmaps. | 5887 | doc: /* *Mapping from logical to physical fringe cursor bitmaps. |
| 5882 | The value is an alist where each element (CURSOR . BITMAP) | 5888 | The value is an alist where each element (CURSOR . BITMAP) |
| 5883 | specifies the fringe bitmaps used to display a specific logical | 5889 | specifies the fringe bitmaps used to display a specific logical |
| @@ -5892,7 +5898,7 @@ BITMAP is the corresponding fringe bitmap shown for the logical | |||
| 5892 | cursor type. */); | 5898 | cursor type. */); |
| 5893 | 5899 | ||
| 5894 | DEFVAR_PER_BUFFER ("scroll-up-aggressively", | 5900 | DEFVAR_PER_BUFFER ("scroll-up-aggressively", |
| 5895 | ¤t_buffer->scroll_up_aggressively, Qnil, | 5901 | &B_ (current_buffer, scroll_up_aggressively), Qnil, |
| 5896 | doc: /* How far to scroll windows upward. | 5902 | doc: /* How far to scroll windows upward. |
| 5897 | If you move point off the bottom, the window scrolls automatically. | 5903 | If you move point off the bottom, the window scrolls automatically. |
| 5898 | This variable controls how far it scrolls. The value nil, the default, | 5904 | This variable controls how far it scrolls. The value nil, the default, |
| @@ -5905,7 +5911,7 @@ window scrolls by a full window height. Meaningful values are | |||
| 5905 | between 0.0 and 1.0, inclusive. */); | 5911 | between 0.0 and 1.0, inclusive. */); |
| 5906 | 5912 | ||
| 5907 | DEFVAR_PER_BUFFER ("scroll-down-aggressively", | 5913 | DEFVAR_PER_BUFFER ("scroll-down-aggressively", |
| 5908 | ¤t_buffer->scroll_down_aggressively, Qnil, | 5914 | &B_ (current_buffer, scroll_down_aggressively), Qnil, |
| 5909 | doc: /* How far to scroll windows downward. | 5915 | doc: /* How far to scroll windows downward. |
| 5910 | If you move point off the top, the window scrolls automatically. | 5916 | If you move point off the top, the window scrolls automatically. |
| 5911 | This variable controls how far it scrolls. The value nil, the default, | 5917 | This variable controls how far it scrolls. The value nil, the default, |
| @@ -5960,7 +5966,7 @@ from happening repeatedly and making Emacs nonfunctional. */); | |||
| 5960 | The functions are run using the `run-hooks' function. */); | 5966 | The functions are run using the `run-hooks' function. */); |
| 5961 | Vfirst_change_hook = Qnil; | 5967 | Vfirst_change_hook = Qnil; |
| 5962 | 5968 | ||
| 5963 | DEFVAR_PER_BUFFER ("buffer-undo-list", ¤t_buffer->undo_list, Qnil, | 5969 | DEFVAR_PER_BUFFER ("buffer-undo-list", &B_ (current_buffer, undo_list), Qnil, |
| 5964 | doc: /* List of undo entries in current buffer. | 5970 | doc: /* List of undo entries in current buffer. |
| 5965 | Recent changes come first; older changes follow newer. | 5971 | Recent changes come first; older changes follow newer. |
| 5966 | 5972 | ||
| @@ -6001,10 +6007,10 @@ the changes between two undo boundaries as a single step to be undone. | |||
| 6001 | 6007 | ||
| 6002 | If the value of the variable is t, undo information is not recorded. */); | 6008 | If the value of the variable is t, undo information is not recorded. */); |
| 6003 | 6009 | ||
| 6004 | DEFVAR_PER_BUFFER ("mark-active", ¤t_buffer->mark_active, Qnil, | 6010 | DEFVAR_PER_BUFFER ("mark-active", &B_ (current_buffer, mark_active), Qnil, |
| 6005 | doc: /* Non-nil means the mark and region are currently active in this buffer. */); | 6011 | doc: /* Non-nil means the mark and region are currently active in this buffer. */); |
| 6006 | 6012 | ||
| 6007 | DEFVAR_PER_BUFFER ("cache-long-line-scans", ¤t_buffer->cache_long_line_scans, Qnil, | 6013 | DEFVAR_PER_BUFFER ("cache-long-line-scans", &B_ (current_buffer, cache_long_line_scans), Qnil, |
| 6008 | doc: /* Non-nil means that Emacs should use caches to handle long lines more quickly. | 6014 | doc: /* Non-nil means that Emacs should use caches to handle long lines more quickly. |
| 6009 | 6015 | ||
| 6010 | Normally, the line-motion functions work by scanning the buffer for | 6016 | Normally, the line-motion functions work by scanning the buffer for |
| @@ -6032,23 +6038,23 @@ maintained internally by the Emacs primitives. Enabling or disabling | |||
| 6032 | the cache should not affect the behavior of any of the motion | 6038 | the cache should not affect the behavior of any of the motion |
| 6033 | functions; it should only affect their performance. */); | 6039 | functions; it should only affect their performance. */); |
| 6034 | 6040 | ||
| 6035 | DEFVAR_PER_BUFFER ("point-before-scroll", ¤t_buffer->point_before_scroll, Qnil, | 6041 | DEFVAR_PER_BUFFER ("point-before-scroll", &B_ (current_buffer, point_before_scroll), Qnil, |
| 6036 | doc: /* Value of point before the last series of scroll operations, or nil. */); | 6042 | doc: /* Value of point before the last series of scroll operations, or nil. */); |
| 6037 | 6043 | ||
| 6038 | DEFVAR_PER_BUFFER ("buffer-file-format", ¤t_buffer->file_format, Qnil, | 6044 | DEFVAR_PER_BUFFER ("buffer-file-format", &B_ (current_buffer, file_format), Qnil, |
| 6039 | doc: /* List of formats to use when saving this buffer. | 6045 | doc: /* List of formats to use when saving this buffer. |
| 6040 | Formats are defined by `format-alist'. This variable is | 6046 | Formats are defined by `format-alist'. This variable is |
| 6041 | set when a file is visited. */); | 6047 | set when a file is visited. */); |
| 6042 | 6048 | ||
| 6043 | DEFVAR_PER_BUFFER ("buffer-auto-save-file-format", | 6049 | DEFVAR_PER_BUFFER ("buffer-auto-save-file-format", |
| 6044 | ¤t_buffer->auto_save_file_format, Qnil, | 6050 | &B_ (current_buffer, auto_save_file_format), Qnil, |
| 6045 | doc: /* *Format in which to write auto-save files. | 6051 | doc: /* *Format in which to write auto-save files. |
| 6046 | Should be a list of symbols naming formats that are defined in `format-alist'. | 6052 | Should be a list of symbols naming formats that are defined in `format-alist'. |
| 6047 | If it is t, which is the default, auto-save files are written in the | 6053 | If it is t, which is the default, auto-save files are written in the |
| 6048 | same format as a regular save would use. */); | 6054 | same format as a regular save would use. */); |
| 6049 | 6055 | ||
| 6050 | DEFVAR_PER_BUFFER ("buffer-invisibility-spec", | 6056 | DEFVAR_PER_BUFFER ("buffer-invisibility-spec", |
| 6051 | ¤t_buffer->invisibility_spec, Qnil, | 6057 | &B_ (current_buffer, invisibility_spec), Qnil, |
| 6052 | doc: /* Invisibility spec of this buffer. | 6058 | doc: /* Invisibility spec of this buffer. |
| 6053 | The default is t, which means that text is invisible | 6059 | The default is t, which means that text is invisible |
| 6054 | if it has a non-nil `invisible' property. | 6060 | if it has a non-nil `invisible' property. |
| @@ -6059,12 +6065,12 @@ then characters with property value PROP are invisible, | |||
| 6059 | and they have an ellipsis as well if ELLIPSIS is non-nil. */); | 6065 | and they have an ellipsis as well if ELLIPSIS is non-nil. */); |
| 6060 | 6066 | ||
| 6061 | DEFVAR_PER_BUFFER ("buffer-display-count", | 6067 | DEFVAR_PER_BUFFER ("buffer-display-count", |
| 6062 | ¤t_buffer->display_count, Qnil, | 6068 | &B_ (current_buffer, display_count), Qnil, |
| 6063 | doc: /* A number incremented each time this buffer is displayed in a window. | 6069 | doc: /* A number incremented each time this buffer is displayed in a window. |
| 6064 | The function `set-window-buffer' increments it. */); | 6070 | The function `set-window-buffer' increments it. */); |
| 6065 | 6071 | ||
| 6066 | DEFVAR_PER_BUFFER ("buffer-display-time", | 6072 | DEFVAR_PER_BUFFER ("buffer-display-time", |
| 6067 | ¤t_buffer->display_time, Qnil, | 6073 | &B_ (current_buffer, display_time), Qnil, |
| 6068 | doc: /* Time stamp updated each time this buffer is displayed in a window. | 6074 | doc: /* Time stamp updated each time this buffer is displayed in a window. |
| 6069 | The function `set-window-buffer' updates this variable | 6075 | The function `set-window-buffer' updates this variable |
| 6070 | to the value obtained by calling `current-time'. | 6076 | to the value obtained by calling `current-time'. |
| @@ -6099,7 +6105,7 @@ and disregard a `read-only' text property if the property value | |||
| 6099 | is a member of the list. */); | 6105 | is a member of the list. */); |
| 6100 | Vinhibit_read_only = Qnil; | 6106 | Vinhibit_read_only = Qnil; |
| 6101 | 6107 | ||
| 6102 | DEFVAR_PER_BUFFER ("cursor-type", ¤t_buffer->cursor_type, Qnil, | 6108 | DEFVAR_PER_BUFFER ("cursor-type", &B_ (current_buffer, cursor_type), Qnil, |
| 6103 | doc: /* Cursor to use when this buffer is in the selected window. | 6109 | doc: /* Cursor to use when this buffer is in the selected window. |
| 6104 | Values are interpreted as follows: | 6110 | Values are interpreted as follows: |
| 6105 | 6111 | ||
| @@ -6118,7 +6124,7 @@ cursor's appearance is instead controlled by the variable | |||
| 6118 | `cursor-in-non-selected-windows'. */); | 6124 | `cursor-in-non-selected-windows'. */); |
| 6119 | 6125 | ||
| 6120 | DEFVAR_PER_BUFFER ("line-spacing", | 6126 | DEFVAR_PER_BUFFER ("line-spacing", |
| 6121 | ¤t_buffer->extra_line_spacing, Qnil, | 6127 | &B_ (current_buffer, extra_line_spacing), Qnil, |
| 6122 | doc: /* Additional space to put between lines when displaying a buffer. | 6128 | doc: /* Additional space to put between lines when displaying a buffer. |
| 6123 | The space is measured in pixels, and put below lines on graphic displays, | 6129 | The space is measured in pixels, and put below lines on graphic displays, |
| 6124 | see `display-graphic-p'. | 6130 | see `display-graphic-p'. |
| @@ -6126,7 +6132,7 @@ If value is a floating point number, it specifies the spacing relative | |||
| 6126 | to the default frame line height. A value of nil means add no extra space. */); | 6132 | to the default frame line height. A value of nil means add no extra space. */); |
| 6127 | 6133 | ||
| 6128 | DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", | 6134 | DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", |
| 6129 | ¤t_buffer->cursor_in_non_selected_windows, Qnil, | 6135 | &B_ (current_buffer, cursor_in_non_selected_windows), Qnil, |
| 6130 | doc: /* *Non-nil means show a cursor in non-selected windows. | 6136 | doc: /* *Non-nil means show a cursor in non-selected windows. |
| 6131 | If nil, only shows a cursor in the selected window. | 6137 | If nil, only shows a cursor in the selected window. |
| 6132 | If t, displays a cursor related to the usual cursor type | 6138 | If t, displays a cursor related to the usual cursor type |