From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Multiple major modes Date: Sun, 24 Jun 2007 10:41:18 -0400 Message-ID: References: <466E7A93.3050705@gmail.com> <466E81AA.3030202@gnu.org> <466E9822.2050508@gmail.com> <466EAB9D.9020408@gnu.org> <466EEA71.2070700@gmail.com> <200706122014.l5CKEKV1021902@projectile.siege-engine.com> <200706190209.l5J29Csr010302@projectile.siege-engine.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1182696304 19253 80.91.229.12 (24 Jun 2007 14:45:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 24 Jun 2007 14:45:04 +0000 (UTC) Cc: jasonr@gnu.org, lennart.borgman@gmail.com, sdl.web@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: "Eric M. Ludlam" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 24 16:45:02 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I2TKo-0008Kc-35 for ged-emacs-devel@m.gmane.org; Sun, 24 Jun 2007 16:45:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I2TKn-0003jq-Je for ged-emacs-devel@m.gmane.org; Sun, 24 Jun 2007 10:45:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I2THD-0001Np-Vl for emacs-devel@gnu.org; Sun, 24 Jun 2007 10:41:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I2THD-0001N5-CT for emacs-devel@gnu.org; Sun, 24 Jun 2007 10:41:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I2THD-0001Mt-2m for emacs-devel@gnu.org; Sun, 24 Jun 2007 10:41:19 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I2THC-0003VX-Na for emacs-devel@gnu.org; Sun, 24 Jun 2007 10:41:18 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1I2THC-0001hv-Db; Sun, 24 Jun 2007 10:41:18 -0400 In-reply-to: <200706190209.l5J29Csr010302@projectile.siege-engine.com> (eric@siege-engine.com) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:73756 Archived-At: 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.