From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthias Dahl Newsgroups: gmane.emacs.help Subject: Re: conditionally enabling a mode in define-minor-mode context Date: Tue, 13 May 2014 17:14:37 +0200 Message-ID: <537236DD.5000705@binary-island.eu> References: <536F39CC.6080506@binary-island.eu> <32b5873c-d585-4b25-a81c-94fc2c0648e2@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1399994117 26196 80.91.229.3 (13 May 2014 15:15:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 May 2014 15:15:17 +0000 (UTC) Cc: help-gnu-emacs To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 13 17:15:11 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WkEQB-0004Up-35 for geh-help-gnu-emacs@m.gmane.org; Tue, 13 May 2014 17:15:11 +0200 Original-Received: from localhost ([::1]:45779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkEQA-000805-Jq for geh-help-gnu-emacs@m.gmane.org; Tue, 13 May 2014 11:15:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkEPn-0007tj-6M for help-gnu-emacs@gnu.org; Tue, 13 May 2014 11:14:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkEPh-0007xz-6H for help-gnu-emacs@gnu.org; Tue, 13 May 2014 11:14:47 -0400 Original-Received: from hemera.binary-island.eu ([97.107.138.233]:49875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkEPh-0007xs-3N for help-gnu-emacs@gnu.org; Tue, 13 May 2014 11:14:41 -0400 Original-Received: from [10.0.0.20] (95-90-41-152-dynip.superkabel.de [95.90.41.152]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by hemera.binary-island.eu (Postfix) with ESMTPSA id 2FBF43C12B; Tue, 13 May 2014 11:15:19 -0400 (EDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <32b5873c-d585-4b25-a81c-94fc2c0648e2@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 97.107.138.233 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97629 Archived-At: Hello Drew... Thanks for taking the time. :) > Without thinking much about it, I'm guessing you could define two minor > modes, one of which you turn on everywhere and which controls the > conditional enabling of the other. Again, just a thought, without > reflection - ignore if not helpful. Hm... interesting. Never thought about that. Meanwhile I was thinking about just doing everything manually instead of using the macro to define a minor mode. This would give me the freedom to do what I want. But having a "sentinel" minor mode that just checks and conditionally activates the "real" minor mode, is also an interesting concept. I'll need to think this through. Thanks. The only reason for all of this: I want to make it as easy as possible for users to use this minor mode w/o spending time fiddling with it and w/o non-working key bindings (...) because the mode is in a "not working with this buffer" state. So long, Matthias -- Dipl.-Inf. (FH) Matthias Dahl | Software Engineer | binary-island.eu services: custom software [desktop, mobile, web], server administration