aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorPaul Eggert2011-02-17 23:44:39 -0800
committerPaul Eggert2011-02-17 23:44:39 -0800
commit37b3d30244ad822e049b6b20c2eadf5946cb02cc (patch)
tree49bfe5e475aee761975f2618be4ee1b7c8371a72 /src/buffer.c
parent0ca2f89e09202a02f392c1defba2105b69c01419 (diff)
parent7d315eb67800796d7d7f39030eb7682340d985e5 (diff)
downloademacs-37b3d30244ad822e049b6b20c2eadf5946cb02cc.tar.gz
emacs-37b3d30244ad822e049b6b20c2eadf5946cb02cc.zip
Merge from mainline.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c692
1 files changed, 332 insertions, 360 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 49ae4bbede2..c95fbb5f516 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,
162Value is nil if OBJECT is not a buffer or if it has been killed. */) 162Value 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 (B_ (XBUFFER (object), name))) 165 return ((BUFFERP (object) && ! NILP (BVAR (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 (B_ (XBUFFER (buf), filename))) continue; 269 if (!STRINGP (BVAR (XBUFFER (buf), filename))) continue;
270 tem = Fstring_equal (B_ (XBUFFER (buf), filename), filename); 270 tem = Fstring_equal (BVAR (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 (B_ (XBUFFER (buf), file_truename))) continue; 286 if (!STRINGP (BVAR (XBUFFER (buf), file_truename))) continue;
287 tem = Fstring_equal (B_ (XBUFFER (buf), file_truename), filename); 287 tem = Fstring_equal (BVAR (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_ (b, width_table) = Qnil; 356 BVAR (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_ (b, pt_marker) = Qnil; 365 BVAR (b, pt_marker) = Qnil;
366 B_ (b, begv_marker) = Qnil; 366 BVAR (b, begv_marker) = Qnil;
367 B_ (b, zv_marker) = Qnil; 367 BVAR (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_ (b, name) = name; 371 BVAR (b, name) = name;
372 372
373 B_ (b, undo_list) = (SREF (name, 0) != ' ') ? Qnil : Qt; 373 BVAR (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_ (b, mark) = Fmake_marker (); 378 BVAR (b, mark) = Fmake_marker ();
379 BUF_MARKERS (b) = NULL; 379 BUF_MARKERS (b) = NULL;
380 B_ (b, name) = name; 380 BVAR (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 B_ (to, local_var_alist) = buffer_lisp_local_variables (from); 489 BVAR (to, local_var_alist) = buffer_lisp_local_variables (from);
490} 490}
491 491
492DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, 492DEFUN ("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 (B_ (XBUFFER (base_buffer), name))) 515 if (NILP (BVAR (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_ (b, width_table) = Qnil; 539 BVAR (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_ (b, name) = name; 547 BVAR (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_ (b, mark) = Fmake_marker (); 556 BVAR (b, mark) = Fmake_marker ();
557 B_ (b, name) = name; 557 BVAR (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_ (b, enable_multibyte_characters) = B_ (b->base_buffer, enable_multibyte_characters); 560 BVAR (b, enable_multibyte_characters) = BVAR (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_ (b->base_buffer, pt_marker))) 563 if (NILP (BVAR (b->base_buffer, pt_marker)))
564 { 564 {
565 B_ (b->base_buffer, pt_marker) = Fmake_marker (); 565 BVAR (b->base_buffer, pt_marker) = Fmake_marker ();
566 set_marker_both (B_ (b->base_buffer, pt_marker), base_buffer, 566 set_marker_both (BVAR (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_ (b->base_buffer, begv_marker))) 570 if (NILP (BVAR (b->base_buffer, begv_marker)))
571 { 571 {
572 B_ (b->base_buffer, begv_marker) = Fmake_marker (); 572 BVAR (b->base_buffer, begv_marker) = Fmake_marker ();
573 set_marker_both (B_ (b->base_buffer, begv_marker), base_buffer, 573 set_marker_both (BVAR (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_ (b->base_buffer, zv_marker))) 577 if (NILP (BVAR (b->base_buffer, zv_marker)))
578 { 578 {
579 B_ (b->base_buffer, zv_marker) = Fmake_marker (); 579 BVAR (b->base_buffer, zv_marker) = Fmake_marker ();
580 set_marker_both (B_ (b->base_buffer, zv_marker), base_buffer, 580 set_marker_both (BVAR (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_ (b->base_buffer, zv_marker))->insertion_type = 1; 583 XMARKER (BVAR (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_ (b, pt_marker) = Fmake_marker (); 589 BVAR (b, pt_marker) = Fmake_marker ();
590 set_marker_both (B_ (b, pt_marker), buf, BUF_PT (b), BUF_PT_BYTE (b)); 590 set_marker_both (BVAR (b, pt_marker), buf, BUF_PT (b), BUF_PT_BYTE (b));
591 B_ (b, begv_marker) = Fmake_marker (); 591 BVAR (b, begv_marker) = Fmake_marker ();
592 set_marker_both (B_ (b, begv_marker), buf, BUF_BEGV (b), BUF_BEGV_BYTE (b)); 592 set_marker_both (BVAR (b, begv_marker), buf, BUF_BEGV (b), BUF_BEGV_BYTE (b));
593 B_ (b, zv_marker) = Fmake_marker (); 593 BVAR (b, zv_marker) = Fmake_marker ();
594 set_marker_both (B_ (b, zv_marker), buf, BUF_ZV (b), BUF_ZV_BYTE (b)); 594 set_marker_both (BVAR (b, zv_marker), buf, BUF_ZV (b), BUF_ZV_BYTE (b));
595 XMARKER (B_ (b, zv_marker))->insertion_type = 1; 595 XMARKER (BVAR (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_ (b, filename) = Qnil; 602 BVAR (b, filename) = Qnil;
603 B_ (b, file_truename) = Qnil; 603 BVAR (b, file_truename) = Qnil;
604 B_ (b, display_count) = make_number (0); 604 BVAR (b, display_count) = make_number (0);
605 B_ (b, backed_up) = Qnil; 605 BVAR (b, backed_up) = Qnil;
606 B_ (b, auto_save_file_name) = Qnil; 606 BVAR (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)
647void 647void
648reset_buffer (register struct buffer *b) 648reset_buffer (register struct buffer *b)
649{ 649{
650 B_ (b, filename) = Qnil; 650 BVAR (b, filename) = Qnil;
651 B_ (b, file_truename) = Qnil; 651 BVAR (b, file_truename) = Qnil;
652 B_ (b, directory) = (current_buffer) ? B_ (current_buffer, directory) : Qnil; 652 BVAR (b, directory) = (current_buffer) ? BVAR (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_ (b, save_length), 0); 655 XSETFASTINT (BVAR (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_ (b, backed_up) = Qnil; 660 BVAR (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_ (b, auto_save_file_name) = Qnil; 663 BVAR (b, auto_save_file_name) = Qnil;
664 B_ (b, read_only) = Qnil; 664 BVAR (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_ (b, mark_active) = Qnil; 668 BVAR (b, mark_active) = Qnil;
669 B_ (b, point_before_scroll) = Qnil; 669 BVAR (b, point_before_scroll) = Qnil;
670 B_ (b, file_format) = Qnil; 670 BVAR (b, file_format) = Qnil;
671 B_ (b, auto_save_file_format) = Qt; 671 BVAR (b, auto_save_file_format) = Qt;
672 B_ (b, last_selected_window) = Qnil; 672 BVAR (b, last_selected_window) = Qnil;
673 XSETINT (B_ (b, display_count), 0); 673 XSETINT (BVAR (b, display_count), 0);
674 B_ (b, display_time) = Qnil; 674 BVAR (b, display_time) = Qnil;
675 B_ (b, enable_multibyte_characters) = B_ (&buffer_defaults, enable_multibyte_characters); 675 BVAR (b, enable_multibyte_characters) = BVAR (&buffer_defaults, enable_multibyte_characters);
676 B_ (b, cursor_type) = B_ (&buffer_defaults, cursor_type); 676 BVAR (b, cursor_type) = BVAR (&buffer_defaults, cursor_type);
677 B_ (b, extra_line_spacing) = B_ (&buffer_defaults, extra_line_spacing); 677 BVAR (b, extra_line_spacing) = BVAR (&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_ (b, major_mode) = Qfundamental_mode; 701 BVAR (b, major_mode) = Qfundamental_mode;
702 B_ (b, keymap) = Qnil; 702 BVAR (b, keymap) = Qnil;
703 B_ (b, mode_name) = QSFundamental; 703 BVAR (b, mode_name) = QSFundamental;
704 B_ (b, minor_modes) = Qnil; 704 BVAR (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,19 @@ 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_ (b, downcase_table) = Vascii_downcase_table; 713 BVAR (b, downcase_table) = Vascii_downcase_table;
714 B_ (b, upcase_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[0]; 714 BVAR (b, upcase_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[0];
715 B_ (b, case_canon_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[1]; 715 BVAR (b, case_canon_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[1];
716 B_ (b, case_eqv_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[2]; 716 BVAR (b, case_eqv_table) = XCHAR_TABLE (Vascii_downcase_table)->extras[2];
717 B_ (b, invisibility_spec) = Qt; 717 BVAR (b, invisibility_spec) = Qt;
718#ifndef DOS_NT
719 B_ (b, buffer_file_type) = Qnil;
720#endif
721 718
722 /* Reset all (or most) per-buffer variables to their defaults. */ 719 /* Reset all (or most) per-buffer variables to their defaults. */
723 if (permanent_too) 720 if (permanent_too)
724 B_ (b, local_var_alist) = Qnil; 721 BVAR (b, local_var_alist) = Qnil;
725 else 722 else
726 { 723 {
727 Lisp_Object tmp, prop, last = Qnil; 724 Lisp_Object tmp, prop, last = Qnil;
728 for (tmp = B_ (b, local_var_alist); CONSP (tmp); tmp = XCDR (tmp)) 725 for (tmp = BVAR (b, local_var_alist); CONSP (tmp); tmp = XCDR (tmp))
729 if (!NILP (prop = Fget (XCAR (XCAR (tmp)), Qpermanent_local))) 726 if (!NILP (prop = Fget (XCAR (XCAR (tmp)), Qpermanent_local)))
730 { 727 {
731 /* If permanent-local, keep it. */ 728 /* If permanent-local, keep it. */
@@ -755,7 +752,7 @@ reset_buffer_local_variables (register struct buffer *b, int permanent_too)
755 } 752 }
756 /* Delete this local variable. */ 753 /* Delete this local variable. */
757 else if (NILP (last)) 754 else if (NILP (last))
758 B_ (b, local_var_alist) = XCDR (tmp); 755 BVAR (b, local_var_alist) = XCDR (tmp);
759 else 756 else
760 XSETCDR (last, XCDR (tmp)); 757 XSETCDR (last, XCDR (tmp));
761 } 758 }
@@ -830,9 +827,9 @@ Return nil if BUFFER has been killed. */)
830 (register Lisp_Object buffer) 827 (register Lisp_Object buffer)
831{ 828{
832 if (NILP (buffer)) 829 if (NILP (buffer))
833 return B_ (current_buffer, name); 830 return BVAR (current_buffer, name);
834 CHECK_BUFFER (buffer); 831 CHECK_BUFFER (buffer);
835 return B_ (XBUFFER (buffer), name); 832 return BVAR (XBUFFER (buffer), name);
836} 833}
837 834
838DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0, 835DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0,
@@ -841,9 +838,9 @@ No argument or nil as argument means use the current buffer. */)
841 (register Lisp_Object buffer) 838 (register Lisp_Object buffer)
842{ 839{
843 if (NILP (buffer)) 840 if (NILP (buffer))
844 return B_ (current_buffer, filename); 841 return BVAR (current_buffer, filename);
845 CHECK_BUFFER (buffer); 842 CHECK_BUFFER (buffer);
846 return B_ (XBUFFER (buffer), filename); 843 return BVAR (XBUFFER (buffer), filename);
847} 844}
848 845
849DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer, 846DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer,
@@ -895,7 +892,7 @@ is the default binding of the variable. */)
895 { /* Look in local_var_alist. */ 892 { /* Look in local_var_alist. */
896 struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym); 893 struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym);
897 XSETSYMBOL (variable, sym); /* Update In case of aliasing. */ 894 XSETSYMBOL (variable, sym); /* Update In case of aliasing. */
898 result = Fassoc (variable, B_ (buf, local_var_alist)); 895 result = Fassoc (variable, BVAR (buf, local_var_alist));
899 if (!NILP (result)) 896 if (!NILP (result))
900 { 897 {
901 if (blv->fwd) 898 if (blv->fwd)
@@ -944,7 +941,7 @@ buffer_lisp_local_variables (struct buffer *buf)
944{ 941{
945 Lisp_Object result = Qnil; 942 Lisp_Object result = Qnil;
946 register Lisp_Object tail; 943 register Lisp_Object tail;
947 for (tail = B_ (buf, local_var_alist); CONSP (tail); tail = XCDR (tail)) 944 for (tail = BVAR (buf, local_var_alist); CONSP (tail); tail = XCDR (tail))
948 { 945 {
949 Lisp_Object val, elt; 946 Lisp_Object val, elt;
950 947
@@ -1043,9 +1040,9 @@ A non-nil FLAG means mark the buffer modified. */)
1043 /* If buffer becoming modified, lock the file. 1040 /* If buffer becoming modified, lock the file.
1044 If buffer becoming unmodified, unlock the file. */ 1041 If buffer becoming unmodified, unlock the file. */
1045 1042
1046 fn = B_ (current_buffer, file_truename); 1043 fn = BVAR (current_buffer, file_truename);
1047 /* Test buffer-file-name so that binding it to nil is effective. */ 1044 /* Test buffer-file-name so that binding it to nil is effective. */
1048 if (!NILP (fn) && ! NILP (B_ (current_buffer, filename))) 1045 if (!NILP (fn) && ! NILP (BVAR (current_buffer, filename)))
1049 { 1046 {
1050 already = SAVE_MODIFF < MODIFF; 1047 already = SAVE_MODIFF < MODIFF;
1051 if (!already && !NILP (flag)) 1048 if (!already && !NILP (flag))
@@ -1110,9 +1107,9 @@ state of the current buffer. Use with care. */)
1110 /* If buffer becoming modified, lock the file. 1107 /* If buffer becoming modified, lock the file.
1111 If buffer becoming unmodified, unlock the file. */ 1108 If buffer becoming unmodified, unlock the file. */
1112 1109
1113 fn = B_ (current_buffer, file_truename); 1110 fn = BVAR (current_buffer, file_truename);
1114 /* Test buffer-file-name so that binding it to nil is effective. */ 1111 /* Test buffer-file-name so that binding it to nil is effective. */
1115 if (!NILP (fn) && ! NILP (B_ (current_buffer, filename))) 1112 if (!NILP (fn) && ! NILP (BVAR (current_buffer, filename)))
1116 { 1113 {
1117 int already = SAVE_MODIFF < MODIFF; 1114 int already = SAVE_MODIFF < MODIFF;
1118 if (!already && !NILP (flag)) 1115 if (!already && !NILP (flag))
@@ -1199,14 +1196,14 @@ This does not change the name of the visited file (if any). */)
1199 with the original name. It makes UNIQUE equivalent to 1196 with the original name. It makes UNIQUE equivalent to
1200 (rename-buffer (generate-new-buffer-name NEWNAME)). */ 1197 (rename-buffer (generate-new-buffer-name NEWNAME)). */
1201 if (NILP (unique) && XBUFFER (tem) == current_buffer) 1198 if (NILP (unique) && XBUFFER (tem) == current_buffer)
1202 return B_ (current_buffer, name); 1199 return BVAR (current_buffer, name);
1203 if (!NILP (unique)) 1200 if (!NILP (unique))
1204 newname = Fgenerate_new_buffer_name (newname, B_ (current_buffer, name)); 1201 newname = Fgenerate_new_buffer_name (newname, BVAR (current_buffer, name));
1205 else 1202 else
1206 error ("Buffer name `%s' is in use", SDATA (newname)); 1203 error ("Buffer name `%s' is in use", SDATA (newname));
1207 } 1204 }
1208 1205
1209 B_ (current_buffer, name) = newname; 1206 BVAR (current_buffer, name) = newname;
1210 1207
1211 /* Catch redisplay's attention. Unless we do this, the mode lines for 1208 /* Catch redisplay's attention. Unless we do this, the mode lines for
1212 any windows displaying current_buffer will stay unchanged. */ 1209 any windows displaying current_buffer will stay unchanged. */
@@ -1214,11 +1211,11 @@ This does not change the name of the visited file (if any). */)
1214 1211
1215 XSETBUFFER (buf, current_buffer); 1212 XSETBUFFER (buf, current_buffer);
1216 Fsetcar (Frassq (buf, Vbuffer_alist), newname); 1213 Fsetcar (Frassq (buf, Vbuffer_alist), newname);
1217 if (NILP (B_ (current_buffer, filename)) 1214 if (NILP (BVAR (current_buffer, filename))
1218 && !NILP (B_ (current_buffer, auto_save_file_name))) 1215 && !NILP (BVAR (current_buffer, auto_save_file_name)))
1219 call0 (intern ("rename-auto-save-file")); 1216 call0 (intern ("rename-auto-save-file"));
1220 /* Refetch since that last call may have done GC. */ 1217 /* Refetch since that last call may have done GC. */
1221 return B_ (current_buffer, name); 1218 return BVAR (current_buffer, name);
1222} 1219}
1223 1220
1224DEFUN ("other-buffer", Fother_buffer, Sother_buffer, 0, 3, 0, 1221DEFUN ("other-buffer", Fother_buffer, Sother_buffer, 0, 3, 0,
@@ -1263,9 +1260,9 @@ If BUFFER is omitted or nil, some interesting buffer is returned. */)
1263 continue; 1260 continue;
1264 if (NILP (buf)) 1261 if (NILP (buf))
1265 continue; 1262 continue;
1266 if (NILP (B_ (XBUFFER (buf), name))) 1263 if (NILP (BVAR (XBUFFER (buf), name)))
1267 continue; 1264 continue;
1268 if (SREF (B_ (XBUFFER (buf), name), 0) == ' ') 1265 if (SREF (BVAR (XBUFFER (buf), name), 0) == ' ')
1269 continue; 1266 continue;
1270 /* If the selected frame has a buffer_predicate, 1267 /* If the selected frame has a buffer_predicate,
1271 disregard buffers that don't fit the predicate. */ 1268 disregard buffers that don't fit the predicate. */
@@ -1313,8 +1310,8 @@ No argument or nil as argument means do this for the current buffer. */)
1313 nsberror (buffer); 1310 nsberror (buffer);
1314 } 1311 }
1315 1312
1316 if (EQ (B_ (XBUFFER (real_buffer), undo_list), Qt)) 1313 if (EQ (BVAR (XBUFFER (real_buffer), undo_list), Qt))
1317 B_ (XBUFFER (real_buffer), undo_list) = Qnil; 1314 BVAR (XBUFFER (real_buffer), undo_list) = Qnil;
1318 1315
1319 return Qnil; 1316 return Qnil;
1320} 1317}
@@ -1359,16 +1356,16 @@ with SIGHUP. */)
1359 b = XBUFFER (buffer); 1356 b = XBUFFER (buffer);
1360 1357
1361 /* Avoid trouble for buffer already dead. */ 1358 /* Avoid trouble for buffer already dead. */
1362 if (NILP (B_ (b, name))) 1359 if (NILP (BVAR (b, name)))
1363 return Qnil; 1360 return Qnil;
1364 1361
1365 /* Query if the buffer is still modified. */ 1362 /* Query if the buffer is still modified. */
1366 if (INTERACTIVE && !NILP (B_ (b, filename)) 1363 if (INTERACTIVE && !NILP (BVAR (b, filename))
1367 && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) 1364 && BUF_MODIFF (b) > BUF_SAVE_MODIFF (b))
1368 { 1365 {
1369 GCPRO1 (buffer); 1366 GCPRO1 (buffer);
1370 tem = do_yes_or_no_p (format2 ("Buffer %s modified; kill anyway? ", 1367 tem = do_yes_or_no_p (format2 ("Buffer %s modified; kill anyway? ",
1371 B_ (b, name), make_number (0))); 1368 BVAR (b, name), make_number (0)));
1372 UNGCPRO; 1369 UNGCPRO;
1373 if (NILP (tem)) 1370 if (NILP (tem))
1374 return Qnil; 1371 return Qnil;
@@ -1402,7 +1399,7 @@ with SIGHUP. */)
1402 if (EQ (buffer, XWINDOW (minibuf_window)->buffer)) 1399 if (EQ (buffer, XWINDOW (minibuf_window)->buffer))
1403 return Qnil; 1400 return Qnil;
1404 1401
1405 if (NILP (B_ (b, name))) 1402 if (NILP (BVAR (b, name)))
1406 return Qnil; 1403 return Qnil;
1407 1404
1408 /* When we kill a base buffer, kill all its indirect buffers. 1405 /* When we kill a base buffer, kill all its indirect buffers.
@@ -1417,7 +1414,7 @@ with SIGHUP. */)
1417 for (other = all_buffers; other; other = other->next) 1414 for (other = all_buffers; other; other = other->next)
1418 /* all_buffers contains dead buffers too; 1415 /* all_buffers contains dead buffers too;
1419 don't re-kill them. */ 1416 don't re-kill them. */
1420 if (other->base_buffer == b && !NILP (B_ (other, name))) 1417 if (other->base_buffer == b && !NILP (BVAR (other, name)))
1421 { 1418 {
1422 Lisp_Object buffer; 1419 Lisp_Object buffer;
1423 XSETBUFFER (buffer, other); 1420 XSETBUFFER (buffer, other);
@@ -1462,7 +1459,7 @@ with SIGHUP. */)
1462 /* Killing buffer processes may run sentinels which may 1459 /* Killing buffer processes may run sentinels which may
1463 have called kill-buffer. */ 1460 have called kill-buffer. */
1464 1461
1465 if (NILP (B_ (b, name))) 1462 if (NILP (BVAR (b, name)))
1466 return Qnil; 1463 return Qnil;
1467 1464
1468 clear_charpos_cache (b); 1465 clear_charpos_cache (b);
@@ -1476,7 +1473,7 @@ with SIGHUP. */)
1476 1473
1477 /* Delete any auto-save file, if we saved it in this session. 1474 /* Delete any auto-save file, if we saved it in this session.
1478 But not if the buffer is modified. */ 1475 But not if the buffer is modified. */
1479 if (STRINGP (B_ (b, auto_save_file_name)) 1476 if (STRINGP (BVAR (b, auto_save_file_name))
1480 && BUF_AUTOSAVE_MODIFF (b) != 0 1477 && BUF_AUTOSAVE_MODIFF (b) != 0
1481 && BUF_SAVE_MODIFF (b) < BUF_AUTOSAVE_MODIFF (b) 1478 && BUF_SAVE_MODIFF (b) < BUF_AUTOSAVE_MODIFF (b)
1482 && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) 1479 && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)
@@ -1485,7 +1482,7 @@ with SIGHUP. */)
1485 Lisp_Object tem; 1482 Lisp_Object tem;
1486 tem = Fsymbol_value (intern ("delete-auto-save-files")); 1483 tem = Fsymbol_value (intern ("delete-auto-save-files"));
1487 if (! NILP (tem)) 1484 if (! NILP (tem))
1488 internal_delete_file (B_ (b, auto_save_file_name)); 1485 internal_delete_file (BVAR (b, auto_save_file_name));
1489 } 1486 }
1490 1487
1491 if (b->base_buffer) 1488 if (b->base_buffer)
@@ -1525,7 +1522,7 @@ with SIGHUP. */)
1525 swap_out_buffer_local_variables (b); 1522 swap_out_buffer_local_variables (b);
1526 reset_buffer_local_variables (b, 1); 1523 reset_buffer_local_variables (b, 1);
1527 1524
1528 B_ (b, name) = Qnil; 1525 BVAR (b, name) = Qnil;
1529 1526
1530 BLOCK_INPUT; 1527 BLOCK_INPUT;
1531 if (! b->base_buffer) 1528 if (! b->base_buffer)
@@ -1541,9 +1538,9 @@ with SIGHUP. */)
1541 free_region_cache (b->width_run_cache); 1538 free_region_cache (b->width_run_cache);
1542 b->width_run_cache = 0; 1539 b->width_run_cache = 0;
1543 } 1540 }
1544 B_ (b, width_table) = Qnil; 1541 BVAR (b, width_table) = Qnil;
1545 UNBLOCK_INPUT; 1542 UNBLOCK_INPUT;
1546 B_ (b, undo_list) = Qnil; 1543 BVAR (b, undo_list) = Qnil;
1547 1544
1548 return Qt; 1545 return Qt;
1549} 1546}
@@ -1637,15 +1634,15 @@ the current buffer's major mode. */)
1637 1634
1638 CHECK_BUFFER (buffer); 1635 CHECK_BUFFER (buffer);
1639 1636
1640 if (STRINGP (B_ (XBUFFER (buffer), name)) 1637 if (STRINGP (BVAR (XBUFFER (buffer), name))
1641 && strcmp (SSDATA (B_ (XBUFFER (buffer), name)), "*scratch*") == 0) 1638 && strcmp (SSDATA (BVAR (XBUFFER (buffer), name)), "*scratch*") == 0)
1642 function = find_symbol_value (intern ("initial-major-mode")); 1639 function = find_symbol_value (intern ("initial-major-mode"));
1643 else 1640 else
1644 { 1641 {
1645 function = B_ (&buffer_defaults, major_mode); 1642 function = BVAR (&buffer_defaults, major_mode);
1646 if (NILP (function) 1643 if (NILP (function)
1647 && NILP (Fget (B_ (current_buffer, major_mode), Qmode_class))) 1644 && NILP (Fget (BVAR (current_buffer, major_mode), Qmode_class)))
1648 function = B_ (current_buffer, major_mode); 1645 function = BVAR (current_buffer, major_mode);
1649 } 1646 }
1650 1647
1651 if (NILP (function) || EQ (function, Qfundamental_mode)) 1648 if (NILP (function) || EQ (function, Qfundamental_mode))
@@ -1795,29 +1792,29 @@ set_buffer_internal_1 (register struct buffer *b)
1795 /* Put the undo list back in the base buffer, so that it appears 1792 /* 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. */ 1793 that an indirect buffer shares the undo list of its base. */
1797 if (old_buf->base_buffer) 1794 if (old_buf->base_buffer)
1798 B_ (old_buf->base_buffer, undo_list) = B_ (old_buf, undo_list); 1795 BVAR (old_buf->base_buffer, undo_list) = BVAR (old_buf, undo_list);
1799 1796
1800 /* If the old current buffer has markers to record PT, BEGV and ZV 1797 /* If the old current buffer has markers to record PT, BEGV and ZV
1801 when it is not current, update them now. */ 1798 when it is not current, update them now. */
1802 if (! NILP (B_ (old_buf, pt_marker))) 1799 if (! NILP (BVAR (old_buf, pt_marker)))
1803 { 1800 {
1804 Lisp_Object obuf; 1801 Lisp_Object obuf;
1805 XSETBUFFER (obuf, old_buf); 1802 XSETBUFFER (obuf, old_buf);
1806 set_marker_both (B_ (old_buf, pt_marker), obuf, 1803 set_marker_both (BVAR (old_buf, pt_marker), obuf,
1807 BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); 1804 BUF_PT (old_buf), BUF_PT_BYTE (old_buf));
1808 } 1805 }
1809 if (! NILP (B_ (old_buf, begv_marker))) 1806 if (! NILP (BVAR (old_buf, begv_marker)))
1810 { 1807 {
1811 Lisp_Object obuf; 1808 Lisp_Object obuf;
1812 XSETBUFFER (obuf, old_buf); 1809 XSETBUFFER (obuf, old_buf);
1813 set_marker_both (B_ (old_buf, begv_marker), obuf, 1810 set_marker_both (BVAR (old_buf, begv_marker), obuf,
1814 BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); 1811 BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf));
1815 } 1812 }
1816 if (! NILP (B_ (old_buf, zv_marker))) 1813 if (! NILP (BVAR (old_buf, zv_marker)))
1817 { 1814 {
1818 Lisp_Object obuf; 1815 Lisp_Object obuf;
1819 XSETBUFFER (obuf, old_buf); 1816 XSETBUFFER (obuf, old_buf);
1820 set_marker_both (B_ (old_buf, zv_marker), obuf, 1817 set_marker_both (BVAR (old_buf, zv_marker), obuf,
1821 BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); 1818 BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf));
1822 } 1819 }
1823 } 1820 }
@@ -1825,24 +1822,24 @@ set_buffer_internal_1 (register struct buffer *b)
1825 /* Get the undo list from the base buffer, so that it appears 1822 /* Get the undo list from the base buffer, so that it appears
1826 that an indirect buffer shares the undo list of its base. */ 1823 that an indirect buffer shares the undo list of its base. */
1827 if (b->base_buffer) 1824 if (b->base_buffer)
1828 B_ (b, undo_list) = B_ (b->base_buffer, undo_list); 1825 BVAR (b, undo_list) = BVAR (b->base_buffer, undo_list);
1829 1826
1830 /* If the new current buffer has markers to record PT, BEGV and ZV 1827 /* If the new current buffer has markers to record PT, BEGV and ZV
1831 when it is not current, fetch them now. */ 1828 when it is not current, fetch them now. */
1832 if (! NILP (B_ (b, pt_marker))) 1829 if (! NILP (BVAR (b, pt_marker)))
1833 { 1830 {
1834 BUF_PT (b) = marker_position (B_ (b, pt_marker)); 1831 BUF_PT (b) = marker_position (BVAR (b, pt_marker));
1835 BUF_PT_BYTE (b) = marker_byte_position (B_ (b, pt_marker)); 1832 BUF_PT_BYTE (b) = marker_byte_position (BVAR (b, pt_marker));
1836 } 1833 }
1837 if (! NILP (B_ (b, begv_marker))) 1834 if (! NILP (BVAR (b, begv_marker)))
1838 { 1835 {
1839 BUF_BEGV (b) = marker_position (B_ (b, begv_marker)); 1836 BUF_BEGV (b) = marker_position (BVAR (b, begv_marker));
1840 BUF_BEGV_BYTE (b) = marker_byte_position (B_ (b, begv_marker)); 1837 BUF_BEGV_BYTE (b) = marker_byte_position (BVAR (b, begv_marker));
1841 } 1838 }
1842 if (! NILP (B_ (b, zv_marker))) 1839 if (! NILP (BVAR (b, zv_marker)))
1843 { 1840 {
1844 BUF_ZV (b) = marker_position (B_ (b, zv_marker)); 1841 BUF_ZV (b) = marker_position (BVAR (b, zv_marker));
1845 BUF_ZV_BYTE (b) = marker_byte_position (B_ (b, zv_marker)); 1842 BUF_ZV_BYTE (b) = marker_byte_position (BVAR (b, zv_marker));
1846 } 1843 }
1847 1844
1848 /* Look down buffer's list of local Lisp variables 1845 /* Look down buffer's list of local Lisp variables
@@ -1850,7 +1847,7 @@ set_buffer_internal_1 (register struct buffer *b)
1850 1847
1851 do 1848 do
1852 { 1849 {
1853 for (tail = B_ (b, local_var_alist); CONSP (tail); tail = XCDR (tail)) 1850 for (tail = BVAR (b, local_var_alist); CONSP (tail); tail = XCDR (tail))
1854 { 1851 {
1855 Lisp_Object var = XCAR (XCAR (tail)); 1852 Lisp_Object var = XCAR (XCAR (tail));
1856 struct Lisp_Symbol *sym = XSYMBOL (var); 1853 struct Lisp_Symbol *sym = XSYMBOL (var);
@@ -1883,45 +1880,45 @@ set_buffer_temp (struct buffer *b)
1883 { 1880 {
1884 /* If the old current buffer has markers to record PT, BEGV and ZV 1881 /* If the old current buffer has markers to record PT, BEGV and ZV
1885 when it is not current, update them now. */ 1882 when it is not current, update them now. */
1886 if (! NILP (B_ (old_buf, pt_marker))) 1883 if (! NILP (BVAR (old_buf, pt_marker)))
1887 { 1884 {
1888 Lisp_Object obuf; 1885 Lisp_Object obuf;
1889 XSETBUFFER (obuf, old_buf); 1886 XSETBUFFER (obuf, old_buf);
1890 set_marker_both (B_ (old_buf, pt_marker), obuf, 1887 set_marker_both (BVAR (old_buf, pt_marker), obuf,
1891 BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); 1888 BUF_PT (old_buf), BUF_PT_BYTE (old_buf));
1892 } 1889 }
1893 if (! NILP (B_ (old_buf, begv_marker))) 1890 if (! NILP (BVAR (old_buf, begv_marker)))
1894 { 1891 {
1895 Lisp_Object obuf; 1892 Lisp_Object obuf;
1896 XSETBUFFER (obuf, old_buf); 1893 XSETBUFFER (obuf, old_buf);
1897 set_marker_both (B_ (old_buf, begv_marker), obuf, 1894 set_marker_both (BVAR (old_buf, begv_marker), obuf,
1898 BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); 1895 BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf));
1899 } 1896 }
1900 if (! NILP (B_ (old_buf, zv_marker))) 1897 if (! NILP (BVAR (old_buf, zv_marker)))
1901 { 1898 {
1902 Lisp_Object obuf; 1899 Lisp_Object obuf;
1903 XSETBUFFER (obuf, old_buf); 1900 XSETBUFFER (obuf, old_buf);
1904 set_marker_both (B_ (old_buf, zv_marker), obuf, 1901 set_marker_both (BVAR (old_buf, zv_marker), obuf,
1905 BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); 1902 BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf));
1906 } 1903 }
1907 } 1904 }
1908 1905
1909 /* If the new current buffer has markers to record PT, BEGV and ZV 1906 /* If the new current buffer has markers to record PT, BEGV and ZV
1910 when it is not current, fetch them now. */ 1907 when it is not current, fetch them now. */
1911 if (! NILP (B_ (b, pt_marker))) 1908 if (! NILP (BVAR (b, pt_marker)))
1912 { 1909 {
1913 BUF_PT (b) = marker_position (B_ (b, pt_marker)); 1910 BUF_PT (b) = marker_position (BVAR (b, pt_marker));
1914 BUF_PT_BYTE (b) = marker_byte_position (B_ (b, pt_marker)); 1911 BUF_PT_BYTE (b) = marker_byte_position (BVAR (b, pt_marker));
1915 } 1912 }
1916 if (! NILP (B_ (b, begv_marker))) 1913 if (! NILP (BVAR (b, begv_marker)))
1917 { 1914 {
1918 BUF_BEGV (b) = marker_position (B_ (b, begv_marker)); 1915 BUF_BEGV (b) = marker_position (BVAR (b, begv_marker));
1919 BUF_BEGV_BYTE (b) = marker_byte_position (B_ (b, begv_marker)); 1916 BUF_BEGV_BYTE (b) = marker_byte_position (BVAR (b, begv_marker));
1920 } 1917 }
1921 if (! NILP (B_ (b, zv_marker))) 1918 if (! NILP (BVAR (b, zv_marker)))
1922 { 1919 {
1923 BUF_ZV (b) = marker_position (B_ (b, zv_marker)); 1920 BUF_ZV (b) = marker_position (BVAR (b, zv_marker));
1924 BUF_ZV_BYTE (b) = marker_byte_position (B_ (b, zv_marker)); 1921 BUF_ZV_BYTE (b) = marker_byte_position (BVAR (b, zv_marker));
1925 } 1922 }
1926} 1923}
1927 1924
@@ -1938,7 +1935,7 @@ ends when the current command terminates. Use `switch-to-buffer' or
1938 buffer = Fget_buffer (buffer_or_name); 1935 buffer = Fget_buffer (buffer_or_name);
1939 if (NILP (buffer)) 1936 if (NILP (buffer))
1940 nsberror (buffer_or_name); 1937 nsberror (buffer_or_name);
1941 if (NILP (B_ (XBUFFER (buffer), name))) 1938 if (NILP (BVAR (XBUFFER (buffer), name)))
1942 error ("Selecting deleted buffer"); 1939 error ("Selecting deleted buffer");
1943 set_buffer_internal (XBUFFER (buffer)); 1940 set_buffer_internal (XBUFFER (buffer));
1944 return buffer; 1941 return buffer;
@@ -1949,7 +1946,7 @@ ends when the current command terminates. Use `switch-to-buffer' or
1949Lisp_Object 1946Lisp_Object
1950set_buffer_if_live (Lisp_Object buffer) 1947set_buffer_if_live (Lisp_Object buffer)
1951{ 1948{
1952 if (! NILP (B_ (XBUFFER (buffer), name))) 1949 if (! NILP (BVAR (XBUFFER (buffer), name)))
1953 Fset_buffer (buffer); 1950 Fset_buffer (buffer);
1954 return Qnil; 1951 return Qnil;
1955} 1952}
@@ -1959,7 +1956,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. */) 1956 doc: /* Signal a `buffer-read-only' error if the current buffer is read-only. */)
1960 (void) 1957 (void)
1961{ 1958{
1962 if (!NILP (B_ (current_buffer, read_only)) 1959 if (!NILP (BVAR (current_buffer, read_only))
1963 && NILP (Vinhibit_read_only)) 1960 && NILP (Vinhibit_read_only))
1964 xsignal1 (Qbuffer_read_only, Fcurrent_buffer ()); 1961 xsignal1 (Qbuffer_read_only, Fcurrent_buffer ());
1965 return Qnil; 1962 return Qnil;
@@ -2008,7 +2005,7 @@ its frame, iconify that frame. */)
2008 2005
2009 /* Move buffer to the end of the buffer list. Do nothing if the 2006 /* Move buffer to the end of the buffer list. Do nothing if the
2010 buffer is killed. */ 2007 buffer is killed. */
2011 if (!NILP (B_ (XBUFFER (buffer), name))) 2008 if (!NILP (BVAR (XBUFFER (buffer), name)))
2012 { 2009 {
2013 Lisp_Object aelt, link; 2010 Lisp_Object aelt, link;
2014 2011
@@ -2041,7 +2038,7 @@ so the buffer is truly empty after this. */)
2041 /* Prevent warnings, or suspension of auto saving, that would happen 2038 /* Prevent warnings, or suspension of auto saving, that would happen
2042 if future size is less than past size. Use of erase-buffer 2039 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. */ 2040 implies that the future text is not really related to the past text. */
2044 XSETFASTINT (B_ (current_buffer, save_length), 0); 2041 XSETFASTINT (BVAR (current_buffer, save_length), 0);
2045 return Qnil; 2042 return Qnil;
2046} 2043}
2047 2044
@@ -2111,7 +2108,7 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
2111 CHECK_BUFFER (buffer); 2108 CHECK_BUFFER (buffer);
2112 other_buffer = XBUFFER (buffer); 2109 other_buffer = XBUFFER (buffer);
2113 2110
2114 if (NILP (B_ (other_buffer, name))) 2111 if (NILP (BVAR (other_buffer, name)))
2115 error ("Cannot swap a dead buffer's text"); 2112 error ("Cannot swap a dead buffer's text");
2116 2113
2117 /* Actually, it probably works just fine. 2114 /* Actually, it probably works just fine.
@@ -2140,9 +2137,9 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
2140 } while (0) 2137 } while (0)
2141#define swapfield_(field, type) \ 2138#define swapfield_(field, type) \
2142 do { \ 2139 do { \
2143 type tmp##field = B_ (other_buffer, field); \ 2140 type tmp##field = BVAR (other_buffer, field); \
2144 B_ (other_buffer, field) = B_ (current_buffer, field); \ 2141 BVAR (other_buffer, field) = BVAR (current_buffer, field); \
2145 B_ (current_buffer, field) = tmp##field; \ 2142 BVAR (current_buffer, field) = tmp##field; \
2146 } while (0) 2143 } while (0)
2147 2144
2148 swapfield (own_text, struct buffer_text); 2145 swapfield (own_text, struct buffer_text);
@@ -2181,8 +2178,8 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
2181 swapfield_ (pt_marker, Lisp_Object); 2178 swapfield_ (pt_marker, Lisp_Object);
2182 swapfield_ (begv_marker, Lisp_Object); 2179 swapfield_ (begv_marker, Lisp_Object);
2183 swapfield_ (zv_marker, Lisp_Object); 2180 swapfield_ (zv_marker, Lisp_Object);
2184 B_ (current_buffer, point_before_scroll) = Qnil; 2181 BVAR (current_buffer, point_before_scroll) = Qnil;
2185 B_ (other_buffer, point_before_scroll) = Qnil; 2182 BVAR (other_buffer, point_before_scroll) = Qnil;
2186 2183
2187 current_buffer->text->modiff++; other_buffer->text->modiff++; 2184 current_buffer->text->modiff++; other_buffer->text->modiff++;
2188 current_buffer->text->chars_modiff++; other_buffer->text->chars_modiff++; 2185 current_buffer->text->chars_modiff++; other_buffer->text->chars_modiff++;
@@ -2256,21 +2253,21 @@ current buffer is cleared. */)
2256 EMACS_INT begv, zv; 2253 EMACS_INT begv, zv;
2257 int narrowed = (BEG != BEGV || Z != ZV); 2254 int narrowed = (BEG != BEGV || Z != ZV);
2258 int modified_p = !NILP (Fbuffer_modified_p (Qnil)); 2255 int modified_p = !NILP (Fbuffer_modified_p (Qnil));
2259 Lisp_Object old_undo = B_ (current_buffer, undo_list); 2256 Lisp_Object old_undo = BVAR (current_buffer, undo_list);
2260 struct gcpro gcpro1; 2257 struct gcpro gcpro1;
2261 2258
2262 if (current_buffer->base_buffer) 2259 if (current_buffer->base_buffer)
2263 error ("Cannot do `set-buffer-multibyte' on an indirect buffer"); 2260 error ("Cannot do `set-buffer-multibyte' on an indirect buffer");
2264 2261
2265 /* Do nothing if nothing actually changes. */ 2262 /* Do nothing if nothing actually changes. */
2266 if (NILP (flag) == NILP (B_ (current_buffer, enable_multibyte_characters))) 2263 if (NILP (flag) == NILP (BVAR (current_buffer, enable_multibyte_characters)))
2267 return flag; 2264 return flag;
2268 2265
2269 GCPRO1 (old_undo); 2266 GCPRO1 (old_undo);
2270 2267
2271 /* Don't record these buffer changes. We will put a special undo entry 2268 /* Don't record these buffer changes. We will put a special undo entry
2272 instead. */ 2269 instead. */
2273 B_ (current_buffer, undo_list) = Qt; 2270 BVAR (current_buffer, undo_list) = Qt;
2274 2271
2275 /* If the cached position is for this buffer, clear it out. */ 2272 /* If the cached position is for this buffer, clear it out. */
2276 clear_charpos_cache (current_buffer); 2273 clear_charpos_cache (current_buffer);
@@ -2292,7 +2289,7 @@ current buffer is cleared. */)
2292 to calculate the old correspondences. */ 2289 to calculate the old correspondences. */
2293 set_intervals_multibyte (0); 2290 set_intervals_multibyte (0);
2294 2291
2295 B_ (current_buffer, enable_multibyte_characters) = Qnil; 2292 BVAR (current_buffer, enable_multibyte_characters) = Qnil;
2296 2293
2297 Z = Z_BYTE; 2294 Z = Z_BYTE;
2298 BEGV = BEGV_BYTE; 2295 BEGV = BEGV_BYTE;
@@ -2430,7 +2427,7 @@ current buffer is cleared. */)
2430 2427
2431 /* Do this first, so that chars_in_text asks the right question. 2428 /* Do this first, so that chars_in_text asks the right question.
2432 set_intervals_multibyte needs it too. */ 2429 set_intervals_multibyte needs it too. */
2433 B_ (current_buffer, enable_multibyte_characters) = Qt; 2430 BVAR (current_buffer, enable_multibyte_characters) = Qt;
2434 2431
2435 GPT_BYTE = advance_to_char_boundary (GPT_BYTE); 2432 GPT_BYTE = advance_to_char_boundary (GPT_BYTE);
2436 GPT = chars_in_text (BEG_ADDR, GPT_BYTE - BEG_BYTE) + BEG; 2433 GPT = chars_in_text (BEG_ADDR, GPT_BYTE - BEG_BYTE) + BEG;
@@ -2488,7 +2485,7 @@ current buffer is cleared. */)
2488 if (!EQ (old_undo, Qt)) 2485 if (!EQ (old_undo, Qt))
2489 { 2486 {
2490 /* Represent all the above changes by a special undo entry. */ 2487 /* Represent all the above changes by a special undo entry. */
2491 B_ (current_buffer, undo_list) = Fcons (list3 (Qapply, 2488 BVAR (current_buffer, undo_list) = Fcons (list3 (Qapply,
2492 intern ("set-buffer-multibyte"), 2489 intern ("set-buffer-multibyte"),
2493 NILP (flag) ? Qt : Qnil), 2490 NILP (flag) ? Qt : Qnil),
2494 old_undo); 2491 old_undo);
@@ -2504,10 +2501,10 @@ current buffer is cleared. */)
2504 /* Copy this buffer's new multibyte status 2501 /* Copy this buffer's new multibyte status
2505 into all of its indirect buffers. */ 2502 into all of its indirect buffers. */
2506 for (other = all_buffers; other; other = other->next) 2503 for (other = all_buffers; other; other = other->next)
2507 if (other->base_buffer == current_buffer && !NILP (B_ (other, name))) 2504 if (other->base_buffer == current_buffer && !NILP (BVAR (other, name)))
2508 { 2505 {
2509 B_ (other, enable_multibyte_characters) 2506 BVAR (other, enable_multibyte_characters)
2510 = B_ (current_buffer, enable_multibyte_characters); 2507 = BVAR (current_buffer, enable_multibyte_characters);
2511 other->prevent_redisplay_optimizations_p = 1; 2508 other->prevent_redisplay_optimizations_p = 1;
2512 } 2509 }
2513 2510
@@ -2574,7 +2571,7 @@ swap_out_buffer_local_variables (struct buffer *b)
2574 Lisp_Object oalist, alist, buffer; 2571 Lisp_Object oalist, alist, buffer;
2575 2572
2576 XSETBUFFER (buffer, b); 2573 XSETBUFFER (buffer, b);
2577 oalist = B_ (b, local_var_alist); 2574 oalist = BVAR (b, local_var_alist);
2578 2575
2579 for (alist = oalist; CONSP (alist); alist = XCDR (alist)) 2576 for (alist = oalist; CONSP (alist); alist = XCDR (alist))
2580 { 2577 {
@@ -3078,7 +3075,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str
3078 ssl->buf[ssl->used].priority = (INTEGERP (pri) ? XINT (pri) : 0); 3075 ssl->buf[ssl->used].priority = (INTEGERP (pri) ? XINT (pri) : 0);
3079 ssl->used++; 3076 ssl->used++;
3080 3077
3081 if (NILP (B_ (current_buffer, enable_multibyte_characters))) 3078 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
3082 nbytes = SCHARS (str); 3079 nbytes = SCHARS (str);
3083 else if (! STRING_MULTIBYTE (str)) 3080 else if (! STRING_MULTIBYTE (str))
3084 nbytes = count_size_as_multibyte (SDATA (str), 3081 nbytes = count_size_as_multibyte (SDATA (str),
@@ -3090,7 +3087,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str
3090 3087
3091 if (STRINGP (str2)) 3088 if (STRINGP (str2))
3092 { 3089 {
3093 if (NILP (B_ (current_buffer, enable_multibyte_characters))) 3090 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
3094 nbytes = SCHARS (str2); 3091 nbytes = SCHARS (str2);
3095 else if (! STRING_MULTIBYTE (str2)) 3092 else if (! STRING_MULTIBYTE (str2))
3096 nbytes = count_size_as_multibyte (SDATA (str2), 3093 nbytes = count_size_as_multibyte (SDATA (str2),
@@ -3120,7 +3117,7 @@ overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr)
3120 Lisp_Object overlay, window, str; 3117 Lisp_Object overlay, window, str;
3121 struct Lisp_Overlay *ov; 3118 struct Lisp_Overlay *ov;
3122 EMACS_INT startpos, endpos; 3119 EMACS_INT startpos, endpos;
3123 int multibyte = ! NILP (B_ (current_buffer, enable_multibyte_characters)); 3120 int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
3124 3121
3125 overlay_heads.used = overlay_heads.bytes = 0; 3122 overlay_heads.used = overlay_heads.bytes = 0;
3126 overlay_tails.used = overlay_tails.bytes = 0; 3123 overlay_tails.used = overlay_tails.bytes = 0;
@@ -4991,9 +4988,9 @@ init_buffer_once (void)
4991 /* Make sure all markable slots in buffer_defaults 4988 /* Make sure all markable slots in buffer_defaults
4992 are initialized reasonably, so mark_buffer won't choke. */ 4989 are initialized reasonably, so mark_buffer won't choke. */
4993 reset_buffer (&buffer_defaults); 4990 reset_buffer (&buffer_defaults);
4994 eassert (EQ (B_ (&buffer_defaults, name), make_number (0))); 4991 eassert (EQ (BVAR (&buffer_defaults, name), make_number (0)));
4995 reset_buffer_local_variables (&buffer_defaults, 1); 4992 reset_buffer_local_variables (&buffer_defaults, 1);
4996 eassert (EQ (B_ (&buffer_local_symbols, name), make_number (0))); 4993 eassert (EQ (BVAR (&buffer_local_symbols, name), make_number (0)));
4997 reset_buffer (&buffer_local_symbols); 4994 reset_buffer (&buffer_local_symbols);
4998 reset_buffer_local_variables (&buffer_local_symbols, 1); 4995 reset_buffer_local_variables (&buffer_local_symbols, 1);
4999 /* Prevent GC from getting confused. */ 4996 /* Prevent GC from getting confused. */
@@ -5010,60 +5007,57 @@ init_buffer_once (void)
5010 /* Must do these before making the first buffer! */ 5007 /* Must do these before making the first buffer! */
5011 5008
5012 /* real setup is done in bindings.el */ 5009 /* real setup is done in bindings.el */
5013 B_ (&buffer_defaults, mode_line_format) = make_pure_c_string ("%-"); 5010 BVAR (&buffer_defaults, mode_line_format) = make_pure_c_string ("%-");
5014 B_ (&buffer_defaults, header_line_format) = Qnil; 5011 BVAR (&buffer_defaults, header_line_format) = Qnil;
5015 B_ (&buffer_defaults, abbrev_mode) = Qnil; 5012 BVAR (&buffer_defaults, abbrev_mode) = Qnil;
5016 B_ (&buffer_defaults, overwrite_mode) = Qnil; 5013 BVAR (&buffer_defaults, overwrite_mode) = Qnil;
5017 B_ (&buffer_defaults, case_fold_search) = Qt; 5014 BVAR (&buffer_defaults, case_fold_search) = Qt;
5018 B_ (&buffer_defaults, auto_fill_function) = Qnil; 5015 BVAR (&buffer_defaults, auto_fill_function) = Qnil;
5019 B_ (&buffer_defaults, selective_display) = Qnil; 5016 BVAR (&buffer_defaults, selective_display) = Qnil;
5020#ifndef old 5017#ifndef old
5021 B_ (&buffer_defaults, selective_display_ellipses) = Qt; 5018 BVAR (&buffer_defaults, selective_display_ellipses) = Qt;
5022#endif 5019#endif
5023 B_ (&buffer_defaults, abbrev_table) = Qnil; 5020 BVAR (&buffer_defaults, abbrev_table) = Qnil;
5024 B_ (&buffer_defaults, display_table) = Qnil; 5021 BVAR (&buffer_defaults, display_table) = Qnil;
5025 B_ (&buffer_defaults, undo_list) = Qnil; 5022 BVAR (&buffer_defaults, undo_list) = Qnil;
5026 B_ (&buffer_defaults, mark_active) = Qnil; 5023 BVAR (&buffer_defaults, mark_active) = Qnil;
5027 B_ (&buffer_defaults, file_format) = Qnil; 5024 BVAR (&buffer_defaults, file_format) = Qnil;
5028 B_ (&buffer_defaults, auto_save_file_format) = Qt; 5025 BVAR (&buffer_defaults, auto_save_file_format) = Qt;
5029 buffer_defaults.overlays_before = NULL; 5026 buffer_defaults.overlays_before = NULL;
5030 buffer_defaults.overlays_after = NULL; 5027 buffer_defaults.overlays_after = NULL;
5031 buffer_defaults.overlay_center = BEG; 5028 buffer_defaults.overlay_center = BEG;
5032 5029
5033 XSETFASTINT (B_ (&buffer_defaults, tab_width), 8); 5030 XSETFASTINT (BVAR (&buffer_defaults, tab_width), 8);
5034 B_ (&buffer_defaults, truncate_lines) = Qnil; 5031 BVAR (&buffer_defaults, truncate_lines) = Qnil;
5035 B_ (&buffer_defaults, word_wrap) = Qnil; 5032 BVAR (&buffer_defaults, word_wrap) = Qnil;
5036 B_ (&buffer_defaults, ctl_arrow) = Qt; 5033 BVAR (&buffer_defaults, ctl_arrow) = Qt;
5037 B_ (&buffer_defaults, bidi_display_reordering) = Qnil; 5034 BVAR (&buffer_defaults, bidi_display_reordering) = Qnil;
5038 B_ (&buffer_defaults, bidi_paragraph_direction) = Qnil; 5035 BVAR (&buffer_defaults, bidi_paragraph_direction) = Qnil;
5039 B_ (&buffer_defaults, cursor_type) = Qt; 5036 BVAR (&buffer_defaults, cursor_type) = Qt;
5040 B_ (&buffer_defaults, extra_line_spacing) = Qnil; 5037 BVAR (&buffer_defaults, extra_line_spacing) = Qnil;
5041 B_ (&buffer_defaults, cursor_in_non_selected_windows) = Qt; 5038 BVAR (&buffer_defaults, cursor_in_non_selected_windows) = Qt;
5042 5039
5043#ifdef DOS_NT 5040 BVAR (&buffer_defaults, enable_multibyte_characters) = Qt;
5044 B_ (&buffer_defaults, buffer_file_type) = Qnil; /* TEXT */ 5041 BVAR (&buffer_defaults, buffer_file_coding_system) = Qnil;
5045#endif 5042 XSETFASTINT (BVAR (&buffer_defaults, fill_column), 70);
5046 B_ (&buffer_defaults, enable_multibyte_characters) = Qt; 5043 XSETFASTINT (BVAR (&buffer_defaults, left_margin), 0);
5047 B_ (&buffer_defaults, buffer_file_coding_system) = Qnil; 5044 BVAR (&buffer_defaults, cache_long_line_scans) = Qnil;
5048 XSETFASTINT (B_ (&buffer_defaults, fill_column), 70); 5045 BVAR (&buffer_defaults, file_truename) = Qnil;
5049 XSETFASTINT (B_ (&buffer_defaults, left_margin), 0); 5046 XSETFASTINT (BVAR (&buffer_defaults, display_count), 0);
5050 B_ (&buffer_defaults, cache_long_line_scans) = Qnil; 5047 XSETFASTINT (BVAR (&buffer_defaults, left_margin_cols), 0);
5051 B_ (&buffer_defaults, file_truename) = Qnil; 5048 XSETFASTINT (BVAR (&buffer_defaults, right_margin_cols), 0);
5052 XSETFASTINT (B_ (&buffer_defaults, display_count), 0); 5049 BVAR (&buffer_defaults, left_fringe_width) = Qnil;
5053 XSETFASTINT (B_ (&buffer_defaults, left_margin_cols), 0); 5050 BVAR (&buffer_defaults, right_fringe_width) = Qnil;
5054 XSETFASTINT (B_ (&buffer_defaults, right_margin_cols), 0); 5051 BVAR (&buffer_defaults, fringes_outside_margins) = Qnil;
5055 B_ (&buffer_defaults, left_fringe_width) = Qnil; 5052 BVAR (&buffer_defaults, scroll_bar_width) = Qnil;
5056 B_ (&buffer_defaults, right_fringe_width) = Qnil; 5053 BVAR (&buffer_defaults, vertical_scroll_bar_type) = Qt;
5057 B_ (&buffer_defaults, fringes_outside_margins) = Qnil; 5054 BVAR (&buffer_defaults, indicate_empty_lines) = Qnil;
5058 B_ (&buffer_defaults, scroll_bar_width) = Qnil; 5055 BVAR (&buffer_defaults, indicate_buffer_boundaries) = Qnil;
5059 B_ (&buffer_defaults, vertical_scroll_bar_type) = Qt; 5056 BVAR (&buffer_defaults, fringe_indicator_alist) = Qnil;
5060 B_ (&buffer_defaults, indicate_empty_lines) = Qnil; 5057 BVAR (&buffer_defaults, fringe_cursor_alist) = Qnil;
5061 B_ (&buffer_defaults, indicate_buffer_boundaries) = Qnil; 5058 BVAR (&buffer_defaults, scroll_up_aggressively) = Qnil;
5062 B_ (&buffer_defaults, fringe_indicator_alist) = Qnil; 5059 BVAR (&buffer_defaults, scroll_down_aggressively) = Qnil;
5063 B_ (&buffer_defaults, fringe_cursor_alist) = Qnil; 5060 BVAR (&buffer_defaults, display_time) = Qnil;
5064 B_ (&buffer_defaults, scroll_up_aggressively) = Qnil;
5065 B_ (&buffer_defaults, scroll_down_aggressively) = Qnil;
5066 B_ (&buffer_defaults, display_time) = Qnil;
5067 5061
5068 /* Assign the local-flags to the slots that have default values. 5062 /* Assign the local-flags to the slots that have default values.
5069 The local flag is a bit that is used in the buffer 5063 The local flag is a bit that is used in the buffer
@@ -5075,73 +5069,68 @@ init_buffer_once (void)
5075 5069
5076 /* 0 means not a lisp var, -1 means always local, else mask */ 5070 /* 0 means not a lisp var, -1 means always local, else mask */
5077 memset (&buffer_local_flags, 0, sizeof buffer_local_flags); 5071 memset (&buffer_local_flags, 0, sizeof buffer_local_flags);
5078 XSETINT (B_ (&buffer_local_flags, filename), -1); 5072 XSETINT (BVAR (&buffer_local_flags, filename), -1);
5079 XSETINT (B_ (&buffer_local_flags, directory), -1); 5073 XSETINT (BVAR (&buffer_local_flags, directory), -1);
5080 XSETINT (B_ (&buffer_local_flags, backed_up), -1); 5074 XSETINT (BVAR (&buffer_local_flags, backed_up), -1);
5081 XSETINT (B_ (&buffer_local_flags, save_length), -1); 5075 XSETINT (BVAR (&buffer_local_flags, save_length), -1);
5082 XSETINT (B_ (&buffer_local_flags, auto_save_file_name), -1); 5076 XSETINT (BVAR (&buffer_local_flags, auto_save_file_name), -1);
5083 XSETINT (B_ (&buffer_local_flags, read_only), -1); 5077 XSETINT (BVAR (&buffer_local_flags, read_only), -1);
5084 XSETINT (B_ (&buffer_local_flags, major_mode), -1); 5078 XSETINT (BVAR (&buffer_local_flags, major_mode), -1);
5085 XSETINT (B_ (&buffer_local_flags, mode_name), -1); 5079 XSETINT (BVAR (&buffer_local_flags, mode_name), -1);
5086 XSETINT (B_ (&buffer_local_flags, undo_list), -1); 5080 XSETINT (BVAR (&buffer_local_flags, undo_list), -1);
5087 XSETINT (B_ (&buffer_local_flags, mark_active), -1); 5081 XSETINT (BVAR (&buffer_local_flags, mark_active), -1);
5088 XSETINT (B_ (&buffer_local_flags, point_before_scroll), -1); 5082 XSETINT (BVAR (&buffer_local_flags, point_before_scroll), -1);
5089 XSETINT (B_ (&buffer_local_flags, file_truename), -1); 5083 XSETINT (BVAR (&buffer_local_flags, file_truename), -1);
5090 XSETINT (B_ (&buffer_local_flags, invisibility_spec), -1); 5084 XSETINT (BVAR (&buffer_local_flags, invisibility_spec), -1);
5091 XSETINT (B_ (&buffer_local_flags, file_format), -1); 5085 XSETINT (BVAR (&buffer_local_flags, file_format), -1);
5092 XSETINT (B_ (&buffer_local_flags, auto_save_file_format), -1); 5086 XSETINT (BVAR (&buffer_local_flags, auto_save_file_format), -1);
5093 XSETINT (B_ (&buffer_local_flags, display_count), -1); 5087 XSETINT (BVAR (&buffer_local_flags, display_count), -1);
5094 XSETINT (B_ (&buffer_local_flags, display_time), -1); 5088 XSETINT (BVAR (&buffer_local_flags, display_time), -1);
5095 XSETINT (B_ (&buffer_local_flags, enable_multibyte_characters), -1); 5089 XSETINT (BVAR (&buffer_local_flags, enable_multibyte_characters), -1);
5096 5090
5097 idx = 1; 5091 idx = 1;
5098 XSETFASTINT (B_ (&buffer_local_flags, mode_line_format), idx); ++idx; 5092 XSETFASTINT (BVAR (&buffer_local_flags, mode_line_format), idx); ++idx;
5099 XSETFASTINT (B_ (&buffer_local_flags, abbrev_mode), idx); ++idx; 5093 XSETFASTINT (BVAR (&buffer_local_flags, abbrev_mode), idx); ++idx;
5100 XSETFASTINT (B_ (&buffer_local_flags, overwrite_mode), idx); ++idx; 5094 XSETFASTINT (BVAR (&buffer_local_flags, overwrite_mode), idx); ++idx;
5101 XSETFASTINT (B_ (&buffer_local_flags, case_fold_search), idx); ++idx; 5095 XSETFASTINT (BVAR (&buffer_local_flags, case_fold_search), idx); ++idx;
5102 XSETFASTINT (B_ (&buffer_local_flags, auto_fill_function), idx); ++idx; 5096 XSETFASTINT (BVAR (&buffer_local_flags, auto_fill_function), idx); ++idx;
5103 XSETFASTINT (B_ (&buffer_local_flags, selective_display), idx); ++idx; 5097 XSETFASTINT (BVAR (&buffer_local_flags, selective_display), idx); ++idx;
5104#ifndef old 5098#ifndef old
5105 XSETFASTINT (B_ (&buffer_local_flags, selective_display_ellipses), idx); ++idx; 5099 XSETFASTINT (BVAR (&buffer_local_flags, selective_display_ellipses), idx); ++idx;
5106#endif
5107 XSETFASTINT (B_ (&buffer_local_flags, tab_width), idx); ++idx;
5108 XSETFASTINT (B_ (&buffer_local_flags, truncate_lines), idx); ++idx;
5109 XSETFASTINT (B_ (&buffer_local_flags, word_wrap), idx); ++idx;
5110 XSETFASTINT (B_ (&buffer_local_flags, ctl_arrow), idx); ++idx;
5111 XSETFASTINT (B_ (&buffer_local_flags, fill_column), idx); ++idx;
5112 XSETFASTINT (B_ (&buffer_local_flags, left_margin), idx); ++idx;
5113 XSETFASTINT (B_ (&buffer_local_flags, abbrev_table), idx); ++idx;
5114 XSETFASTINT (B_ (&buffer_local_flags, display_table), idx); ++idx;
5115#ifdef DOS_NT
5116 XSETFASTINT (B_ (&buffer_local_flags, buffer_file_type), idx);
5117 /* Make this one a permanent local. */
5118 buffer_permanent_local_flags[idx++] = 1;
5119#endif 5100#endif
5120 XSETFASTINT (B_ (&buffer_local_flags, syntax_table), idx); ++idx; 5101 XSETFASTINT (BVAR (&buffer_local_flags, tab_width), idx); ++idx;
5121 XSETFASTINT (B_ (&buffer_local_flags, cache_long_line_scans), idx); ++idx; 5102 XSETFASTINT (BVAR (&buffer_local_flags, truncate_lines), idx); ++idx;
5122 XSETFASTINT (B_ (&buffer_local_flags, category_table), idx); ++idx; 5103 XSETFASTINT (BVAR (&buffer_local_flags, word_wrap), idx); ++idx;
5123 XSETFASTINT (B_ (&buffer_local_flags, bidi_display_reordering), idx); ++idx; 5104 XSETFASTINT (BVAR (&buffer_local_flags, ctl_arrow), idx); ++idx;
5124 XSETFASTINT (B_ (&buffer_local_flags, bidi_paragraph_direction), idx); ++idx; 5105 XSETFASTINT (BVAR (&buffer_local_flags, fill_column), idx); ++idx;
5125 XSETFASTINT (B_ (&buffer_local_flags, buffer_file_coding_system), idx); 5106 XSETFASTINT (BVAR (&buffer_local_flags, left_margin), idx); ++idx;
5107 XSETFASTINT (BVAR (&buffer_local_flags, abbrev_table), idx); ++idx;
5108 XSETFASTINT (BVAR (&buffer_local_flags, display_table), idx); ++idx;
5109 XSETFASTINT (BVAR (&buffer_local_flags, syntax_table), idx); ++idx;
5110 XSETFASTINT (BVAR (&buffer_local_flags, cache_long_line_scans), idx); ++idx;
5111 XSETFASTINT (BVAR (&buffer_local_flags, category_table), idx); ++idx;
5112 XSETFASTINT (BVAR (&buffer_local_flags, bidi_display_reordering), idx); ++idx;
5113 XSETFASTINT (BVAR (&buffer_local_flags, bidi_paragraph_direction), idx); ++idx;
5114 XSETFASTINT (BVAR (&buffer_local_flags, buffer_file_coding_system), idx);
5126 /* Make this one a permanent local. */ 5115 /* Make this one a permanent local. */
5127 buffer_permanent_local_flags[idx++] = 1; 5116 buffer_permanent_local_flags[idx++] = 1;
5128 XSETFASTINT (B_ (&buffer_local_flags, left_margin_cols), idx); ++idx; 5117 XSETFASTINT (BVAR (&buffer_local_flags, left_margin_cols), idx); ++idx;
5129 XSETFASTINT (B_ (&buffer_local_flags, right_margin_cols), idx); ++idx; 5118 XSETFASTINT (BVAR (&buffer_local_flags, right_margin_cols), idx); ++idx;
5130 XSETFASTINT (B_ (&buffer_local_flags, left_fringe_width), idx); ++idx; 5119 XSETFASTINT (BVAR (&buffer_local_flags, left_fringe_width), idx); ++idx;
5131 XSETFASTINT (B_ (&buffer_local_flags, right_fringe_width), idx); ++idx; 5120 XSETFASTINT (BVAR (&buffer_local_flags, right_fringe_width), idx); ++idx;
5132 XSETFASTINT (B_ (&buffer_local_flags, fringes_outside_margins), idx); ++idx; 5121 XSETFASTINT (BVAR (&buffer_local_flags, fringes_outside_margins), idx); ++idx;
5133 XSETFASTINT (B_ (&buffer_local_flags, scroll_bar_width), idx); ++idx; 5122 XSETFASTINT (BVAR (&buffer_local_flags, scroll_bar_width), idx); ++idx;
5134 XSETFASTINT (B_ (&buffer_local_flags, vertical_scroll_bar_type), idx); ++idx; 5123 XSETFASTINT (BVAR (&buffer_local_flags, vertical_scroll_bar_type), idx); ++idx;
5135 XSETFASTINT (B_ (&buffer_local_flags, indicate_empty_lines), idx); ++idx; 5124 XSETFASTINT (BVAR (&buffer_local_flags, indicate_empty_lines), idx); ++idx;
5136 XSETFASTINT (B_ (&buffer_local_flags, indicate_buffer_boundaries), idx); ++idx; 5125 XSETFASTINT (BVAR (&buffer_local_flags, indicate_buffer_boundaries), idx); ++idx;
5137 XSETFASTINT (B_ (&buffer_local_flags, fringe_indicator_alist), idx); ++idx; 5126 XSETFASTINT (BVAR (&buffer_local_flags, fringe_indicator_alist), idx); ++idx;
5138 XSETFASTINT (B_ (&buffer_local_flags, fringe_cursor_alist), idx); ++idx; 5127 XSETFASTINT (BVAR (&buffer_local_flags, fringe_cursor_alist), idx); ++idx;
5139 XSETFASTINT (B_ (&buffer_local_flags, scroll_up_aggressively), idx); ++idx; 5128 XSETFASTINT (BVAR (&buffer_local_flags, scroll_up_aggressively), idx); ++idx;
5140 XSETFASTINT (B_ (&buffer_local_flags, scroll_down_aggressively), idx); ++idx; 5129 XSETFASTINT (BVAR (&buffer_local_flags, scroll_down_aggressively), idx); ++idx;
5141 XSETFASTINT (B_ (&buffer_local_flags, header_line_format), idx); ++idx; 5130 XSETFASTINT (BVAR (&buffer_local_flags, header_line_format), idx); ++idx;
5142 XSETFASTINT (B_ (&buffer_local_flags, cursor_type), idx); ++idx; 5131 XSETFASTINT (BVAR (&buffer_local_flags, cursor_type), idx); ++idx;
5143 XSETFASTINT (B_ (&buffer_local_flags, extra_line_spacing), idx); ++idx; 5132 XSETFASTINT (BVAR (&buffer_local_flags, extra_line_spacing), idx); ++idx;
5144 XSETFASTINT (B_ (&buffer_local_flags, cursor_in_non_selected_windows), idx); ++idx; 5133 XSETFASTINT (BVAR (&buffer_local_flags, cursor_in_non_selected_windows), idx); ++idx;
5145 5134
5146 /* Need more room? */ 5135 /* Need more room? */
5147 if (idx >= MAX_PER_BUFFER_VARS) 5136 if (idx >= MAX_PER_BUFFER_VARS)
@@ -5155,7 +5144,7 @@ init_buffer_once (void)
5155 QSFundamental = make_pure_c_string ("Fundamental"); 5144 QSFundamental = make_pure_c_string ("Fundamental");
5156 5145
5157 Qfundamental_mode = intern_c_string ("fundamental-mode"); 5146 Qfundamental_mode = intern_c_string ("fundamental-mode");
5158 B_ (&buffer_defaults, major_mode) = Qfundamental_mode; 5147 BVAR (&buffer_defaults, major_mode) = Qfundamental_mode;
5159 5148
5160 Qmode_class = intern_c_string ("mode-class"); 5149 Qmode_class = intern_c_string ("mode-class");
5161 5150
@@ -5198,7 +5187,7 @@ init_buffer (void)
5198#endif /* USE_MMAP_FOR_BUFFERS */ 5187#endif /* USE_MMAP_FOR_BUFFERS */
5199 5188
5200 Fset_buffer (Fget_buffer_create (build_string ("*scratch*"))); 5189 Fset_buffer (Fget_buffer_create (build_string ("*scratch*")));
5201 if (NILP (B_ (&buffer_defaults, enable_multibyte_characters))) 5190 if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))
5202 Fset_buffer_multibyte (Qnil); 5191 Fset_buffer_multibyte (Qnil);
5203 5192
5204 pwd = get_current_dir_name (); 5193 pwd = get_current_dir_name ();
@@ -5219,28 +5208,28 @@ init_buffer (void)
5219 pwd[len + 1] = '\0'; 5208 pwd[len + 1] = '\0';
5220 } 5209 }
5221 5210
5222 B_ (current_buffer, directory) = make_unibyte_string (pwd, strlen (pwd)); 5211 BVAR (current_buffer, directory) = make_unibyte_string (pwd, strlen (pwd));
5223 if (! NILP (B_ (&buffer_defaults, enable_multibyte_characters))) 5212 if (! NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))
5224 /* At this moment, we still don't know how to decode the 5213 /* At this moment, we still don't know how to decode the
5225 directory name. So, we keep the bytes in multibyte form so 5214 directory name. So, we keep the bytes in multibyte form so
5226 that ENCODE_FILE correctly gets the original bytes. */ 5215 that ENCODE_FILE correctly gets the original bytes. */
5227 B_ (current_buffer, directory) 5216 BVAR (current_buffer, directory)
5228 = string_to_multibyte (B_ (current_buffer, directory)); 5217 = string_to_multibyte (BVAR (current_buffer, directory));
5229 5218
5230 /* Add /: to the front of the name 5219 /* Add /: to the front of the name
5231 if it would otherwise be treated as magic. */ 5220 if it would otherwise be treated as magic. */
5232 temp = Ffind_file_name_handler (B_ (current_buffer, directory), Qt); 5221 temp = Ffind_file_name_handler (BVAR (current_buffer, directory), Qt);
5233 if (! NILP (temp) 5222 if (! NILP (temp)
5234 /* If the default dir is just /, TEMP is non-nil 5223 /* If the default dir is just /, TEMP is non-nil
5235 because of the ange-ftp completion handler. 5224 because of the ange-ftp completion handler.
5236 However, it is not necessary to turn / into /:/. 5225 However, it is not necessary to turn / into /:/.
5237 So avoid doing that. */ 5226 So avoid doing that. */
5238 && strcmp ("/", SSDATA (B_ (current_buffer, directory)))) 5227 && strcmp ("/", SSDATA (BVAR (current_buffer, directory))))
5239 B_ (current_buffer, directory) 5228 BVAR (current_buffer, directory)
5240 = concat2 (build_string ("/:"), B_ (current_buffer, directory)); 5229 = concat2 (build_string ("/:"), BVAR (current_buffer, directory));
5241 5230
5242 temp = get_minibuffer (0); 5231 temp = get_minibuffer (0);
5243 B_ (XBUFFER (temp), directory) = B_ (current_buffer, directory); 5232 BVAR (XBUFFER (temp), directory) = BVAR (current_buffer, directory);
5244 5233
5245 free (pwd); 5234 free (pwd);
5246} 5235}
@@ -5415,14 +5404,6 @@ This is the same as (default-value 'tab-width). */);
5415 doc: /* Default value of `case-fold-search' for buffers that don't override it. 5404 doc: /* Default value of `case-fold-search' for buffers that don't override it.
5416This is the same as (default-value 'case-fold-search). */); 5405This is the same as (default-value 'case-fold-search). */);
5417 5406
5418#ifdef DOS_NT
5419 DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-type",
5420 buffer_file_type,
5421 doc: /* Default file type for buffers that do not override it.
5422This is the same as (default-value 'buffer-file-type).
5423The file type is nil for text, t for binary. */);
5424#endif
5425
5426 DEFVAR_BUFFER_DEFAULTS ("default-left-margin-width", 5407 DEFVAR_BUFFER_DEFAULTS ("default-left-margin-width",
5427 left_margin_cols, 5408 left_margin_cols,
5428 doc: /* Default value of `left-margin-width' for buffers that don't override it. 5409 doc: /* Default value of `left-margin-width' for buffers that don't override it.
@@ -5491,13 +5472,13 @@ This value applies in buffers that don't have their own local values.
5491This is the same as (default-value 'scroll-down-aggressively). */); 5472This is the same as (default-value 'scroll-down-aggressively). */);
5492 5473
5493 DEFVAR_PER_BUFFER ("header-line-format", 5474 DEFVAR_PER_BUFFER ("header-line-format",
5494 &B_ (current_buffer, header_line_format), 5475 &BVAR (current_buffer, header_line_format),
5495 Qnil, 5476 Qnil,
5496 doc: /* Analogous to `mode-line-format', but controls the header line. 5477 doc: /* Analogous to `mode-line-format', but controls the header line.
5497The header line appears, optionally, at the top of a window; 5478The header line appears, optionally, at the top of a window;
5498the mode line appears at the bottom. */); 5479the mode line appears at the bottom. */);
5499 5480
5500 DEFVAR_PER_BUFFER ("mode-line-format", &B_ (current_buffer, mode_line_format), 5481 DEFVAR_PER_BUFFER ("mode-line-format", &BVAR (current_buffer, mode_line_format),
5501 Qnil, 5482 Qnil,
5502 doc: /* Template for displaying mode line for current buffer. 5483 doc: /* Template for displaying mode line for current buffer.
5503Each buffer has its own value of this variable. 5484Each buffer has its own value of this variable.
@@ -5554,7 +5535,7 @@ Decimal digits after the % specify field width to which to pad. */);
5554 DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode, 5535 DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode,
5555 doc: /* *Value of `major-mode' for new buffers. */); 5536 doc: /* *Value of `major-mode' for new buffers. */);
5556 5537
5557 DEFVAR_PER_BUFFER ("major-mode", &B_ (current_buffer, major_mode), 5538 DEFVAR_PER_BUFFER ("major-mode", &BVAR (current_buffer, major_mode),
5558 make_number (Lisp_Symbol), 5539 make_number (Lisp_Symbol),
5559 doc: /* Symbol for current buffer's major mode. 5540 doc: /* Symbol for current buffer's major mode.
5560The default value (normally `fundamental-mode') affects new buffers. 5541The default value (normally `fundamental-mode') affects new buffers.
@@ -5567,46 +5548,46 @@ the buffer. Thus, the mode and its hooks should not expect certain
5567variables such as `buffer-read-only' and `buffer-file-coding-system' 5548variables such as `buffer-read-only' and `buffer-file-coding-system'
5568to be set up. */); 5549to be set up. */);
5569 5550
5570 DEFVAR_PER_BUFFER ("mode-name", &B_ (current_buffer, mode_name), 5551 DEFVAR_PER_BUFFER ("mode-name", &BVAR (current_buffer, mode_name),
5571 Qnil, 5552 Qnil,
5572 doc: /* Pretty name of current buffer's major mode. 5553 doc: /* Pretty name of current buffer's major mode.
5573Usually a string, but can use any of the constructs for `mode-line-format', 5554Usually a string, but can use any of the constructs for `mode-line-format',
5574which see. 5555which see.
5575Format with `format-mode-line' to produce a string value. */); 5556Format with `format-mode-line' to produce a string value. */);
5576 5557
5577 DEFVAR_PER_BUFFER ("local-abbrev-table", &B_ (current_buffer, abbrev_table), Qnil, 5558 DEFVAR_PER_BUFFER ("local-abbrev-table", &BVAR (current_buffer, abbrev_table), Qnil,
5578 doc: /* Local (mode-specific) abbrev table of current buffer. */); 5559 doc: /* Local (mode-specific) abbrev table of current buffer. */);
5579 5560
5580 DEFVAR_PER_BUFFER ("abbrev-mode", &B_ (current_buffer, abbrev_mode), Qnil, 5561 DEFVAR_PER_BUFFER ("abbrev-mode", &BVAR (current_buffer, abbrev_mode), Qnil,
5581 doc: /* Non-nil if Abbrev mode is enabled. 5562 doc: /* Non-nil if Abbrev mode is enabled.
5582Use the command `abbrev-mode' to change this variable. */); 5563Use the command `abbrev-mode' to change this variable. */);
5583 5564
5584 DEFVAR_PER_BUFFER ("case-fold-search", &B_ (current_buffer, case_fold_search), 5565 DEFVAR_PER_BUFFER ("case-fold-search", &BVAR (current_buffer, case_fold_search),
5585 Qnil, 5566 Qnil,
5586 doc: /* *Non-nil if searches and matches should ignore case. */); 5567 doc: /* *Non-nil if searches and matches should ignore case. */);
5587 5568
5588 DEFVAR_PER_BUFFER ("fill-column", &B_ (current_buffer, fill_column), 5569 DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column),
5589 make_number (LISP_INT_TAG), 5570 make_number (LISP_INT_TAG),
5590 doc: /* *Column beyond which automatic line-wrapping should happen. 5571 doc: /* *Column beyond which automatic line-wrapping should happen.
5591Interactively, you can set the buffer local value using \\[set-fill-column]. */); 5572Interactively, you can set the buffer local value using \\[set-fill-column]. */);
5592 5573
5593 DEFVAR_PER_BUFFER ("left-margin", &B_ (current_buffer, left_margin), 5574 DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin),
5594 make_number (LISP_INT_TAG), 5575 make_number (LISP_INT_TAG),
5595 doc: /* *Column for the default `indent-line-function' to indent to. 5576 doc: /* *Column for the default `indent-line-function' to indent to.
5596Linefeed indents to this column in Fundamental mode. */); 5577Linefeed indents to this column in Fundamental mode. */);
5597 5578
5598 DEFVAR_PER_BUFFER ("tab-width", &B_ (current_buffer, tab_width), 5579 DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width),
5599 make_number (LISP_INT_TAG), 5580 make_number (LISP_INT_TAG),
5600 doc: /* *Distance between tab stops (for display of tab characters), in columns. */); 5581 doc: /* *Distance between tab stops (for display of tab characters), in columns. */);
5601 5582
5602 DEFVAR_PER_BUFFER ("ctl-arrow", &B_ (current_buffer, ctl_arrow), Qnil, 5583 DEFVAR_PER_BUFFER ("ctl-arrow", &BVAR (current_buffer, ctl_arrow), Qnil,
5603 doc: /* *Non-nil means display control chars with uparrow. 5584 doc: /* *Non-nil means display control chars with uparrow.
5604A value of nil means use backslash and octal digits. 5585A value of nil means use backslash and octal digits.
5605This variable does not apply to characters whose display is specified 5586This variable does not apply to characters whose display is specified
5606in the current display table (if there is one). */); 5587in the current display table (if there is one). */);
5607 5588
5608 DEFVAR_PER_BUFFER ("enable-multibyte-characters", 5589 DEFVAR_PER_BUFFER ("enable-multibyte-characters",
5609 &B_ (current_buffer, enable_multibyte_characters), 5590 &BVAR (current_buffer, enable_multibyte_characters),
5610 Qnil, 5591 Qnil,
5611 doc: /* Non-nil means the buffer contents are regarded as multi-byte characters. 5592 doc: /* Non-nil means the buffer contents are regarded as multi-byte characters.
5612Otherwise they are regarded as unibyte. This affects the display, 5593Otherwise they are regarded as unibyte. This affects the display,
@@ -5620,7 +5601,7 @@ See also variable `default-enable-multibyte-characters' and Info node
5620 XSYMBOL (intern_c_string ("enable-multibyte-characters"))->constant = 1; 5601 XSYMBOL (intern_c_string ("enable-multibyte-characters"))->constant = 1;
5621 5602
5622 DEFVAR_PER_BUFFER ("buffer-file-coding-system", 5603 DEFVAR_PER_BUFFER ("buffer-file-coding-system",
5623 &B_ (current_buffer, buffer_file_coding_system), Qnil, 5604 &BVAR (current_buffer, buffer_file_coding_system), Qnil,
5624 doc: /* Coding system to be used for encoding the buffer contents on saving. 5605 doc: /* Coding system to be used for encoding the buffer contents on saving.
5625This variable applies to saving the buffer, and also to `write-region' 5606This variable applies to saving the buffer, and also to `write-region'
5626and other functions that use `write-region'. 5607and other functions that use `write-region'.
@@ -5638,11 +5619,11 @@ The variable `coding-system-for-write', if non-nil, overrides this variable.
5638This variable is never applied to a way of decoding a file while reading it. */); 5619This variable is never applied to a way of decoding a file while reading it. */);
5639 5620
5640 DEFVAR_PER_BUFFER ("bidi-display-reordering", 5621 DEFVAR_PER_BUFFER ("bidi-display-reordering",
5641 &B_ (current_buffer, bidi_display_reordering), Qnil, 5622 &BVAR (current_buffer, bidi_display_reordering), Qnil,
5642 doc: /* Non-nil means reorder bidirectional text for display in the visual order. */); 5623 doc: /* Non-nil means reorder bidirectional text for display in the visual order. */);
5643 5624
5644 DEFVAR_PER_BUFFER ("bidi-paragraph-direction", 5625 DEFVAR_PER_BUFFER ("bidi-paragraph-direction",
5645 &B_ (current_buffer, bidi_paragraph_direction), Qnil, 5626 &BVAR (current_buffer, bidi_paragraph_direction), Qnil,
5646 doc: /* *If non-nil, forces directionality of text paragraphs in the buffer. 5627 doc: /* *If non-nil, forces directionality of text paragraphs in the buffer.
5647 5628
5648If this is nil (the default), the direction of each paragraph is 5629If this is nil (the default), the direction of each paragraph is
@@ -5653,7 +5634,7 @@ Any other value is treated as nil.
5653This variable has no effect unless the buffer's value of 5634This variable has no effect unless the buffer's value of
5654\`bidi-display-reordering' is non-nil. */); 5635\`bidi-display-reordering' is non-nil. */);
5655 5636
5656 DEFVAR_PER_BUFFER ("truncate-lines", &B_ (current_buffer, truncate_lines), Qnil, 5637 DEFVAR_PER_BUFFER ("truncate-lines", &BVAR (current_buffer, truncate_lines), Qnil,
5657 doc: /* *Non-nil means do not display continuation lines. 5638 doc: /* *Non-nil means do not display continuation lines.
5658Instead, give each line of text just one screen line. 5639Instead, give each line of text just one screen line.
5659 5640
@@ -5661,7 +5642,7 @@ Note that this is overridden by the variable
5661`truncate-partial-width-windows' if that variable is non-nil 5642`truncate-partial-width-windows' if that variable is non-nil
5662and this buffer is not full-frame width. */); 5643and this buffer is not full-frame width. */);
5663 5644
5664 DEFVAR_PER_BUFFER ("word-wrap", &B_ (current_buffer, word_wrap), Qnil, 5645 DEFVAR_PER_BUFFER ("word-wrap", &BVAR (current_buffer, word_wrap), Qnil,
5665 doc: /* *Non-nil means to use word-wrapping for continuation lines. 5646 doc: /* *Non-nil means to use word-wrapping for continuation lines.
5666When word-wrapping is on, continuation lines are wrapped at the space 5647When word-wrapping is on, continuation lines are wrapped at the space
5667or tab character nearest to the right window edge. 5648or tab character nearest to the right window edge.
@@ -5673,21 +5654,12 @@ word-wrapping, you might want to reduce the value of
5673`truncate-partial-width-windows', since wrapping can make text readable 5654`truncate-partial-width-windows', since wrapping can make text readable
5674in narrower windows. */); 5655in narrower windows. */);
5675 5656
5676#ifdef DOS_NT 5657 DEFVAR_PER_BUFFER ("default-directory", &BVAR (current_buffer, directory),
5677 DEFVAR_PER_BUFFER ("buffer-file-type", &B_ (current_buffer, buffer_file_type),
5678 Qnil,
5679 doc: /* Non-nil if the visited file is a binary file.
5680This variable is meaningful on MS-DOG and Windows NT.
5681On those systems, it is automatically local in every buffer.
5682On other systems, this variable is normally always nil. */);
5683#endif
5684
5685 DEFVAR_PER_BUFFER ("default-directory", &B_ (current_buffer, directory),
5686 make_number (Lisp_String), 5658 make_number (Lisp_String),
5687 doc: /* Name of default directory of current buffer. Should end with slash. 5659 doc: /* Name of default directory of current buffer. Should end with slash.
5688To interactively change the default directory, use command `cd'. */); 5660To interactively change the default directory, use command `cd'. */);
5689 5661
5690 DEFVAR_PER_BUFFER ("auto-fill-function", &B_ (current_buffer, auto_fill_function), 5662 DEFVAR_PER_BUFFER ("auto-fill-function", &BVAR (current_buffer, auto_fill_function),
5691 Qnil, 5663 Qnil,
5692 doc: /* Function called (if non-nil) to perform auto-fill. 5664 doc: /* Function called (if non-nil) to perform auto-fill.
5693It is called after self-inserting any character specified in 5665It is called after self-inserting any character specified in
@@ -5695,30 +5667,30 @@ the `auto-fill-chars' table.
5695NOTE: This variable is not a hook; 5667NOTE: This variable is not a hook;
5696its value may not be a list of functions. */); 5668its value may not be a list of functions. */);
5697 5669
5698 DEFVAR_PER_BUFFER ("buffer-file-name", &B_ (current_buffer, filename), 5670 DEFVAR_PER_BUFFER ("buffer-file-name", &BVAR (current_buffer, filename),
5699 make_number (Lisp_String), 5671 make_number (Lisp_String),
5700 doc: /* Name of file visited in current buffer, or nil if not visiting a file. */); 5672 doc: /* Name of file visited in current buffer, or nil if not visiting a file. */);
5701 5673
5702 DEFVAR_PER_BUFFER ("buffer-file-truename", &B_ (current_buffer, file_truename), 5674 DEFVAR_PER_BUFFER ("buffer-file-truename", &BVAR (current_buffer, file_truename),
5703 make_number (Lisp_String), 5675 make_number (Lisp_String),
5704 doc: /* Abbreviated truename of file visited in current buffer, or nil if none. 5676 doc: /* Abbreviated truename of file visited in current buffer, or nil if none.
5705The truename of a file is calculated by `file-truename' 5677The truename of a file is calculated by `file-truename'
5706and then abbreviated with `abbreviate-file-name'. */); 5678and then abbreviated with `abbreviate-file-name'. */);
5707 5679
5708 DEFVAR_PER_BUFFER ("buffer-auto-save-file-name", 5680 DEFVAR_PER_BUFFER ("buffer-auto-save-file-name",
5709 &B_ (current_buffer, auto_save_file_name), 5681 &BVAR (current_buffer, auto_save_file_name),
5710 make_number (Lisp_String), 5682 make_number (Lisp_String),
5711 doc: /* Name of file for auto-saving current buffer. 5683 doc: /* Name of file for auto-saving current buffer.
5712If it is nil, that means don't auto-save this buffer. */); 5684If it is nil, that means don't auto-save this buffer. */);
5713 5685
5714 DEFVAR_PER_BUFFER ("buffer-read-only", &B_ (current_buffer, read_only), Qnil, 5686 DEFVAR_PER_BUFFER ("buffer-read-only", &BVAR (current_buffer, read_only), Qnil,
5715 doc: /* Non-nil if this buffer is read-only. */); 5687 doc: /* Non-nil if this buffer is read-only. */);
5716 5688
5717 DEFVAR_PER_BUFFER ("buffer-backed-up", &B_ (current_buffer, backed_up), Qnil, 5689 DEFVAR_PER_BUFFER ("buffer-backed-up", &BVAR (current_buffer, backed_up), Qnil,
5718 doc: /* Non-nil if this buffer's file has been backed up. 5690 doc: /* Non-nil if this buffer's file has been backed up.
5719Backing up is done before the first time the file is saved. */); 5691Backing up is done before the first time the file is saved. */);
5720 5692
5721 DEFVAR_PER_BUFFER ("buffer-saved-size", &B_ (current_buffer, save_length), 5693 DEFVAR_PER_BUFFER ("buffer-saved-size", &BVAR (current_buffer, save_length),
5722 make_number (LISP_INT_TAG), 5694 make_number (LISP_INT_TAG),
5723 doc: /* Length of current buffer when last read in, saved or auto-saved. 5695 doc: /* Length of current buffer when last read in, saved or auto-saved.
57240 initially. 56960 initially.
@@ -5728,7 +5700,7 @@ If you set this to -2, that means don't turn off auto-saving in this buffer
5728if its text size shrinks. If you use `buffer-swap-text' on a buffer, 5700if its text size shrinks. If you use `buffer-swap-text' on a buffer,
5729you probably should set this to -2 in that buffer. */); 5701you probably should set this to -2 in that buffer. */);
5730 5702
5731 DEFVAR_PER_BUFFER ("selective-display", &B_ (current_buffer, selective_display), 5703 DEFVAR_PER_BUFFER ("selective-display", &BVAR (current_buffer, selective_display),
5732 Qnil, 5704 Qnil,
5733 doc: /* Non-nil enables selective display. 5705 doc: /* Non-nil enables selective display.
5734An integer N as value means display only lines 5706An integer N as value means display only lines
@@ -5739,12 +5711,12 @@ in a file, save the ^M as a newline. */);
5739 5711
5740#ifndef old 5712#ifndef old
5741 DEFVAR_PER_BUFFER ("selective-display-ellipses", 5713 DEFVAR_PER_BUFFER ("selective-display-ellipses",
5742 &B_ (current_buffer, selective_display_ellipses), 5714 &BVAR (current_buffer, selective_display_ellipses),
5743 Qnil, 5715 Qnil,
5744 doc: /* Non-nil means display ... on previous line when a line is invisible. */); 5716 doc: /* Non-nil means display ... on previous line when a line is invisible. */);
5745#endif 5717#endif
5746 5718
5747 DEFVAR_PER_BUFFER ("overwrite-mode", &B_ (current_buffer, overwrite_mode), Qnil, 5719 DEFVAR_PER_BUFFER ("overwrite-mode", &BVAR (current_buffer, overwrite_mode), Qnil,
5748 doc: /* Non-nil if self-insertion should replace existing text. 5720 doc: /* Non-nil if self-insertion should replace existing text.
5749The value should be one of `overwrite-mode-textual', 5721The value should be one of `overwrite-mode-textual',
5750`overwrite-mode-binary', or nil. 5722`overwrite-mode-binary', or nil.
@@ -5753,7 +5725,7 @@ inserts at the end of a line, and inserts when point is before a tab,
5753until the tab is filled in. 5725until the tab is filled in.
5754If `overwrite-mode-binary', self-insertion replaces newlines and tabs too. */); 5726If `overwrite-mode-binary', self-insertion replaces newlines and tabs too. */);
5755 5727
5756 DEFVAR_PER_BUFFER ("buffer-display-table", &B_ (current_buffer, display_table), 5728 DEFVAR_PER_BUFFER ("buffer-display-table", &BVAR (current_buffer, display_table),
5757 Qnil, 5729 Qnil,
5758 doc: /* Display table that controls display of the contents of current buffer. 5730 doc: /* Display table that controls display of the contents of current buffer.
5759 5731
@@ -5790,39 +5762,39 @@ In addition, a char-table has six extra slots to control the display of:
5790 5762
5791See also the functions `display-table-slot' and `set-display-table-slot'. */); 5763See also the functions `display-table-slot' and `set-display-table-slot'. */);
5792 5764
5793 DEFVAR_PER_BUFFER ("left-margin-width", &B_ (current_buffer, left_margin_cols), 5765 DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols),
5794 Qnil, 5766 Qnil,
5795 doc: /* *Width of left marginal area for display of a buffer. 5767 doc: /* *Width of left marginal area for display of a buffer.
5796A value of nil means no marginal area. */); 5768A value of nil means no marginal area. */);
5797 5769
5798 DEFVAR_PER_BUFFER ("right-margin-width", &B_ (current_buffer, right_margin_cols), 5770 DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols),
5799 Qnil, 5771 Qnil,
5800 doc: /* *Width of right marginal area for display of a buffer. 5772 doc: /* *Width of right marginal area for display of a buffer.
5801A value of nil means no marginal area. */); 5773A value of nil means no marginal area. */);
5802 5774
5803 DEFVAR_PER_BUFFER ("left-fringe-width", &B_ (current_buffer, left_fringe_width), 5775 DEFVAR_PER_BUFFER ("left-fringe-width", &BVAR (current_buffer, left_fringe_width),
5804 Qnil, 5776 Qnil,
5805 doc: /* *Width of this buffer's left fringe (in pixels). 5777 doc: /* *Width of this buffer's left fringe (in pixels).
5806A value of 0 means no left fringe is shown in this buffer's window. 5778A value of 0 means no left fringe is shown in this buffer's window.
5807A value of nil means to use the left fringe width from the window's frame. */); 5779A value of nil means to use the left fringe width from the window's frame. */);
5808 5780
5809 DEFVAR_PER_BUFFER ("right-fringe-width", &B_ (current_buffer, right_fringe_width), 5781 DEFVAR_PER_BUFFER ("right-fringe-width", &BVAR (current_buffer, right_fringe_width),
5810 Qnil, 5782 Qnil,
5811 doc: /* *Width of this buffer's right fringe (in pixels). 5783 doc: /* *Width of this buffer's right fringe (in pixels).
5812A value of 0 means no right fringe is shown in this buffer's window. 5784A value of 0 means no right fringe is shown in this buffer's window.
5813A value of nil means to use the right fringe width from the window's frame. */); 5785A value of nil means to use the right fringe width from the window's frame. */);
5814 5786
5815 DEFVAR_PER_BUFFER ("fringes-outside-margins", &B_ (current_buffer, fringes_outside_margins), 5787 DEFVAR_PER_BUFFER ("fringes-outside-margins", &BVAR (current_buffer, fringes_outside_margins),
5816 Qnil, 5788 Qnil,
5817 doc: /* *Non-nil means to display fringes outside display margins. 5789 doc: /* *Non-nil means to display fringes outside display margins.
5818A value of nil means to display fringes between margins and buffer text. */); 5790A value of nil means to display fringes between margins and buffer text. */);
5819 5791
5820 DEFVAR_PER_BUFFER ("scroll-bar-width", &B_ (current_buffer, scroll_bar_width), 5792 DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width),
5821 Qnil, 5793 Qnil,
5822 doc: /* *Width of this buffer's scroll bars in pixels. 5794 doc: /* *Width of this buffer's scroll bars in pixels.
5823A value of nil means to use the scroll bar width from the window's frame. */); 5795A value of nil means to use the scroll bar width from the window's frame. */);
5824 5796
5825 DEFVAR_PER_BUFFER ("vertical-scroll-bar", &B_ (current_buffer, vertical_scroll_bar_type), 5797 DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type),
5826 Qnil, 5798 Qnil,
5827 doc: /* *Position of this buffer's vertical scroll bar. 5799 doc: /* *Position of this buffer's vertical scroll bar.
5828The value takes effect whenever you tell a window to display this buffer; 5800The value takes effect whenever you tell a window to display this buffer;
@@ -5833,13 +5805,13 @@ of the window; a value of nil means don't show any vertical scroll bars.
5833A value of t (the default) means do whatever the window's frame specifies. */); 5805A value of t (the default) means do whatever the window's frame specifies. */);
5834 5806
5835 DEFVAR_PER_BUFFER ("indicate-empty-lines", 5807 DEFVAR_PER_BUFFER ("indicate-empty-lines",
5836 &B_ (current_buffer, indicate_empty_lines), Qnil, 5808 &BVAR (current_buffer, indicate_empty_lines), Qnil,
5837 doc: /* *Visually indicate empty lines after the buffer end. 5809 doc: /* *Visually indicate empty lines after the buffer end.
5838If non-nil, a bitmap is displayed in the left fringe of a window on 5810If non-nil, a bitmap is displayed in the left fringe of a window on
5839window-systems. */); 5811window-systems. */);
5840 5812
5841 DEFVAR_PER_BUFFER ("indicate-buffer-boundaries", 5813 DEFVAR_PER_BUFFER ("indicate-buffer-boundaries",
5842 &B_ (current_buffer, indicate_buffer_boundaries), Qnil, 5814 &BVAR (current_buffer, indicate_buffer_boundaries), Qnil,
5843 doc: /* *Visually indicate buffer boundaries and scrolling. 5815 doc: /* *Visually indicate buffer boundaries and scrolling.
5844If non-nil, the first and last line of the buffer are marked in the fringe 5816If non-nil, the first and last line of the buffer are marked in the fringe
5845of a window on window-systems with angle bitmaps, or if the window can be 5817of a window on window-systems with angle bitmaps, or if the window can be
@@ -5864,7 +5836,7 @@ bitmaps in right fringe. To show just the angle bitmaps in the left
5864fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). */); 5836fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). */);
5865 5837
5866 DEFVAR_PER_BUFFER ("fringe-indicator-alist", 5838 DEFVAR_PER_BUFFER ("fringe-indicator-alist",
5867 &B_ (current_buffer, fringe_indicator_alist), Qnil, 5839 &BVAR (current_buffer, fringe_indicator_alist), Qnil,
5868 doc: /* *Mapping from logical to physical fringe indicator bitmaps. 5840 doc: /* *Mapping from logical to physical fringe indicator bitmaps.
5869The value is an alist where each element (INDICATOR . BITMAPS) 5841The value is an alist where each element (INDICATOR . BITMAPS)
5870specifies the fringe bitmaps used to display a specific logical 5842specifies the fringe bitmaps used to display a specific logical
@@ -5883,7 +5855,7 @@ last (only) line has no final newline. BITMAPS may also be a single
5883symbol which is used in both left and right fringes. */); 5855symbol which is used in both left and right fringes. */);
5884 5856
5885 DEFVAR_PER_BUFFER ("fringe-cursor-alist", 5857 DEFVAR_PER_BUFFER ("fringe-cursor-alist",
5886 &B_ (current_buffer, fringe_cursor_alist), Qnil, 5858 &BVAR (current_buffer, fringe_cursor_alist), Qnil,
5887 doc: /* *Mapping from logical to physical fringe cursor bitmaps. 5859 doc: /* *Mapping from logical to physical fringe cursor bitmaps.
5888The value is an alist where each element (CURSOR . BITMAP) 5860The value is an alist where each element (CURSOR . BITMAP)
5889specifies the fringe bitmaps used to display a specific logical 5861specifies the fringe bitmaps used to display a specific logical
@@ -5898,7 +5870,7 @@ BITMAP is the corresponding fringe bitmap shown for the logical
5898cursor type. */); 5870cursor type. */);
5899 5871
5900 DEFVAR_PER_BUFFER ("scroll-up-aggressively", 5872 DEFVAR_PER_BUFFER ("scroll-up-aggressively",
5901 &B_ (current_buffer, scroll_up_aggressively), Qnil, 5873 &BVAR (current_buffer, scroll_up_aggressively), Qnil,
5902 doc: /* How far to scroll windows upward. 5874 doc: /* How far to scroll windows upward.
5903If you move point off the bottom, the window scrolls automatically. 5875If you move point off the bottom, the window scrolls automatically.
5904This variable controls how far it scrolls. The value nil, the default, 5876This variable controls how far it scrolls. The value nil, the default,
@@ -5911,7 +5883,7 @@ window scrolls by a full window height. Meaningful values are
5911between 0.0 and 1.0, inclusive. */); 5883between 0.0 and 1.0, inclusive. */);
5912 5884
5913 DEFVAR_PER_BUFFER ("scroll-down-aggressively", 5885 DEFVAR_PER_BUFFER ("scroll-down-aggressively",
5914 &B_ (current_buffer, scroll_down_aggressively), Qnil, 5886 &BVAR (current_buffer, scroll_down_aggressively), Qnil,
5915 doc: /* How far to scroll windows downward. 5887 doc: /* How far to scroll windows downward.
5916If you move point off the top, the window scrolls automatically. 5888If you move point off the top, the window scrolls automatically.
5917This variable controls how far it scrolls. The value nil, the default, 5889This variable controls how far it scrolls. The value nil, the default,
@@ -5966,7 +5938,7 @@ from happening repeatedly and making Emacs nonfunctional. */);
5966The functions are run using the `run-hooks' function. */); 5938The functions are run using the `run-hooks' function. */);
5967 Vfirst_change_hook = Qnil; 5939 Vfirst_change_hook = Qnil;
5968 5940
5969 DEFVAR_PER_BUFFER ("buffer-undo-list", &B_ (current_buffer, undo_list), Qnil, 5941 DEFVAR_PER_BUFFER ("buffer-undo-list", &BVAR (current_buffer, undo_list), Qnil,
5970 doc: /* List of undo entries in current buffer. 5942 doc: /* List of undo entries in current buffer.
5971Recent changes come first; older changes follow newer. 5943Recent changes come first; older changes follow newer.
5972 5944
@@ -6007,10 +5979,10 @@ the changes between two undo boundaries as a single step to be undone.
6007 5979
6008If the value of the variable is t, undo information is not recorded. */); 5980If the value of the variable is t, undo information is not recorded. */);
6009 5981
6010 DEFVAR_PER_BUFFER ("mark-active", &B_ (current_buffer, mark_active), Qnil, 5982 DEFVAR_PER_BUFFER ("mark-active", &BVAR (current_buffer, mark_active), Qnil,
6011 doc: /* Non-nil means the mark and region are currently active in this buffer. */); 5983 doc: /* Non-nil means the mark and region are currently active in this buffer. */);
6012 5984
6013 DEFVAR_PER_BUFFER ("cache-long-line-scans", &B_ (current_buffer, cache_long_line_scans), Qnil, 5985 DEFVAR_PER_BUFFER ("cache-long-line-scans", &BVAR (current_buffer, cache_long_line_scans), Qnil,
6014 doc: /* Non-nil means that Emacs should use caches to handle long lines more quickly. 5986 doc: /* Non-nil means that Emacs should use caches to handle long lines more quickly.
6015 5987
6016Normally, the line-motion functions work by scanning the buffer for 5988Normally, the line-motion functions work by scanning the buffer for
@@ -6038,23 +6010,23 @@ maintained internally by the Emacs primitives. Enabling or disabling
6038the cache should not affect the behavior of any of the motion 6010the cache should not affect the behavior of any of the motion
6039functions; it should only affect their performance. */); 6011functions; it should only affect their performance. */);
6040 6012
6041 DEFVAR_PER_BUFFER ("point-before-scroll", &B_ (current_buffer, point_before_scroll), Qnil, 6013 DEFVAR_PER_BUFFER ("point-before-scroll", &BVAR (current_buffer, point_before_scroll), Qnil,
6042 doc: /* Value of point before the last series of scroll operations, or nil. */); 6014 doc: /* Value of point before the last series of scroll operations, or nil. */);
6043 6015
6044 DEFVAR_PER_BUFFER ("buffer-file-format", &B_ (current_buffer, file_format), Qnil, 6016 DEFVAR_PER_BUFFER ("buffer-file-format", &BVAR (current_buffer, file_format), Qnil,
6045 doc: /* List of formats to use when saving this buffer. 6017 doc: /* List of formats to use when saving this buffer.
6046Formats are defined by `format-alist'. This variable is 6018Formats are defined by `format-alist'. This variable is
6047set when a file is visited. */); 6019set when a file is visited. */);
6048 6020
6049 DEFVAR_PER_BUFFER ("buffer-auto-save-file-format", 6021 DEFVAR_PER_BUFFER ("buffer-auto-save-file-format",
6050 &B_ (current_buffer, auto_save_file_format), Qnil, 6022 &BVAR (current_buffer, auto_save_file_format), Qnil,
6051 doc: /* *Format in which to write auto-save files. 6023 doc: /* *Format in which to write auto-save files.
6052Should be a list of symbols naming formats that are defined in `format-alist'. 6024Should be a list of symbols naming formats that are defined in `format-alist'.
6053If it is t, which is the default, auto-save files are written in the 6025If it is t, which is the default, auto-save files are written in the
6054same format as a regular save would use. */); 6026same format as a regular save would use. */);
6055 6027
6056 DEFVAR_PER_BUFFER ("buffer-invisibility-spec", 6028 DEFVAR_PER_BUFFER ("buffer-invisibility-spec",
6057 &B_ (current_buffer, invisibility_spec), Qnil, 6029 &BVAR (current_buffer, invisibility_spec), Qnil,
6058 doc: /* Invisibility spec of this buffer. 6030 doc: /* Invisibility spec of this buffer.
6059The default is t, which means that text is invisible 6031The default is t, which means that text is invisible
6060if it has a non-nil `invisible' property. 6032if it has a non-nil `invisible' property.
@@ -6065,12 +6037,12 @@ then characters with property value PROP are invisible,
6065and they have an ellipsis as well if ELLIPSIS is non-nil. */); 6037and they have an ellipsis as well if ELLIPSIS is non-nil. */);
6066 6038
6067 DEFVAR_PER_BUFFER ("buffer-display-count", 6039 DEFVAR_PER_BUFFER ("buffer-display-count",
6068 &B_ (current_buffer, display_count), Qnil, 6040 &BVAR (current_buffer, display_count), Qnil,
6069 doc: /* A number incremented each time this buffer is displayed in a window. 6041 doc: /* A number incremented each time this buffer is displayed in a window.
6070The function `set-window-buffer' increments it. */); 6042The function `set-window-buffer' increments it. */);
6071 6043
6072 DEFVAR_PER_BUFFER ("buffer-display-time", 6044 DEFVAR_PER_BUFFER ("buffer-display-time",
6073 &B_ (current_buffer, display_time), Qnil, 6045 &BVAR (current_buffer, display_time), Qnil,
6074 doc: /* Time stamp updated each time this buffer is displayed in a window. 6046 doc: /* Time stamp updated each time this buffer is displayed in a window.
6075The function `set-window-buffer' updates this variable 6047The function `set-window-buffer' updates this variable
6076to the value obtained by calling `current-time'. 6048to the value obtained by calling `current-time'.
@@ -6105,7 +6077,7 @@ and disregard a `read-only' text property if the property value
6105is a member of the list. */); 6077is a member of the list. */);
6106 Vinhibit_read_only = Qnil; 6078 Vinhibit_read_only = Qnil;
6107 6079
6108 DEFVAR_PER_BUFFER ("cursor-type", &B_ (current_buffer, cursor_type), Qnil, 6080 DEFVAR_PER_BUFFER ("cursor-type", &BVAR (current_buffer, cursor_type), Qnil,
6109 doc: /* Cursor to use when this buffer is in the selected window. 6081 doc: /* Cursor to use when this buffer is in the selected window.
6110Values are interpreted as follows: 6082Values are interpreted as follows:
6111 6083
@@ -6124,7 +6096,7 @@ cursor's appearance is instead controlled by the variable
6124`cursor-in-non-selected-windows'. */); 6096`cursor-in-non-selected-windows'. */);
6125 6097
6126 DEFVAR_PER_BUFFER ("line-spacing", 6098 DEFVAR_PER_BUFFER ("line-spacing",
6127 &B_ (current_buffer, extra_line_spacing), Qnil, 6099 &BVAR (current_buffer, extra_line_spacing), Qnil,
6128 doc: /* Additional space to put between lines when displaying a buffer. 6100 doc: /* Additional space to put between lines when displaying a buffer.
6129The space is measured in pixels, and put below lines on graphic displays, 6101The space is measured in pixels, and put below lines on graphic displays,
6130see `display-graphic-p'. 6102see `display-graphic-p'.
@@ -6132,7 +6104,7 @@ If value is a floating point number, it specifies the spacing relative
6132to the default frame line height. A value of nil means add no extra space. */); 6104to the default frame line height. A value of nil means add no extra space. */);
6133 6105
6134 DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", 6106 DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows",
6135 &B_ (current_buffer, cursor_in_non_selected_windows), Qnil, 6107 &BVAR (current_buffer, cursor_in_non_selected_windows), Qnil,
6136 doc: /* *Non-nil means show a cursor in non-selected windows. 6108 doc: /* *Non-nil means show a cursor in non-selected windows.
6137If nil, only shows a cursor in the selected window. 6109If nil, only shows a cursor in the selected window.
6138If t, displays a cursor related to the usual cursor type 6110If t, displays a cursor related to the usual cursor type