aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorStefan Monnier2011-02-21 17:34:51 -0500
committerStefan Monnier2011-02-21 17:34:51 -0500
commitf619ad4ca2ce943d53589469c010e451afab97dd (patch)
treee1b71f79518372ecab4c677ae948504450d8bf5d /src/buffer.h
parenta647cb26b695a542e3a546104afdf4c7c47eb061 (diff)
parent9f8370e63f65f76887b319ab6a0368d4a332777c (diff)
downloademacs-f619ad4ca2ce943d53589469c010e451afab97dd.tar.gz
emacs-f619ad4ca2ce943d53589469c010e451afab97dd.zip
Merge from trunk
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h155
1 files changed, 79 insertions, 76 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 31f96040b2d..65c7168d60a 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -321,7 +321,7 @@ while (0)
321/* Return character at byte position POS. */ 321/* Return character at byte position POS. */
322 322
323#define FETCH_CHAR(pos) \ 323#define FETCH_CHAR(pos) \
324 (!NILP (current_buffer->enable_multibyte_characters) \ 324 (!NILP (BVAR (current_buffer, enable_multibyte_characters)) \
325 ? FETCH_MULTIBYTE_CHAR ((pos)) \ 325 ? FETCH_MULTIBYTE_CHAR ((pos)) \
326 : FETCH_BYTE ((pos))) 326 : FETCH_BYTE ((pos)))
327 327
@@ -346,7 +346,7 @@ extern unsigned char *_fetch_multibyte_char_p;
346 multibyte. */ 346 multibyte. */
347 347
348#define FETCH_CHAR_AS_MULTIBYTE(pos) \ 348#define FETCH_CHAR_AS_MULTIBYTE(pos) \
349 (!NILP (current_buffer->enable_multibyte_characters) \ 349 (!NILP (BVAR (current_buffer, enable_multibyte_characters)) \
350 ? FETCH_MULTIBYTE_CHAR ((pos)) \ 350 ? FETCH_MULTIBYTE_CHAR ((pos)) \
351 : UNIBYTE_TO_CHAR (FETCH_BYTE ((pos)))) 351 : UNIBYTE_TO_CHAR (FETCH_BYTE ((pos))))
352 352
@@ -464,6 +464,15 @@ struct buffer_text
464 int inhibit_shrinking; 464 int inhibit_shrinking;
465 }; 465 };
466 466
467/* Lisp fields in struct buffer are hidden from most code and accessed
468 via the BVAR macro, below. Only select pieces of code, like the GC,
469 are allowed to use BUFFER_INTERNAL_FIELD. */
470#define BUFFER_INTERNAL_FIELD(field) field ## _
471
472/* Most code should use this macro to access Lisp fields in struct
473 buffer. */
474#define BVAR(buf, field) ((buf)->BUFFER_INTERNAL_FIELD (field))
475
467/* This is the structure that the buffer Lisp object points to. */ 476/* This is the structure that the buffer Lisp object points to. */
468 477
469struct buffer 478struct buffer
@@ -587,138 +596,132 @@ struct buffer
587 because local variables have to be right in the struct buffer. 596 because local variables have to be right in the struct buffer.
588 So we copy it around in set_buffer_internal. 597 So we copy it around in set_buffer_internal.
589 This comes before `name' because it is marked in a special way. */ 598 This comes before `name' because it is marked in a special way. */
590 Lisp_Object undo_list; 599 Lisp_Object BUFFER_INTERNAL_FIELD (undo_list);
591 600
592 /* The name of this buffer. */ 601 /* The name of this buffer. */
593 Lisp_Object name; 602 Lisp_Object BUFFER_INTERNAL_FIELD (name);
594 603
595 /* The name of the file visited in this buffer, or nil. */ 604 /* The name of the file visited in this buffer, or nil. */
596 Lisp_Object filename; 605 Lisp_Object BUFFER_INTERNAL_FIELD (filename);
597 /* Dir for expanding relative file names. */ 606 /* Dir for expanding relative file names. */
598 Lisp_Object directory; 607 Lisp_Object BUFFER_INTERNAL_FIELD (directory);
599 /* True if this buffer has been backed up (if you write to the 608 /* True if this buffer has been backed up (if you write to the
600 visited file and it hasn't been backed up, then a backup will 609 visited file and it hasn't been backed up, then a backup will
601 be made). */ 610 be made). */
602 /* This isn't really used by the C code, so could be deleted. */ 611 /* This isn't really used by the C code, so could be deleted. */
603 Lisp_Object backed_up; 612 Lisp_Object BUFFER_INTERNAL_FIELD (backed_up);
604 /* Length of file when last read or saved. 613 /* Length of file when last read or saved.
605 -1 means auto saving turned off because buffer shrank a lot. 614 -1 means auto saving turned off because buffer shrank a lot.
606 -2 means don't turn off auto saving if buffer shrinks. 615 -2 means don't turn off auto saving if buffer shrinks.
607 (That value is used with buffer-swap-text.) 616 (That value is used with buffer-swap-text.)
608 This is not in the struct buffer_text 617 This is not in the struct buffer_text
609 because it's not used in indirect buffers at all. */ 618 because it's not used in indirect buffers at all. */
610 Lisp_Object save_length; 619 Lisp_Object BUFFER_INTERNAL_FIELD (save_length);
611 /* File name used for auto-saving this buffer. 620 /* File name used for auto-saving this buffer.
612 This is not in the struct buffer_text 621 This is not in the struct buffer_text
613 because it's not used in indirect buffers at all. */ 622 because it's not used in indirect buffers at all. */
614 Lisp_Object auto_save_file_name; 623 Lisp_Object BUFFER_INTERNAL_FIELD (auto_save_file_name);
615 624
616 /* Non-nil if buffer read-only. */ 625 /* Non-nil if buffer read-only. */
617 Lisp_Object read_only; 626 Lisp_Object BUFFER_INTERNAL_FIELD (read_only);
618 /* "The mark". This is a marker which may 627 /* "The mark". This is a marker which may
619 point into this buffer or may point nowhere. */ 628 point into this buffer or may point nowhere. */
620 Lisp_Object mark; 629 Lisp_Object BUFFER_INTERNAL_FIELD (mark);
621 630
622 /* Alist of elements (SYMBOL . VALUE-IN-THIS-BUFFER) for all 631 /* Alist of elements (SYMBOL . VALUE-IN-THIS-BUFFER) for all
623 per-buffer variables of this buffer. For locally unbound 632 per-buffer variables of this buffer. For locally unbound
624 symbols, just the symbol appears as the element. */ 633 symbols, just the symbol appears as the element. */
625 Lisp_Object local_var_alist; 634 Lisp_Object BUFFER_INTERNAL_FIELD (local_var_alist);
626 635
627 /* Symbol naming major mode (eg, lisp-mode). */ 636 /* Symbol naming major mode (eg, lisp-mode). */
628 Lisp_Object major_mode; 637 Lisp_Object BUFFER_INTERNAL_FIELD (major_mode);
629 /* Pretty name of major mode (eg, "Lisp"). */ 638 /* Pretty name of major mode (eg, "Lisp"). */
630 Lisp_Object mode_name; 639 Lisp_Object BUFFER_INTERNAL_FIELD (mode_name);
631 /* Mode line element that controls format of mode line. */ 640 /* Mode line element that controls format of mode line. */
632 Lisp_Object mode_line_format; 641 Lisp_Object BUFFER_INTERNAL_FIELD (mode_line_format);
633 642
634 /* Analogous to mode_line_format for the line displayed at the top 643 /* Analogous to mode_line_format for the line displayed at the top
635 of windows. Nil means don't display that line. */ 644 of windows. Nil means don't display that line. */
636 Lisp_Object header_line_format; 645 Lisp_Object BUFFER_INTERNAL_FIELD (header_line_format);
637 646
638 /* Keys that are bound local to this buffer. */ 647 /* Keys that are bound local to this buffer. */
639 Lisp_Object keymap; 648 Lisp_Object BUFFER_INTERNAL_FIELD (keymap);
640 /* This buffer's local abbrev table. */ 649 /* This buffer's local abbrev table. */
641 Lisp_Object abbrev_table; 650 Lisp_Object BUFFER_INTERNAL_FIELD (abbrev_table);
642 /* This buffer's syntax table. */ 651 /* This buffer's syntax table. */
643 Lisp_Object syntax_table; 652 Lisp_Object BUFFER_INTERNAL_FIELD (syntax_table);
644 /* This buffer's category table. */ 653 /* This buffer's category table. */
645 Lisp_Object category_table; 654 Lisp_Object BUFFER_INTERNAL_FIELD (category_table);
646 655
647 /* Values of several buffer-local variables. */ 656 /* Values of several buffer-local variables. */
648 /* tab-width is buffer-local so that redisplay can find it 657 /* tab-width is buffer-local so that redisplay can find it
649 in buffers that are not current. */ 658 in buffers that are not current. */
650 Lisp_Object case_fold_search; 659 Lisp_Object BUFFER_INTERNAL_FIELD (case_fold_search);
651 Lisp_Object tab_width; 660 Lisp_Object BUFFER_INTERNAL_FIELD (tab_width);
652 Lisp_Object fill_column; 661 Lisp_Object BUFFER_INTERNAL_FIELD (fill_column);
653 Lisp_Object left_margin; 662 Lisp_Object BUFFER_INTERNAL_FIELD (left_margin);
654 /* Function to call when insert space past fill column. */ 663 /* Function to call when insert space past fill column. */
655 Lisp_Object auto_fill_function; 664 Lisp_Object BUFFER_INTERNAL_FIELD (auto_fill_function);
656 /* nil: text, t: binary.
657 This value is meaningful only on certain operating systems. */
658 /* Actually, we don't need this flag any more because end-of-line
659 is handled correctly according to the buffer-file-coding-system
660 of the buffer. Just keeping it for backward compatibility. */
661 Lisp_Object buffer_file_type;
662 665
663 /* Case table for case-conversion in this buffer. 666 /* Case table for case-conversion in this buffer.
664 This char-table maps each char into its lower-case version. */ 667 This char-table maps each char into its lower-case version. */
665 Lisp_Object downcase_table; 668 Lisp_Object BUFFER_INTERNAL_FIELD (downcase_table);
666 /* Char-table mapping each char to its upper-case version. */ 669 /* Char-table mapping each char to its upper-case version. */
667 Lisp_Object upcase_table; 670 Lisp_Object BUFFER_INTERNAL_FIELD (upcase_table);
668 /* Char-table for conversion for case-folding search. */ 671 /* Char-table for conversion for case-folding search. */
669 Lisp_Object case_canon_table; 672 Lisp_Object BUFFER_INTERNAL_FIELD (case_canon_table);
670 /* Char-table of equivalences for case-folding search. */ 673 /* Char-table of equivalences for case-folding search. */
671 Lisp_Object case_eqv_table; 674 Lisp_Object BUFFER_INTERNAL_FIELD (case_eqv_table);
672 675
673 /* Non-nil means do not display continuation lines. */ 676 /* Non-nil means do not display continuation lines. */
674 Lisp_Object truncate_lines; 677 Lisp_Object BUFFER_INTERNAL_FIELD (truncate_lines);
675 /* Non-nil means to use word wrapping when displaying continuation lines. */ 678 /* Non-nil means to use word wrapping when displaying continuation lines. */
676 Lisp_Object word_wrap; 679 Lisp_Object BUFFER_INTERNAL_FIELD (word_wrap);
677 /* Non-nil means display ctl chars with uparrow. */ 680 /* Non-nil means display ctl chars with uparrow. */
678 Lisp_Object ctl_arrow; 681 Lisp_Object BUFFER_INTERNAL_FIELD (ctl_arrow);
679 /* Non-nil means reorder bidirectional text for display in the 682 /* Non-nil means reorder bidirectional text for display in the
680 visual order. */ 683 visual order. */
681 Lisp_Object bidi_display_reordering; 684 Lisp_Object BUFFER_INTERNAL_FIELD (bidi_display_reordering);
682 /* If non-nil, specifies which direction of text to force in all the 685 /* If non-nil, specifies which direction of text to force in all the
683 paragraphs of the buffer. Nil means determine paragraph 686 paragraphs of the buffer. Nil means determine paragraph
684 direction dynamically for each paragraph. */ 687 direction dynamically for each paragraph. */
685 Lisp_Object bidi_paragraph_direction; 688 Lisp_Object BUFFER_INTERNAL_FIELD (bidi_paragraph_direction);
686 /* Non-nil means do selective display; 689 /* Non-nil means do selective display;
687 see doc string in syms_of_buffer (buffer.c) for details. */ 690 see doc string in syms_of_buffer (buffer.c) for details. */
688 Lisp_Object selective_display; 691 Lisp_Object BUFFER_INTERNAL_FIELD (selective_display);
689#ifndef old 692#ifndef old
690 /* Non-nil means show ... at end of line followed by invisible lines. */ 693 /* Non-nil means show ... at end of line followed by invisible lines. */
691 Lisp_Object selective_display_ellipses; 694 Lisp_Object BUFFER_INTERNAL_FIELD (selective_display_ellipses);
692#endif 695#endif
693 /* Alist of (FUNCTION . STRING) for each minor mode enabled in buffer. */ 696 /* Alist of (FUNCTION . STRING) for each minor mode enabled in buffer. */
694 Lisp_Object minor_modes; 697 Lisp_Object BUFFER_INTERNAL_FIELD (minor_modes);
695 /* t if "self-insertion" should overwrite; `binary' if it should also 698 /* t if "self-insertion" should overwrite; `binary' if it should also
696 overwrite newlines and tabs - for editing executables and the like. */ 699 overwrite newlines and tabs - for editing executables and the like. */
697 Lisp_Object overwrite_mode; 700 Lisp_Object BUFFER_INTERNAL_FIELD (overwrite_mode);
698 /* non-nil means abbrev mode is on. Expand abbrevs automatically. */ 701 /* non-nil means abbrev mode is on. Expand abbrevs automatically. */
699 Lisp_Object abbrev_mode; 702 Lisp_Object BUFFER_INTERNAL_FIELD (abbrev_mode);
700 /* Display table to use for text in this buffer. */ 703 /* Display table to use for text in this buffer. */
701 Lisp_Object display_table; 704 Lisp_Object BUFFER_INTERNAL_FIELD (display_table);
702 /* t means the mark and region are currently active. */ 705 /* t means the mark and region are currently active. */
703 Lisp_Object mark_active; 706 Lisp_Object BUFFER_INTERNAL_FIELD (mark_active);
704 707
705 /* Non-nil means the buffer contents are regarded as multi-byte 708 /* Non-nil means the buffer contents are regarded as multi-byte
706 form of characters, not a binary code. */ 709 form of characters, not a binary code. */
707 Lisp_Object enable_multibyte_characters; 710 Lisp_Object BUFFER_INTERNAL_FIELD (enable_multibyte_characters);
708 711
709 /* Coding system to be used for encoding the buffer contents on 712 /* Coding system to be used for encoding the buffer contents on
710 saving. */ 713 saving. */
711 Lisp_Object buffer_file_coding_system; 714 Lisp_Object BUFFER_INTERNAL_FIELD (buffer_file_coding_system);
712 715
713 /* List of symbols naming the file format used for visited file. */ 716 /* List of symbols naming the file format used for visited file. */
714 Lisp_Object file_format; 717 Lisp_Object BUFFER_INTERNAL_FIELD (file_format);
715 718
716 /* List of symbols naming the file format used for auto-save file. */ 719 /* List of symbols naming the file format used for auto-save file. */
717 Lisp_Object auto_save_file_format; 720 Lisp_Object BUFFER_INTERNAL_FIELD (auto_save_file_format);
718 721
719 /* True if the newline position cache and width run cache are 722 /* True if the newline position cache and width run cache are
720 enabled. See search.c and indent.c. */ 723 enabled. See search.c and indent.c. */
721 Lisp_Object cache_long_line_scans; 724 Lisp_Object BUFFER_INTERNAL_FIELD (cache_long_line_scans);
722 725
723 /* If the width run cache is enabled, this table contains the 726 /* If the width run cache is enabled, this table contains the
724 character widths width_run_cache (see above) assumes. When we 727 character widths width_run_cache (see above) assumes. When we
@@ -726,99 +729,99 @@ struct buffer
726 current display table to see whether the display table has 729 current display table to see whether the display table has
727 affected the widths of any characters. If it has, we 730 affected the widths of any characters. If it has, we
728 invalidate the width run cache, and re-initialize width_table. */ 731 invalidate the width run cache, and re-initialize width_table. */
729 Lisp_Object width_table; 732 Lisp_Object BUFFER_INTERNAL_FIELD (width_table);
730 733
731 /* In an indirect buffer, or a buffer that is the base of an 734 /* In an indirect buffer, or a buffer that is the base of an
732 indirect buffer, this holds a marker that records 735 indirect buffer, this holds a marker that records
733 PT for this buffer when the buffer is not current. */ 736 PT for this buffer when the buffer is not current. */
734 Lisp_Object pt_marker; 737 Lisp_Object BUFFER_INTERNAL_FIELD (pt_marker);
735 738
736 /* In an indirect buffer, or a buffer that is the base of an 739 /* In an indirect buffer, or a buffer that is the base of an
737 indirect buffer, this holds a marker that records 740 indirect buffer, this holds a marker that records
738 BEGV for this buffer when the buffer is not current. */ 741 BEGV for this buffer when the buffer is not current. */
739 Lisp_Object begv_marker; 742 Lisp_Object BUFFER_INTERNAL_FIELD (begv_marker);
740 743
741 /* In an indirect buffer, or a buffer that is the base of an 744 /* In an indirect buffer, or a buffer that is the base of an
742 indirect buffer, this holds a marker that records 745 indirect buffer, this holds a marker that records
743 ZV for this buffer when the buffer is not current. */ 746 ZV for this buffer when the buffer is not current. */
744 Lisp_Object zv_marker; 747 Lisp_Object BUFFER_INTERNAL_FIELD (zv_marker);
745 748
746 /* This holds the point value before the last scroll operation. 749 /* This holds the point value before the last scroll operation.
747 Explicitly setting point sets this to nil. */ 750 Explicitly setting point sets this to nil. */
748 Lisp_Object point_before_scroll; 751 Lisp_Object BUFFER_INTERNAL_FIELD (point_before_scroll);
749 752
750 /* Truename of the visited file, or nil. */ 753 /* Truename of the visited file, or nil. */
751 Lisp_Object file_truename; 754 Lisp_Object BUFFER_INTERNAL_FIELD (file_truename);
752 755
753 /* Invisibility spec of this buffer. 756 /* Invisibility spec of this buffer.
754 t => any non-nil `invisible' property means invisible. 757 t => any non-nil `invisible' property means invisible.
755 A list => `invisible' property means invisible 758 A list => `invisible' property means invisible
756 if it is memq in that list. */ 759 if it is memq in that list. */
757 Lisp_Object invisibility_spec; 760 Lisp_Object BUFFER_INTERNAL_FIELD (invisibility_spec);
758 761
759 /* This is the last window that was selected with this buffer in it, 762 /* This is the last window that was selected with this buffer in it,
760 or nil if that window no longer displays this buffer. */ 763 or nil if that window no longer displays this buffer. */
761 Lisp_Object last_selected_window; 764 Lisp_Object BUFFER_INTERNAL_FIELD (last_selected_window);
762 765
763 /* Incremented each time the buffer is displayed in a window. */ 766 /* Incremented each time the buffer is displayed in a window. */
764 Lisp_Object display_count; 767 Lisp_Object BUFFER_INTERNAL_FIELD (display_count);
765 768
766 /* Widths of left and right marginal areas for windows displaying 769 /* Widths of left and right marginal areas for windows displaying
767 this buffer. */ 770 this buffer. */
768 Lisp_Object left_margin_cols, right_margin_cols; 771 Lisp_Object BUFFER_INTERNAL_FIELD (left_margin_cols), BUFFER_INTERNAL_FIELD (right_margin_cols);
769 772
770 /* Widths of left and right fringe areas for windows displaying 773 /* Widths of left and right fringe areas for windows displaying
771 this buffer. */ 774 this buffer. */
772 Lisp_Object left_fringe_width, right_fringe_width; 775 Lisp_Object BUFFER_INTERNAL_FIELD (left_fringe_width), BUFFER_INTERNAL_FIELD (right_fringe_width);
773 776
774 /* Non-nil means fringes are drawn outside display margins; 777 /* Non-nil means fringes are drawn outside display margins;
775 othersize draw them between margin areas and text. */ 778 othersize draw them between margin areas and text. */
776 Lisp_Object fringes_outside_margins; 779 Lisp_Object BUFFER_INTERNAL_FIELD (fringes_outside_margins);
777 780
778 /* Width and type of scroll bar areas for windows displaying 781 /* Width and type of scroll bar areas for windows displaying
779 this buffer. */ 782 this buffer. */
780 Lisp_Object scroll_bar_width, vertical_scroll_bar_type; 783 Lisp_Object BUFFER_INTERNAL_FIELD (scroll_bar_width), BUFFER_INTERNAL_FIELD (vertical_scroll_bar_type);
781 784
782 /* Non-nil means indicate lines not displaying text (in a style 785 /* Non-nil means indicate lines not displaying text (in a style
783 like vi). */ 786 like vi). */
784 Lisp_Object indicate_empty_lines; 787 Lisp_Object BUFFER_INTERNAL_FIELD (indicate_empty_lines);
785 788
786 /* Non-nil means indicate buffer boundaries and scrolling. */ 789 /* Non-nil means indicate buffer boundaries and scrolling. */
787 Lisp_Object indicate_buffer_boundaries; 790 Lisp_Object BUFFER_INTERNAL_FIELD (indicate_buffer_boundaries);
788 791
789 /* Logical to physical fringe bitmap mappings. */ 792 /* Logical to physical fringe bitmap mappings. */
790 Lisp_Object fringe_indicator_alist; 793 Lisp_Object BUFFER_INTERNAL_FIELD (fringe_indicator_alist);
791 794
792 /* Logical to physical cursor bitmap mappings. */ 795 /* Logical to physical cursor bitmap mappings. */
793 Lisp_Object fringe_cursor_alist; 796 Lisp_Object BUFFER_INTERNAL_FIELD (fringe_cursor_alist);
794 797
795 /* Time stamp updated each time this buffer is displayed in a window. */ 798 /* Time stamp updated each time this buffer is displayed in a window. */
796 Lisp_Object display_time; 799 Lisp_Object BUFFER_INTERNAL_FIELD (display_time);
797 800
798 /* If scrolling the display because point is below the bottom of a 801 /* If scrolling the display because point is below the bottom of a
799 window showing this buffer, try to choose a window start so 802 window showing this buffer, try to choose a window start so
800 that point ends up this number of lines from the top of the 803 that point ends up this number of lines from the top of the
801 window. Nil means that scrolling method isn't used. */ 804 window. Nil means that scrolling method isn't used. */
802 Lisp_Object scroll_up_aggressively; 805 Lisp_Object BUFFER_INTERNAL_FIELD (scroll_up_aggressively);
803 806
804 /* If scrolling the display because point is above the top of a 807 /* If scrolling the display because point is above the top of a
805 window showing this buffer, try to choose a window start so 808 window showing this buffer, try to choose a window start so
806 that point ends up this number of lines from the bottom of the 809 that point ends up this number of lines from the bottom of the
807 window. Nil means that scrolling method isn't used. */ 810 window. Nil means that scrolling method isn't used. */
808 Lisp_Object scroll_down_aggressively; 811 Lisp_Object BUFFER_INTERNAL_FIELD (scroll_down_aggressively);
809 812
810 /* Desired cursor type in this buffer. See the doc string of 813 /* Desired cursor type in this buffer. See the doc string of
811 per-buffer variable `cursor-type'. */ 814 per-buffer variable `cursor-type'. */
812 Lisp_Object cursor_type; 815 Lisp_Object BUFFER_INTERNAL_FIELD (cursor_type);
813 816
814 /* An integer > 0 means put that number of pixels below text lines 817 /* An integer > 0 means put that number of pixels below text lines
815 in the display of this buffer. */ 818 in the display of this buffer. */
816 Lisp_Object extra_line_spacing; 819 Lisp_Object BUFFER_INTERNAL_FIELD (extra_line_spacing);
817 820
818 /* *Cursor type to display in non-selected windows. 821 /* *Cursor type to display in non-selected windows.
819 t means to use hollow box cursor. 822 t means to use hollow box cursor.
820 See `cursor-type' for other values. */ 823 See `cursor-type' for other values. */
821 Lisp_Object cursor_in_non_selected_windows; 824 Lisp_Object BUFFER_INTERNAL_FIELD (cursor_in_non_selected_windows);
822}; 825};
823 826
824 827
@@ -942,7 +945,7 @@ extern int last_per_buffer_idx;
942 from the start of a buffer structure. */ 945 from the start of a buffer structure. */
943 946
944#define PER_BUFFER_VAR_OFFSET(VAR) \ 947#define PER_BUFFER_VAR_OFFSET(VAR) \
945 offsetof (struct buffer, VAR) 948 offsetof (struct buffer, BUFFER_INTERNAL_FIELD (VAR))
946 949
947/* Return the index of buffer-local variable VAR. Each per-buffer 950/* Return the index of buffer-local variable VAR. Each per-buffer
948 variable has an index > 0 associated with it, except when it always 951 variable has an index > 0 associated with it, except when it always