help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Heuristics for: is a major-mode a "programming language" mode?


From: Ilya Zakharevich
Subject: Re: Heuristics for: is a major-mode a "programming language" mode?
Date: Wed, 08 Dec 2010 15:28:46 -0000
User-agent: slrn/0.9.8.1pl1 (Linux)

On 2010-09-15, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>> So there must be some code which decides "which type" is the given
>>> major mode.  I would prefer the bulk of the decision to be made
>>> programmatically, THEN let the user override if the auto-choice was
>>> wrong.  Anyone with ideas how to do this?
>
> BTW, it occurred to me that maybe checking indent-line-function is
> a good way to figure out whether the current mode is a programming mode.

That's a cool idea!  Now I need to check emacs v19-24 and see what is/was
the default value for this.  ;-)

> In theory we already have 2 commands to do that:
> - indent-region (C-M-\): works well in practice, but limited to
>   re-indenting; i.e. it won't add/remove newlines.

It will.  At least in CPerl, if the user desires (configurable).

Thanks,
Ilya


reply via email to

[Prev in Thread] Current Thread [Next in Thread]