* 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.
other minor modes in effect. It should be possible to activate and
deactivate minor modes in any order.
-@defvar minor-modes
+@defvar local-minor-modes
This buffer-local variable lists the currently enabled minor modes in
the current buffer, and is a list of symbols.
@end defvar
that is not compatible with byte code in previous Emacs versions.
+++
-** New buffer-local variable 'minor-modes'.
+** New buffer-local variable 'local-minor-modes'.
This permanently buffer-local variable holds a list of currently
enabled minor modes in the current buffer (as a list of symbols).
(t
t)))
(unless ,globalp
- ;; Keep `minor-modes' up to date.
- (setq minor-modes (delq ',modefun minor-modes))
+ ;; Keep `local-minor-modes' up to date.
+ (setq local-minor-modes (delq ',modefun local-minor-modes))
(when ,getter
- (push ',modefun minor-modes)))
+ (push ',modefun local-minor-modes)))
,@body
;; The on/off hooks are here for backward compatibility only.
(run-hooks ',hook (if ,getter ',hook-on ',hook-off))
(if (null (cdr modes))
(or (provided-mode-derived-p
(buffer-local-value 'major-mode buffer) (car modes))
- (memq (car modes) (buffer-local-value 'minor-modes buffer)))
+ (memq (car modes)
+ (buffer-local-value 'local-minor-modes buffer)))
;; Uncommon case: Multiple modes.
(apply #'provided-mode-derived-p
(buffer-local-value 'major-mode buffer)
modes)
(seq-intersection modes
- (buffer-local-value 'minor-modes buffer)
+ (buffer-local-value 'local-minor-modes buffer)
#'eq)))))
(defun completion-with-modes-p (modes buffer)
modes)
;; It's a minor mode.
(seq-intersection modes
- (buffer-local-value 'minor-modes buffer)
+ (buffer-local-value 'local-minor-modes buffer)
#'eq)))
(defun completion-button-p (category buffer)
b->major_mode_ = val;
}
static void
-bset_minor_modes (struct buffer *b, Lisp_Object val)
+bset_local_minor_modes (struct buffer *b, Lisp_Object val)
{
- b->minor_modes_ = val;
+ b->local_minor_modes_ = val;
}
static void
bset_mark (struct buffer *b, Lisp_Object val)
bset_file_truename (b, Qnil);
bset_display_count (b, make_fixnum (0));
bset_backed_up (b, Qnil);
- bset_minor_modes (b, Qnil);
+ bset_local_minor_modes (b, Qnil);
bset_auto_save_file_name (b, Qnil);
set_buffer_internal_1 (b);
Fset (intern ("buffer-save-without-query"), Qnil);
b->clip_changed = 0;
b->prevent_redisplay_optimizations_p = 1;
bset_backed_up (b, Qnil);
- bset_minor_modes (b, Qnil);
+ bset_local_minor_modes (b, Qnil);
BUF_AUTOSAVE_MODIFF (b) = 0;
b->auto_save_failure_time = 0;
bset_auto_save_file_name (b, Qnil);
bset_auto_save_file_name (&buffer_local_flags, make_fixnum (-1));
bset_read_only (&buffer_local_flags, make_fixnum (-1));
bset_major_mode (&buffer_local_flags, make_fixnum (-1));
- bset_minor_modes (&buffer_local_flags, make_fixnum (-1));
+ bset_local_minor_modes (&buffer_local_flags, make_fixnum (-1));
bset_mode_name (&buffer_local_flags, make_fixnum (-1));
bset_undo_list (&buffer_local_flags, make_fixnum (-1));
bset_mark_active (&buffer_local_flags, make_fixnum (-1));
A value of nil means to use the current buffer's major mode, provided
it is not marked as "special". */);
- DEFVAR_PER_BUFFER ("minor-modes", &BVAR (current_buffer, minor_modes),
+ DEFVAR_PER_BUFFER ("local-minor-modes",
+ &BVAR (current_buffer, local_minor_modes),
Qnil,
doc: /* Minor modes currently active in the current buffer.
This is a list of symbols, or nil if there are no minor modes active. */);
Lisp_Object major_mode_;
/* Symbol listing all currently enabled minor modes. */
- Lisp_Object minor_modes_;
+ Lisp_Object local_minor_modes_;
/* Pretty name of major mode (e.g., "Lisp"). */
Lisp_Object mode_name_;
static dump_off
dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer)
{
-#if CHECK_STRUCTS && !defined HASH_buffer_732A01EB61
+#if CHECK_STRUCTS && !defined HASH_buffer_F8FE65D42F
# error "buffer changed. See CHECK_STRUCTS comment in config.h."
#endif
struct buffer munged_buffer = *in_buffer;
buffer->window_count = 0;
else
eassert (buffer->window_count == -1);
- buffer->minor_modes_ = Qnil;
+ buffer->local_minor_modes_ = Qnil;
buffer->last_selected_window_ = Qnil;
buffer->display_count_ = make_fixnum (0);
buffer->clip_changed = 0;