From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: add argument to a derived-mode Date: Fri, 13 Jan 2017 09:37:07 -0500 Message-ID: References: <20170112163817.14999b2a@gauss> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1484321498 24084 195.159.176.226 (13 Jan 2017 15:31:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Jan 2017 15:31:38 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 13 16:31:33 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cS3ow-0004SM-Hp for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Jan 2017 16:31:14 +0100 Original-Received: from localhost ([::1]:42007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cS3p1-0003Ht-8a for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Jan 2017 10:31:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cS2yw-0001UE-HU for help-gnu-emacs@gnu.org; Fri, 13 Jan 2017 09:37:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cS2yt-0004fB-F8 for help-gnu-emacs@gnu.org; Fri, 13 Jan 2017 09:37:30 -0500 Original-Received: from [195.159.176.226] (port=45763 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cS2yt-0004eL-7X for help-gnu-emacs@gnu.org; Fri, 13 Jan 2017 09:37:27 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cS2yh-00074A-FL for help-gnu-emacs@gnu.org; Fri, 13 Jan 2017 15:37:15 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 13 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:pSLHDTKkew510H8+B1aJC2khap4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-Mailman-Approved-At: Fri, 13 Jan 2017 10:13:22 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:112109 Archived-At: > Is there a way to use define-derived-mode to > create a major mode that takes an argument if > the base mode does not? Major modes do not take arguments, no. Instead, you'll want to define 2 functions: - a major mode - the function you want, with its argument, and which internally calls the major mode. Stefan