From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.help Subject: Set variable in derived mode before running the parent mode function Date: Tue, 02 Jun 2015 11:46:55 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1433238471 26646 80.91.229.3 (2 Jun 2015 09:47:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Jun 2015 09:47:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 02 11:47:40 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 1YzinK-0000Mj-My for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Jun 2015 11:47:38 +0200 Original-Received: from localhost ([::1]:57086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzinK-0002lV-8I for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Jun 2015 05:47:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzinA-0002lP-0X for help-gnu-emacs@gnu.org; Tue, 02 Jun 2015 05:47:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzin9-0004dm-87 for help-gnu-emacs@gnu.org; Tue, 02 Jun 2015 05:47:27 -0400 Original-Received: from mail-wg0-x232.google.com ([2a00:1450:400c:c00::232]:35263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzin9-0004de-0H for help-gnu-emacs@gnu.org; Tue, 02 Jun 2015 05:47:27 -0400 Original-Received: by wgme6 with SMTP id e6so135168447wgm.2 for ; Tue, 02 Jun 2015 02:47:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=zWDxOqTX5F1s+JloZsZihOZFzaLKJpBH9Xj5wKfoLW8=; b=lrjRuX731SUy2iwvk8/n5bi0F3dkE5OwzYmcbLI3qdoEju0jWCrS0pA0fi1OKluxrg ejh8D7gkwfubzfi1em3K2J4Cd+rphgUt5MzYO9wrF+bbUuxXkpDM+9QAvfjUll5JaHeD hAmYF6+0xE0Q8r43dcws1VIEGLfXahGWWZVFnEOh8i3b+K0Ynkhbpgjqgs+Ka6JYoRM/ 5cljkCCk5qwgosPxg3Dv6IxbhTHUJfLShWy5Dz8TpiygCW/s9TH7I+OYOzePTgNPqu4U VobL6zM5QZt7otbiW1rK64ohqEE79Xg/hcJYZNx5erI0+V0WG/8HEGNPY/s7lZPPoPmK 33Cw== X-Received: by 10.180.94.106 with SMTP id db10mr28749744wib.1.1433238445692; Tue, 02 Jun 2015 02:47:25 -0700 (PDT) Original-Received: from phst2.muc.corp.google.com ([2620:0:1046:0:f4c9:6815:bb19:c4ac]) by mx.google.com with ESMTPSA id y19sm18134709wia.15.2015.06.02.02.47.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 02 Jun 2015 02:47:24 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::232 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:104712 Archived-At: Hi, I've defined a derived major mode of `python-mode' using `define-derived-mode'. However, some of the variables set by `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? Using an advice? Or not using `define-derived-mode' in the first place? Thanks, Philipp --=20 Google Germany GmbH Dienerstra=C3=9Fe 12 80331 M=C3=BCnchen Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Gesch=C3=A4ftsf=C3=BChrer: Graham Law, Christine Elizabeth Flores Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und l=C3= =B6schen Sie die E-Mail und alle Anh=C3=A4nge. Vielen Dank. =20=20=20=20=20=20=20 This e-mail is confidential. If you are not the right addressee please do = not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.