From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: How global is a define-global-minor-mode mode? Date: Sun, 31 Dec 2006 03:27:09 +0100 Message-ID: <45971FFD.9020609@gmail.com> References: <4581996F.3050700@student.lu.se> <45954E7C.8010700@gmail.com> <4596460B.8020003@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1167532056 27906 80.91.229.12 (31 Dec 2006 02:27:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 31 Dec 2006 02:27:36 +0000 (UTC) Cc: lennart.borgman.073@student.lu.se, drew.adams@oracle.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 31 03:27:34 2006 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 1H0qQ3-00024J-NY for ged-emacs-devel@m.gmane.org; Sun, 31 Dec 2006 03:27:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H0qQ3-0007Zh-6l for ged-emacs-devel@m.gmane.org; Sat, 30 Dec 2006 21:27:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H0qPr-0007YH-IX for emacs-devel@gnu.org; Sat, 30 Dec 2006 21:27:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H0qPn-0007Uc-TS for emacs-devel@gnu.org; Sat, 30 Dec 2006 21:27:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H0qPn-0007UR-QE for emacs-devel@gnu.org; Sat, 30 Dec 2006 21:27:11 -0500 Original-Received: from [80.76.149.212] (helo=ch-smtp01.sth.basefarm.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H0qPl-0007VP-Mt; Sat, 30 Dec 2006 21:27:10 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:60069 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1H0qPj-00012d-6P; Sun, 31 Dec 2006 03:27:08 +0100 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) Original-To: rms@gnu.org In-Reply-To: X-Antivirus: avast! (VPS 0666-0, 2006-12-30), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1H0qPj-00012d-6P. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1H0qPj-00012d-6P ba622478a20ad6e26f705670a82e9996 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:64550 Archived-At: Richard Stallman wrote: > It looks like define-global-minor-mode simply fails to do anything > to arrange to handle customization of the globalized mode's variable. > > Would someone please work on this? > I can't do that now, however I have a suggestion. define-globalized-minor-mode takes care of the nasty technical details, but maybe it could still be easier to use. If we assume that the minor mode to globalize is defined with define-minor-mode we know how to turn it on and off. How about something like this? : :turn-on-if (lambda() ....) :turn-off-if (lambda() ...) where the two functions should used for turning on/off the minor mode in each buffer when the globalized mode is turned on/off.