diff options
| author | Paul Eggert | 2012-08-17 23:06:39 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-17 23:06:39 -0700 |
| commit | 39eb03f1b023ae3d94e311f6f5d9f913f75c42c4 (patch) | |
| tree | 454b784e6ccc782a6f3c16d67e01cc8a1e5051be /src/buffer.h | |
| parent | 2170b1bdd500484349deec2d946119e6a653e198 (diff) | |
| download | emacs-39eb03f1b023ae3d94e311f6f5d9f913f75c42c4.tar.gz emacs-39eb03f1b023ae3d94e311f6f5d9f913f75c42c4.zip | |
* buffer.h (BSET): Remove.
Replace all uses with calls to new setter functions.
(bset_bidi_paragraph_direction, bset_case_canon_table)
(bset_case_eqv_table, bset_directory, bset_display_count)
(bset_display_time, bset_downcase_table)
(bset_enable_multibyte_characters, bset_filename, bset_keymap)
(bset_last_selected_window, bset_local_var_alist)
(bset_mark_active, bset_point_before_scroll, bset_read_only)
(bset_truncate_lines, bset_undo_list, bset_upcase_table)
(bset_width_table):
* buffer.c (bset_abbrev_mode, bset_abbrev_table)
(bset_auto_fill_function, bset_auto_save_file_format)
(bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
(bset_bidi_display_reordering, bset_buffer_file_coding_system)
(bset_cache_long_line_scans, bset_case_fold_search)
(bset_ctl_arrow, bset_cursor_in_non_selected_windows)
(bset_cursor_type, bset_display_table, bset_extra_line_spacing)
(bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
(bset_fringe_indicator_alist, bset_fringes_outside_margins)
(bset_header_line_format, bset_indicate_buffer_boundaries)
(bset_indicate_empty_lines, bset_invisibility_spec)
(bset_left_fringe_width, bset_major_mode, bset_mark)
(bset_minor_modes, bset_mode_line_format, bset_mode_name)
(bset_name, bset_overwrite_mode, bset_pt_marker)
(bset_right_fringe_width, bset_save_length)
(bset_scroll_bar_width, bset_scroll_down_aggressively)
(bset_scroll_up_aggressively, bset_selective_display)
(bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
(bset_word_wrap, bset_zv_marker):
* category.c (bset_category_table):
* syntax.c (bset_syntax_table):
New setter functions.
Fixes: debbugs:12215
Diffstat (limited to 'src/buffer.h')
| -rw-r--r-- | src/buffer.h | 99 |
1 files changed, 98 insertions, 1 deletions
diff --git a/src/buffer.h b/src/buffer.h index 507b15e8b4a..510a8e55682 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -477,7 +477,6 @@ struct buffer_text | |||
| 477 | /* Most code should use this macro to access Lisp fields in struct buffer. */ | 477 | /* Most code should use this macro to access Lisp fields in struct buffer. */ |
| 478 | 478 | ||
| 479 | #define BVAR(buf, field) ((buf)->INTERNAL_FIELD (field)) | 479 | #define BVAR(buf, field) ((buf)->INTERNAL_FIELD (field)) |
| 480 | #define BSET(buf, field, value) ((buf)->INTERNAL_FIELD (field) = (value)) | ||
| 481 | 480 | ||
| 482 | /* This is the structure that the buffer Lisp object points to. */ | 481 | /* This is the structure that the buffer Lisp object points to. */ |
| 483 | 482 | ||
| @@ -862,6 +861,104 @@ struct buffer | |||
| 862 | Lisp_Object INTERNAL_FIELD (undo_list); | 861 | Lisp_Object INTERNAL_FIELD (undo_list); |
| 863 | }; | 862 | }; |
| 864 | 863 | ||
| 864 | /* Most code should use these functions to set Lisp fields in struct | ||
| 865 | buffer. */ | ||
| 866 | BUFFER_INLINE void | ||
| 867 | bset_bidi_paragraph_direction (struct buffer *b, Lisp_Object val) | ||
| 868 | { | ||
| 869 | b->INTERNAL_FIELD (bidi_paragraph_direction) = val; | ||
| 870 | } | ||
| 871 | BUFFER_INLINE void | ||
| 872 | bset_case_canon_table (struct buffer *b, Lisp_Object val) | ||
| 873 | { | ||
| 874 | b->INTERNAL_FIELD (case_canon_table) = val; | ||
| 875 | } | ||
| 876 | BUFFER_INLINE void | ||
| 877 | bset_case_eqv_table (struct buffer *b, Lisp_Object val) | ||
| 878 | { | ||
| 879 | b->INTERNAL_FIELD (case_eqv_table) = val; | ||
| 880 | } | ||
| 881 | BUFFER_INLINE void | ||
| 882 | bset_directory (struct buffer *b, Lisp_Object val) | ||
| 883 | { | ||
| 884 | b->INTERNAL_FIELD (directory) = val; | ||
| 885 | } | ||
| 886 | BUFFER_INLINE void | ||
| 887 | bset_display_count (struct buffer *b, Lisp_Object val) | ||
| 888 | { | ||
| 889 | b->INTERNAL_FIELD (display_count) = val; | ||
| 890 | } | ||
| 891 | BUFFER_INLINE void | ||
| 892 | bset_display_time (struct buffer *b, Lisp_Object val) | ||
| 893 | { | ||
| 894 | b->INTERNAL_FIELD (display_time) = val; | ||
| 895 | } | ||
| 896 | BUFFER_INLINE void | ||
| 897 | bset_downcase_table (struct buffer *b, Lisp_Object val) | ||
| 898 | { | ||
| 899 | b->INTERNAL_FIELD (downcase_table) = val; | ||
| 900 | } | ||
| 901 | BUFFER_INLINE void | ||
| 902 | bset_enable_multibyte_characters (struct buffer *b, Lisp_Object val) | ||
| 903 | { | ||
| 904 | b->INTERNAL_FIELD (enable_multibyte_characters) = val; | ||
| 905 | } | ||
| 906 | BUFFER_INLINE void | ||
| 907 | bset_filename (struct buffer *b, Lisp_Object val) | ||
| 908 | { | ||
| 909 | b->INTERNAL_FIELD (filename) = val; | ||
| 910 | } | ||
| 911 | BUFFER_INLINE void | ||
| 912 | bset_keymap (struct buffer *b, Lisp_Object val) | ||
| 913 | { | ||
| 914 | b->INTERNAL_FIELD (keymap) = val; | ||
| 915 | } | ||
| 916 | BUFFER_INLINE void | ||
| 917 | bset_last_selected_window (struct buffer *b, Lisp_Object val) | ||
| 918 | { | ||
| 919 | b->INTERNAL_FIELD (last_selected_window) = val; | ||
| 920 | } | ||
| 921 | BUFFER_INLINE void | ||
| 922 | bset_local_var_alist (struct buffer *b, Lisp_Object val) | ||
| 923 | { | ||
| 924 | b->INTERNAL_FIELD (local_var_alist) = val; | ||
| 925 | } | ||
| 926 | BUFFER_INLINE void | ||
| 927 | bset_mark_active (struct buffer *b, Lisp_Object val) | ||
| 928 | { | ||
| 929 | b->INTERNAL_FIELD (mark_active) = val; | ||
| 930 | } | ||
| 931 | BUFFER_INLINE void | ||
| 932 | bset_point_before_scroll (struct buffer *b, Lisp_Object val) | ||
| 933 | { | ||
| 934 | b->INTERNAL_FIELD (point_before_scroll) = val; | ||
| 935 | } | ||
| 936 | BUFFER_INLINE void | ||
| 937 | bset_read_only (struct buffer *b, Lisp_Object val) | ||
| 938 | { | ||
| 939 | b->INTERNAL_FIELD (read_only) = val; | ||
| 940 | } | ||
| 941 | BUFFER_INLINE void | ||
| 942 | bset_truncate_lines (struct buffer *b, Lisp_Object val) | ||
| 943 | { | ||
| 944 | b->INTERNAL_FIELD (truncate_lines) = val; | ||
| 945 | } | ||
| 946 | BUFFER_INLINE void | ||
| 947 | bset_undo_list (struct buffer *b, Lisp_Object val) | ||
| 948 | { | ||
| 949 | b->INTERNAL_FIELD (undo_list) = val; | ||
| 950 | } | ||
| 951 | BUFFER_INLINE void | ||
| 952 | bset_upcase_table (struct buffer *b, Lisp_Object val) | ||
| 953 | { | ||
| 954 | b->INTERNAL_FIELD (upcase_table) = val; | ||
| 955 | } | ||
| 956 | BUFFER_INLINE void | ||
| 957 | bset_width_table (struct buffer *b, Lisp_Object val) | ||
| 958 | { | ||
| 959 | b->INTERNAL_FIELD (width_table) = val; | ||
| 960 | } | ||
| 961 | |||
| 865 | 962 | ||
| 866 | /* Chain of all buffers, including killed ones. */ | 963 | /* Chain of all buffers, including killed ones. */ |
| 867 | 964 | ||