[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, Xah Lee <xahlee@gmail.com> wrote:
> On Sep 15, 2:28 am, Ilya Zakharevich <nospam-ab...@ilyaz.org> wrote:
>> I want a certain keypress act as forward-sexp in "programming
>> language" modes, and as forward-sentence (sp?) in other modes
>> (likewise for go-to-function-begin (sp?) and forward-paragraph (sp?)).
>>
>> 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?
>
> a fool's answer: wouldn't just search for all the [] and {} heuristic
> works pretty much?
>
> most top 10 langs follow c-like syntax, so am guessing checking some
> () {} would work out...
I'm puzzled: "search for [] {}" WHERE?
Thanks,
Ilya