all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>, help-gnu-emacs@gnu.org
Subject: Re: Set variable in derived mode before running the parent mode function
Date: Sun, 21 Jun 2015 12:24:34 +0000	[thread overview]
Message-ID: <CAArVCkQ_UyfHFy2+ezz=5CpxSi4X44AGXf7R1i4KKezA1JHmnA@mail.gmail.com> (raw)
In-Reply-To: <55743080.1090101@easy-emacs.de>

Andreas Röhler <andreas.roehler@easy-emacs.de> schrieb am So., 7. Juni 2015
um 13:52 Uhr:

>
> Am 06.06.2015 um 17:58 schrieb Philipp Stephani:
> > Stefan Monnier <monnier@iro.umontreal.ca> 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.
>
>
Sure, but that would disable the message for all users. I could totally
live with that (Emacs is already too chatty), but Stefan would need to
agree that it's fine to remove the message entirely.


  reply	other threads:[~2015-06-21 12:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4113.1433238449.904.help-gnu-emacs@gnu.org>
2015-06-03  1:10 ` Set variable in derived mode before running the parent mode function Stefan Monnier
2015-06-04  5:03   ` Andreas Röhler
2015-06-06 15:59     ` Philipp Stephani
2015-06-07 11:49       ` Andreas Röhler
     [not found]   ` <mailman.4253.1433394203.904.help-gnu-emacs@gnu.org>
2015-06-04 21:55     ` Stefan Monnier
2015-06-06 15:58   ` Philipp Stephani
2015-06-07 11:52     ` Andreas Röhler
2015-06-21 12:24       ` Philipp Stephani [this message]
     [not found]       ` <mailman.5357.1434889492.904.help-gnu-emacs@gnu.org>
2015-06-21 17:32         ` Stefan Monnier
2015-12-28 17:48           ` Philipp Stephani
2015-06-02  9:46 Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkQ_UyfHFy2+ezz=5CpxSi4X44AGXf7R1i4KKezA1JHmnA@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=andreas.roehler@easy-emacs.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.