From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: define-derived-mode and function arguments Date: Mon, 02 Aug 2010 10:24:42 +0200 Message-ID: References: <87d3u17tgg.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280737508 20063 80.91.229.12 (2 Aug 2010 08:25:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Aug 2010 08:25:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Wojciech Meyer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 02 10:25:03 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 1OfqKS-0001PE-UK for ged-emacs-devel@m.gmane.org; Mon, 02 Aug 2010 10:25:01 +0200 Original-Received: from localhost ([127.0.0.1]:36913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfqKS-0006EF-7v for ged-emacs-devel@m.gmane.org; Mon, 02 Aug 2010 04:25:00 -0400 Original-Received: from [140.186.70.92] (port=39762 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfqKI-0006DP-5Q for emacs-devel@gnu.org; Mon, 02 Aug 2010 04:24:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfqKE-0005jT-39 for emacs-devel@gnu.org; Mon, 02 Aug 2010 04:24:50 -0400 Original-Received: from impaqm1.telefonica.net ([213.4.138.1]:58046) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfqKD-0005jH-UW for emacs-devel@gnu.org; Mon, 02 Aug 2010 04:24:46 -0400 Original-Received: from IMPmailhost5.adm.correo ([10.20.102.126]) by IMPaqm1.telefonica.net with bizsmtp id pJvT1e01t2jdgqJ01LQkWx; Mon, 02 Aug 2010 10:24:44 +0200 Original-Received: from ceviche.home ([83.61.38.247]) by IMPmailhost5.adm.correo with BIZ IMP id pLQi1e0035KwfZf1lLQimS; Mon, 02 Aug 2010 10:24:44 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id 07BBD66125; Mon, 2 Aug 2010 10:24:42 +0200 (CEST) In-Reply-To: <87d3u17tgg.fsf@gmail.com> (Wojciech Meyer's message of "Mon, 02 Aug 2010 01:23:59 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:128093 Archived-At: > So the question is, is it possible to use `define-derived-mode' with > optional arguments? No, there's no way to have arguments. Usually those arguments are used to set some buffer-local vars and the way to make it work with define-derived-mode is to set those vars in the caller (right after the call) rather than in the major-mode function. Stefan