help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add argument to a derived-mode


From: Stefan Monnier
Subject: Re: add argument to a derived-mode
Date: Fri, 13 Jan 2017 09:37:07 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]