From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-15?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: Set variable in derived mode before running the parent mode function Date: Thu, 04 Jun 2015 07:03:01 +0200 Message-ID: <556FDC05.5060505@easy-emacs.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1433394226 22036 80.91.229.3 (4 Jun 2015 05:03:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Jun 2015 05:03:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 04 07:03:33 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 1Z0NJU-00078u-VE for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Jun 2015 07:03:33 +0200 Original-Received: from localhost ([::1]:40173 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0NJU-0002eq-Er for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Jun 2015 01:03:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55934) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0NJH-0002el-8v for help-gnu-emacs@gnu.org; Thu, 04 Jun 2015 01:03:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0NJD-0006oq-RU for help-gnu-emacs@gnu.org; Thu, 04 Jun 2015 01:03:19 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.24]:60536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0NJD-0006o5-Il for help-gnu-emacs@gnu.org; Thu, 04 Jun 2015 01:03:15 -0400 Original-Received: from [192.168.178.31] ([77.12.118.52]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0MXHhV-1YcwmC2tAz-00WBSg for ; Thu, 04 Jun 2015 07:03:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: X-Provags-ID: V03:K0:ItUPI/iQLdArMoQrciRk0tk6Qm4Yo0FnGzlEMuBge7FU48CCU+J h0dioYVaBnIbxcS3hqiTF3Q2gWnlKWavkO49xFMlkF0MKla5cnfzrrVH3o/BMg1UFlyCEpF WjitqwvsJVlZZO+a2oV0YZ7/Jx4paYN9SiiJrfqKGrFlw+/D0DUnZt4bYpJVZp8ACUpRfsE DoFVdBP4gQ6ftw5blJCjQ== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.24 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:104745 Archived-At: 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