From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Problem with define-minor-mode with :global t. Date: Fri, 15 Jul 2005 11:06:00 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1121419114 15955 80.91.229.2 (15 Jul 2005 09:18:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Jul 2005 09:18:34 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 15 11:18:32 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DtMKf-0001Le-0g for ged-emacs-devel@m.gmane.org; Fri, 15 Jul 2005 11:18:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DtMMQ-0001du-Kg for ged-emacs-devel@m.gmane.org; Fri, 15 Jul 2005 05:19:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DtMCO-0001QE-LY for emacs-devel@gnu.org; Fri, 15 Jul 2005 05:09:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DtMBj-0000k8-Nj for emacs-devel@gnu.org; Fri, 15 Jul 2005 05:09:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DtMAs-0007sm-Di for emacs-devel@gnu.org; Fri, 15 Jul 2005 05:08:03 -0400 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DtMHI-0008O8-V8 for emacs-devel@gnu.org; Fri, 15 Jul 2005 05:14:41 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepc.post.tele.dk (Postfix) with SMTP id C33AF262879 for ; Fri, 15 Jul 2005 11:06:09 +0200 (CEST) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:40911 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40911 In CUA, I have this: (define-minor-mode cua-mode "..." :global t ...) Now, assume I have a buffer `xyz' which definitely don't want cua-mode enabled. If I do things in the following sequence, it works alright: M-x cua-mode RET C-x b xyz RET M-: (set (make-local-variable 'cua-mode) nil) RET But if I (accidentally) do it in this sequence: C-x b xyz RET M-: (set (make-local-variable 'cua-mode) nil) RET M-x cua-mode RET then I end up _enabling_ cua mode in just the xyz buffer, while the global setting is still nil. I think that it would make sense if specifying :global t on define-minor-mode would enforce changing the default (global) value of the mode variable rather than the potentially buffer-local value. -- Kim F. Storm http://www.cua.dk