[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple major modes

From: Richard Stallman
Subject: Re: Multiple major modes
Date: Sun, 24 Jun 2007 10:41:18 -0400

      Define all your variables with `defvar-mode-local'.
      If changing a default value, use `setq-mode-local'

Does this mean we would have to go thru all of Emacs and put in
such definitions for all the variables that major modes can change?

Currently, the idea is that major modes can make any global variable
buffer-local.  Are you suggesting we divide all variables into two
classes, those that can be and those that can't be?  If so, what is
the benefit of that?

Would it make sense for `defvar' itself to do whatever you want
`defvar-mode-local' to do?

      For a program, use `define-overload' to specify a function that
      can have a mode specific override.  Supply a default body for modes
      that accept the default.

Since multiple major modes work (in different buffers) without this
feature, why would we need to add this feature merely to support
multiple major modes in one buffer?

      The mode-local system will automatically assign buffer-local values
      to mode-local defined variables.

I don't understand.  Does this mean that everything defined with
`defvar-mode-local' gets buffer-local in all buffers?  If so,
how is that different from `make-variable-buffer-local'?

I guess there must be parts of this explanation that are missing.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]