From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: Specifying mode in file variables trouble Date: Wed, 24 Sep 2008 16:56:57 -0400 Message-ID: References: <48D44761.6000809@gmail.com> <87ljxny6n8.fsf@catnip.gol.com> <48D44C79.9020004@gmail.com> <48D63F30.8060102@gmail.com> <48D6E8FB.4070108@gmail.com> <48D79A25.7050000@gmail.com> <48D8BD92.5080403@gmail.com> <48D950F9.6030401@gmail.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1222289966 32742 80.91.229.12 (24 Sep 2008 20:59:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Sep 2008 20:59:26 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: "Lennart Borgman (gmail)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 24 23:00:24 2008 connect(): Connection refused 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 1KibT6-0008G0-Hq for ged-emacs-devel@m.gmane.org; Wed, 24 Sep 2008 23:00:16 +0200 Original-Received: from localhost ([127.0.0.1]:39690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KibS4-0004YH-Iq for ged-emacs-devel@m.gmane.org; Wed, 24 Sep 2008 16:59:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KibS0-0004Xw-El for emacs-devel@gnu.org; Wed, 24 Sep 2008 16:59:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KibRw-0004X4-Mb for emacs-devel@gnu.org; Wed, 24 Sep 2008 16:59:07 -0400 Original-Received: from [199.232.76.173] (port=49461 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KibRw-0004X0-Hg for emacs-devel@gnu.org; Wed, 24 Sep 2008 16:59:04 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:43264) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KibRv-0007OE-BK for emacs-devel@gnu.org; Wed, 24 Sep 2008 16:59:04 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KibPt-0001h7-Rn; Wed, 24 Sep 2008 16:56:57 -0400 In-reply-to: <48D950F9.6030401@gmail.com> (lennart.borgman@gmail.com) X-detected-operating-system: by monty-python.gnu.org: GNU/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:104119 Archived-At: There are three main scopes (maybe there are more) for minor modes: - Global - Per buffer I think I know what those two mean. - Per major mode What does that mean? I don't know of that. Global minor modes are not a problem here. Usually they are not; but if a minor mode is itself global, you can make a buffer-local binding for the variable. Perhaps when you speak of "global" and "per buffer" you mean how the variable is bound, rather than how the mode normally works. I have suggested long ago using the existing mechanism for distinguishing between local variables that are per buffer and those that are per major mode. I don't understand that distinction, but I know that just about any variable in Emacs _can_ be given a buffer-local binding by a major mode command. So is the distinction meaningful? In other words: the minor modes that are per buffer should use (put 'PER-BUFFER-VARIABLE 'permanent-local t) on their buffer local variables. (I do that now in mumamo.el for some of the most important.) I am not sure that change is correct. When the variable is not marked as permanent-local, that could mean we want major mode commands to reset this minor mode. Of course, moving between chunks in mumamo should not reset it. Can you tell us some of the variables for which you added that property? Perhaps we want to have a different value for the `permanent-local' property that applies only to mumamo.