From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= Newsgroups: gmane.emacs.help Subject: Re: Set variable in derived mode before running the parent mode function Date: Sun, 07 Jun 2015 13:52:32 +0200 Message-ID: <55743080.1090101@easy-emacs.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1433677983 2960 80.91.229.3 (7 Jun 2015 11:53:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Jun 2015 11:53:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 07 13:52:53 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 1Z1Z8G-0001M3-Co for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Jun 2015 13:52:52 +0200 Original-Received: from localhost ([::1]:54022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1Z8F-0001zw-HD for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Jun 2015 07:52:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1Z82-0001zo-SN for help-gnu-emacs@gnu.org; Sun, 07 Jun 2015 07:52:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1Z7y-0005uS-IS for help-gnu-emacs@gnu.org; Sun, 07 Jun 2015 07:52:38 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.10]:51619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1Z7y-0005tc-7N for help-gnu-emacs@gnu.org; Sun, 07 Jun 2015 07:52:34 -0400 Original-Received: from [192.168.178.31] ([77.12.67.65]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0LvQBP-1ZBMgc1mbr-010gPU for ; Sun, 07 Jun 2015 13:52:33 +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:lBRkG2dDW7VPOdRF+9hRAC0TeV+gShYCtebqWGP4umURjsliZQz V4Kf9wH0PD3PDJd6ikk1TKBCGps1raiAmubIGwppD9DeTtv/3r3uM1cB1A43dp6T6QUZPte mccDzoz5Sohg4eOX2osjoBPCUPtLMREbW0gZloCEgBR84dKVmUx7Qtn8td/QufyaPPJjtyv 0bqhTfWaCpUhnYGXzv9dA== X-UI-Out-Filterresults: notjunk:1;V01:K0:Aoy0Ygy0tC4=:RuElbpyullTBZQIfKhdBBi ZLGv7lM9MwQSWkgBoq4kwdN8f8cFU4/7HBSNOsCTPfSdXKwg/McuPr0j4mk1E58Y5U5AdMg6+ BHHMHpzDb8BojbZlvJtM34gPDRVUfUuUQgoK8H8ZF6sNLAoQ+qirrpmgwGOgmQX4TpUBydSt1 7BCbuiUkJouwh7Vq1QjRWcl9FJaTU0av0hO0l3iowUkEK9ypAH0lbf2XLY3C10/iscKYlp1xF Zl5iOaM5LlHKvPx6pkjQ0xK/ci0bQbZMuQONQxzrgGz+GZStO5zcXR1/lPXrVH16C32NLdyD6 HHhi0+Vbrjqh44Q5qsE784q8HnkiLbvhQvLfSjNChrQxMHAEBpdOrF9S1c1SkdhVFx9e/Rw9v FcppvbgWk+mU31TKy64xzHJfOmB8SbAut8oc/c2JeLtOPVmHtzpx7JxbKaPQNmitOx69pA4tP cWH3WCqEH5zKmukIYjwoBDZXopvff4fNEU7Fx1VrCN32vNkNiOT9mJ972wWCBFKYQntdNoH9Z +btIMwHP8Gnqmi0wz4PhqqvdAO/HPSJ2HOupnkgFpOrzj9vOuhZRfpoNcQFv9o7Lr0vwHiLcn NH/bKSn0uXWLfcFZjxwNVehCfOdo7t/f6Lxb6d7qy8qe5D4nunaDecw0dZFMi0S9NSB2Qn6sQ 8kTvrQC8BzkrL0Y8oZgHAdmFz761pNYWUilqMfg1ufK3epA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.10 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:104810 Archived-At: Am 06.06.2015 um 17:58 schrieb Philipp Stephani: > 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. Disabling a message is another thing than disabling auto-guessing. Look into python.el, definition of python-indent-guess-indent-offset Messaging is done from last line there. Put it at an extra line - i.e. a new line at the end of "(message " sexp. Than comment out that line.