[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Heuristics for: is a major-mode a "programming language" mode?
From: |
Tim X |
Subject: |
Re: Heuristics for: is a major-mode a "programming language" mode? |
Date: |
Wed, 08 Dec 2010 15:28:39 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Ilya Zakharevich <nospam-abuse@ilyaz.org> writes:
> 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?
>
> Thanks,
> Ilya
>
> P.S. In addition to sexp/sentence and function/paragraph, are there
> other "merges" one can do to do navigation?
Hi Ilya,
Not sure if this will help, but in current emacs 24, there is note in
the NEWS file about a new mode called prog-mode, which is supposed to be
a parent mode for programming modes. I believe the supplied prog modes
in emacs have/are being updated to be derived from this mode.
The main role of this mode appears to be to run the hook prog-mode-hook.
Maybe this could be useful?
Tim
--
tcross (at) rapttech dot com dot au