aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorAndrea Corallo2021-02-17 22:26:28 +0100
committerAndrea Corallo2021-02-17 22:26:28 +0100
commitf92bb788a073c6b3ca7f188e0edea714598193fd (patch)
tree9bea27955098bfc33d0daaa345cfa3dca5b695fd /src/buffer.c
parent1fe5994bcb8b58012dbba0a5f7d03138c293286f (diff)
parent6735bb3d22dc64f3fe42e4a7f439ea9d62f75b5a (diff)
downloademacs-f92bb788a073c6b3ca7f188e0edea714598193fd.tar.gz
emacs-f92bb788a073c6b3ca7f188e0edea714598193fd.zip
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 80c799e719b..5bd9b37702f 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -292,6 +292,11 @@ bset_major_mode (struct buffer *b, Lisp_Object val)
292 b->major_mode_ = val; 292 b->major_mode_ = val;
293} 293}
294static void 294static void
295bset_local_minor_modes (struct buffer *b, Lisp_Object val)
296{
297 b->local_minor_modes_ = val;
298}
299static void
295bset_mark (struct buffer *b, Lisp_Object val) 300bset_mark (struct buffer *b, Lisp_Object val)
296{ 301{
297 b->mark_ = val; 302 b->mark_ = val;
@@ -893,6 +898,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
893 bset_file_truename (b, Qnil); 898 bset_file_truename (b, Qnil);
894 bset_display_count (b, make_fixnum (0)); 899 bset_display_count (b, make_fixnum (0));
895 bset_backed_up (b, Qnil); 900 bset_backed_up (b, Qnil);
901 bset_local_minor_modes (b, Qnil);
896 bset_auto_save_file_name (b, Qnil); 902 bset_auto_save_file_name (b, Qnil);
897 set_buffer_internal_1 (b); 903 set_buffer_internal_1 (b);
898 Fset (intern ("buffer-save-without-query"), Qnil); 904 Fset (intern ("buffer-save-without-query"), Qnil);
@@ -967,6 +973,7 @@ reset_buffer (register struct buffer *b)
967 b->clip_changed = 0; 973 b->clip_changed = 0;
968 b->prevent_redisplay_optimizations_p = 1; 974 b->prevent_redisplay_optimizations_p = 1;
969 bset_backed_up (b, Qnil); 975 bset_backed_up (b, Qnil);
976 bset_local_minor_modes (b, Qnil);
970 BUF_AUTOSAVE_MODIFF (b) = 0; 977 BUF_AUTOSAVE_MODIFF (b) = 0;
971 b->auto_save_failure_time = 0; 978 b->auto_save_failure_time = 0;
972 bset_auto_save_file_name (b, Qnil); 979 bset_auto_save_file_name (b, Qnil);
@@ -5151,6 +5158,7 @@ init_buffer_once (void)
5151 bset_auto_save_file_name (&buffer_local_flags, make_fixnum (-1)); 5158 bset_auto_save_file_name (&buffer_local_flags, make_fixnum (-1));
5152 bset_read_only (&buffer_local_flags, make_fixnum (-1)); 5159 bset_read_only (&buffer_local_flags, make_fixnum (-1));
5153 bset_major_mode (&buffer_local_flags, make_fixnum (-1)); 5160 bset_major_mode (&buffer_local_flags, make_fixnum (-1));
5161 bset_local_minor_modes (&buffer_local_flags, make_fixnum (-1));
5154 bset_mode_name (&buffer_local_flags, make_fixnum (-1)); 5162 bset_mode_name (&buffer_local_flags, make_fixnum (-1));
5155 bset_undo_list (&buffer_local_flags, make_fixnum (-1)); 5163 bset_undo_list (&buffer_local_flags, make_fixnum (-1));
5156 bset_mark_active (&buffer_local_flags, make_fixnum (-1)); 5164 bset_mark_active (&buffer_local_flags, make_fixnum (-1));
@@ -5617,6 +5625,12 @@ The default value (normally `fundamental-mode') affects new buffers.
5617A value of nil means to use the current buffer's major mode, provided 5625A value of nil means to use the current buffer's major mode, provided
5618it is not marked as "special". */); 5626it is not marked as "special". */);
5619 5627
5628 DEFVAR_PER_BUFFER ("local-minor-modes",
5629 &BVAR (current_buffer, local_minor_modes),
5630 Qnil,
5631 doc: /* Minor modes currently active in the current buffer.
5632This is a list of symbols, or nil if there are no minor modes active. */);
5633
5620 DEFVAR_PER_BUFFER ("mode-name", &BVAR (current_buffer, mode_name), 5634 DEFVAR_PER_BUFFER ("mode-name", &BVAR (current_buffer, mode_name),
5621 Qnil, 5635 Qnil,
5622 doc: /* Pretty name of current buffer's major mode. 5636 doc: /* Pretty name of current buffer's major mode.