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

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

Re: Set variable in derived mode before running the parent mode function


From: Andreas Röhler
Subject: Re: Set variable in derived mode before running the parent mode function
Date: Thu, 04 Jun 2015 07:03:01 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


Am 03.06.2015 um 03:10 schrieb Stefan Monnier:
`python-mode' are inappropriate for the derived mode; in particular, I'd
like to disable auto-guessing of the indentation by setting
`python-indent-guess-indent-offset' to nil.  However,
`define-derived-mode' has no customization point for running code before
the parent mode function.  What's the best way to solve this?
Add the code *after* running python-mode?  After all, setting vars
before would be a waste since python-mode (like all other proper major
modes) begins by calling kill-all-local-variables (also known as
fundamental-mode).



Can't see this in python.el. python-mode is a derived-mode from prog-mode.

Customizing python-indent-guess-indent-offset to nil should help already.

Andreas



reply via email to

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