From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Set variable in derived mode before running the parent mode function Date: Tue, 02 Jun 2015 21:10:18 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1433294122 9565 80.91.229.3 (3 Jun 2015 01:15:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Jun 2015 01:15:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 03 03:15:21 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YzxH6-0001H3-MF for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Jun 2015 03:15:20 +0200 Original-Received: from localhost ([::1]:33147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzxH5-0005jK-PL for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Jun 2015 21:15:19 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 13 Injection-Info: mx02.eternal-september.org; posting-host="7d373ed72892ee578c208d3ba2c61e92"; logging-data="20816"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tRDHWPImdJ7WMRbqHPeMT" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:1bG4Y92GFMeBtJ38+uFMD0n9OZc= sha1:P+Oh5068neG4lG5NsHgbLE7HCdg= Original-Xref: usenet.stanford.edu gnu.emacs.help:212443 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104727 Archived-At: > `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). Stefan