From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: define-derived-mode and function arguments Date: Mon, 2 Aug 2010 09:54:18 +0200 Message-ID: <201008020954.19243.tassilo@member.fsf.org> References: <87d3u17tgg.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1280735675 13956 80.91.229.12 (2 Aug 2010 07:54:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 07:54:35 +0000 (UTC) Cc: Wojciech Meyer To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 02 09:54:34 2010 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.69) (envelope-from ) id 1Ofpqx-00058W-5t for ged-emacs-devel@m.gmane.org; Mon, 02 Aug 2010 09:54:31 +0200 Original-Received: from localhost ([127.0.0.1]:41273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ofpqw-0004vK-5X for ged-emacs-devel@m.gmane.org; Mon, 02 Aug 2010 03:54:30 -0400 Original-Received: from [140.186.70.92] (port=58834 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ofpqo-0004ua-MR for emacs-devel@gnu.org; Mon, 02 Aug 2010 03:54:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ofpqn-0008TT-Qu for emacs-devel@gnu.org; Mon, 02 Aug 2010 03:54:22 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:12860) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofpqn-0008T2-MU for emacs-devel@gnu.org; Mon, 02 Aug 2010 03:54:21 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 596D678008B2; Mon, 2 Aug 2010 09:54:20 +0200 (CEST) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10129-09; Mon, 2 Aug 2010 09:54:19 +0200 (CEST) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from tsdh.localnet (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTP id A1B6278001B5; Mon, 2 Aug 2010 09:54:19 +0200 (CEST) User-Agent: KMail/1.13.5 (Linux/2.6.35-rc6-git6; KDE/4.4.5; x86_64; ; ) In-Reply-To: <87d3u17tgg.fsf@gmail.com> X-Face: `TY6r/ws=N5uqO1E`M=Sups<}n%T[E^o_?MJj< =?iso-8859-1?q?O4j=265ljV6lU=7DcXU7oftH=26/x=5F=7EK=7B=26zv9=7D=0A=09sB?= =?iso-8859-1?q?=7D5/Ea=5BhU=7BCS=23=3F=3F0=3F=3Fn?=@sX+ft]?{(l?, mp"a`u 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:128091 Archived-At: On Monday 02 August 2010 02:23:59 Wojciech Meyer wrote: Hi Wojciech, > Some of mode definitions don't use the idea of derived modes, instead > they use defuns. > > These defuns have sometimes optional arguments. > > So the question is, is it possible to use `define-derived-mode' with > optional arguments? Not that I know of. But I even don't know a major mode which uses optional arguments. Maybe you confuse minor and major modes? Calling the `foo-mode' function of one of the former usually toggle the foo minor mode, and an optional argument is used to enable/disable it explicitly. But you cannot disable a major mode except by activating another major mode, so there's no need for such an argument. Bye, Tassilo