diff options
| author | Lars Ingebrigtsen | 2021-02-15 12:44:57 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-02-15 13:08:21 +0100 |
| commit | 0bd846c17474b161b11fbe21545609cd545b1798 (patch) | |
| tree | 8e0659a79c8711944379c4e2d1cb41caa893c389 /src | |
| parent | 54e577fbc1fb2e1189388ac290fe70d0f87b6c76 (diff) | |
| download | emacs-0bd846c17474b161b11fbe21545609cd545b1798.tar.gz emacs-0bd846c17474b161b11fbe21545609cd545b1798.zip | |
Rename minor-modes to local-minor-modes
* doc/lispref/modes.texi (Minor Modes): Update documentation.
* lisp/simple.el (completion-with-modes-p): Change usage.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Change usage.
* src/buffer.c: Rename from minor_modes to local_minor_modes
throughout.
(syms_of_buffer): Rename minor-modes to local-minor-modes.
* src/buffer.h (struct buffer): Rename minor_modes_.
* src/pdumper.c (dump_buffer): Update hash and usage.
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 13 | ||||
| -rw-r--r-- | src/buffer.h | 2 | ||||
| -rw-r--r-- | src/pdumper.c | 4 |
3 files changed, 10 insertions, 9 deletions
diff --git a/src/buffer.c b/src/buffer.c index 487599dbbed..5bd9b37702f 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -292,9 +292,9 @@ bset_major_mode (struct buffer *b, Lisp_Object val) | |||
| 292 | b->major_mode_ = val; | 292 | b->major_mode_ = val; |
| 293 | } | 293 | } |
| 294 | static void | 294 | static void |
| 295 | bset_minor_modes (struct buffer *b, Lisp_Object val) | 295 | bset_local_minor_modes (struct buffer *b, Lisp_Object val) |
| 296 | { | 296 | { |
| 297 | b->minor_modes_ = val; | 297 | b->local_minor_modes_ = val; |
| 298 | } | 298 | } |
| 299 | static void | 299 | static void |
| 300 | bset_mark (struct buffer *b, Lisp_Object val) | 300 | bset_mark (struct buffer *b, Lisp_Object val) |
| @@ -898,7 +898,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) | |||
| 898 | bset_file_truename (b, Qnil); | 898 | bset_file_truename (b, Qnil); |
| 899 | bset_display_count (b, make_fixnum (0)); | 899 | bset_display_count (b, make_fixnum (0)); |
| 900 | bset_backed_up (b, Qnil); | 900 | bset_backed_up (b, Qnil); |
| 901 | bset_minor_modes (b, Qnil); | 901 | bset_local_minor_modes (b, Qnil); |
| 902 | bset_auto_save_file_name (b, Qnil); | 902 | bset_auto_save_file_name (b, Qnil); |
| 903 | set_buffer_internal_1 (b); | 903 | set_buffer_internal_1 (b); |
| 904 | Fset (intern ("buffer-save-without-query"), Qnil); | 904 | Fset (intern ("buffer-save-without-query"), Qnil); |
| @@ -973,7 +973,7 @@ reset_buffer (register struct buffer *b) | |||
| 973 | b->clip_changed = 0; | 973 | b->clip_changed = 0; |
| 974 | b->prevent_redisplay_optimizations_p = 1; | 974 | b->prevent_redisplay_optimizations_p = 1; |
| 975 | bset_backed_up (b, Qnil); | 975 | bset_backed_up (b, Qnil); |
| 976 | bset_minor_modes (b, Qnil); | 976 | bset_local_minor_modes (b, Qnil); |
| 977 | BUF_AUTOSAVE_MODIFF (b) = 0; | 977 | BUF_AUTOSAVE_MODIFF (b) = 0; |
| 978 | b->auto_save_failure_time = 0; | 978 | b->auto_save_failure_time = 0; |
| 979 | bset_auto_save_file_name (b, Qnil); | 979 | bset_auto_save_file_name (b, Qnil); |
| @@ -5158,7 +5158,7 @@ init_buffer_once (void) | |||
| 5158 | bset_auto_save_file_name (&buffer_local_flags, make_fixnum (-1)); | 5158 | bset_auto_save_file_name (&buffer_local_flags, make_fixnum (-1)); |
| 5159 | bset_read_only (&buffer_local_flags, make_fixnum (-1)); | 5159 | bset_read_only (&buffer_local_flags, make_fixnum (-1)); |
| 5160 | bset_major_mode (&buffer_local_flags, make_fixnum (-1)); | 5160 | bset_major_mode (&buffer_local_flags, make_fixnum (-1)); |
| 5161 | bset_minor_modes (&buffer_local_flags, make_fixnum (-1)); | 5161 | bset_local_minor_modes (&buffer_local_flags, make_fixnum (-1)); |
| 5162 | bset_mode_name (&buffer_local_flags, make_fixnum (-1)); | 5162 | bset_mode_name (&buffer_local_flags, make_fixnum (-1)); |
| 5163 | bset_undo_list (&buffer_local_flags, make_fixnum (-1)); | 5163 | bset_undo_list (&buffer_local_flags, make_fixnum (-1)); |
| 5164 | bset_mark_active (&buffer_local_flags, make_fixnum (-1)); | 5164 | bset_mark_active (&buffer_local_flags, make_fixnum (-1)); |
| @@ -5625,7 +5625,8 @@ The default value (normally `fundamental-mode') affects new buffers. | |||
| 5625 | A value of nil means to use the current buffer's major mode, provided | 5625 | A value of nil means to use the current buffer's major mode, provided |
| 5626 | it is not marked as "special". */); | 5626 | it is not marked as "special". */); |
| 5627 | 5627 | ||
| 5628 | DEFVAR_PER_BUFFER ("minor-modes", &BVAR (current_buffer, minor_modes), | 5628 | DEFVAR_PER_BUFFER ("local-minor-modes", |
| 5629 | &BVAR (current_buffer, local_minor_modes), | ||
| 5629 | Qnil, | 5630 | Qnil, |
| 5630 | doc: /* Minor modes currently active in the current buffer. | 5631 | doc: /* Minor modes currently active in the current buffer. |
| 5631 | This is a list of symbols, or nil if there are no minor modes active. */); | 5632 | This is a list of symbols, or nil if there are no minor modes active. */); |
diff --git a/src/buffer.h b/src/buffer.h index 0668d16608b..24e9c3fcbc8 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -339,7 +339,7 @@ struct buffer | |||
| 339 | Lisp_Object major_mode_; | 339 | Lisp_Object major_mode_; |
| 340 | 340 | ||
| 341 | /* Symbol listing all currently enabled minor modes. */ | 341 | /* Symbol listing all currently enabled minor modes. */ |
| 342 | Lisp_Object minor_modes_; | 342 | Lisp_Object local_minor_modes_; |
| 343 | 343 | ||
| 344 | /* Pretty name of major mode (e.g., "Lisp"). */ | 344 | /* Pretty name of major mode (e.g., "Lisp"). */ |
| 345 | Lisp_Object mode_name_; | 345 | Lisp_Object mode_name_; |
diff --git a/src/pdumper.c b/src/pdumper.c index b68f992c33a..337742fda4a 100644 --- a/src/pdumper.c +++ b/src/pdumper.c | |||
| @@ -2692,7 +2692,7 @@ dump_hash_table (struct dump_context *ctx, | |||
| 2692 | static dump_off | 2692 | static dump_off |
| 2693 | dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer) | 2693 | dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer) |
| 2694 | { | 2694 | { |
| 2695 | #if CHECK_STRUCTS && !defined HASH_buffer_732A01EB61 | 2695 | #if CHECK_STRUCTS && !defined HASH_buffer_F8FE65D42F |
| 2696 | # error "buffer changed. See CHECK_STRUCTS comment in config.h." | 2696 | # error "buffer changed. See CHECK_STRUCTS comment in config.h." |
| 2697 | #endif | 2697 | #endif |
| 2698 | struct buffer munged_buffer = *in_buffer; | 2698 | struct buffer munged_buffer = *in_buffer; |
| @@ -2703,7 +2703,7 @@ dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer) | |||
| 2703 | buffer->window_count = 0; | 2703 | buffer->window_count = 0; |
| 2704 | else | 2704 | else |
| 2705 | eassert (buffer->window_count == -1); | 2705 | eassert (buffer->window_count == -1); |
| 2706 | buffer->minor_modes_ = Qnil; | 2706 | buffer->local_minor_modes_ = Qnil; |
| 2707 | buffer->last_selected_window_ = Qnil; | 2707 | buffer->last_selected_window_ = Qnil; |
| 2708 | buffer->display_count_ = make_fixnum (0); | 2708 | buffer->display_count_ = make_fixnum (0); |
| 2709 | buffer->clip_changed = 0; | 2709 | buffer->clip_changed = 0; |