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: Re: Set variable in derived mode before running the parent mode
function
Date: Sat, 06 Jun 2015 15:58:42 +0000
Message-ID:
References:
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1433606354 13962 80.91.229.3 (6 Jun 2015 15:59:14 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 6 Jun 2015 15:59:14 +0000 (UTC)
To: Stefan Monnier , help-gnu-emacs@gnu.org
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 06 17:59:14 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 1Z1GV1-0001kC-0J
for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Jun 2015 17:59:07 +0200
Original-Received: from localhost ([::1]:51859 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from )
id 1Z1GV0-00035K-95
for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Jun 2015 11:59:06 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50921)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1Z1GUp-00035F-GL
for help-gnu-emacs@gnu.org; Sat, 06 Jun 2015 11:58:56 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1Z1GUo-0002lD-C7
for help-gnu-emacs@gnu.org; Sat, 06 Jun 2015 11:58:55 -0400
Original-Received: from mail-wg0-x243.google.com ([2a00:1450:400c:c00::243]:33305)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1Z1GUo-0002kz-4o
for help-gnu-emacs@gnu.org; Sat, 06 Jun 2015 11:58:54 -0400
Original-Received: by wggy19 with SMTP id y19so6568741wgg.0
for ; Sat, 06 Jun 2015 08:58:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:content-type; bh=dkzUDicAZY2dck5vhYyy7sxlhpTUxXB+FcHiyZcbRU8=;
b=XoMqgj7p3mE7BwFCuHGAS25IxEqSMGmD/YXxXhPzYr6aCnBZMpeZNMod7sPDVMd58P
V1xjc4mzciv7AsWCxN7wsxfKyfEvhV37B5e0rwtjlj/+mbesuAMRYCCrgPkOU8OPLzHJ
JIOFBG4OhE8VvAkJdo02Xu6u4ZhhuV9mMPj2C7E8FZNIin4/4wASRKQrne50kwusAKS8
2mj+aC4SSOOLDMS8FwqpNg+/iq1wO7UupK9iUIXMwKBD7chbaNTrattTM0w28hREYsYQ
nBfHmOCjjqpjDr0vvMLvcgEhEcNy/dYxo0YHK54LlSMz0Dm6ToI8umRYe2UrmpV7L/qG
guYA==
X-Received: by 10.180.104.197 with SMTP id gg5mr6602661wib.27.1433606332396;
Sat, 06 Jun 2015 08:58:52 -0700 (PDT)
In-Reply-To:
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
(bad octet value).
X-Received-From: 2a00:1450:400c:c00::243
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
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:104792
Archived-At:
Stefan Monnier schrieb am Mi., 3. Juni 2015 um
03:15 Uhr:
> > `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).
>
>
>
You're right, that wouldn't work. The problem is that
python-indent-guess-indent-offset prints a message if it couldn't guess the
indentation; I'd like to suppress that message.