emacs-devel
[Top][All Lists]
Advanced

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

Re: Functionality to check current indentation status


From: Lennart Borgman
Subject: Re: Functionality to check current indentation status
Date: Wed, 13 Jan 2010 14:02:51 +0100

On Wed, Jan 13, 2010 at 1:55 PM, Deniz Dogan <address@hidden> wrote:
> Is there any generic functionality for checking whether a specific
> line is indented appropriately according to major-mode? I mean other
> than indenting it and seeing whether anything was modified.

current-indentation

> If not, it would be useful for e.g. a minor-mode which would highlight
> lines that are not correctly indented, or for binding TAB to some
> imaginary function indent-or-expand-abbrev, which would indent the
> line if not already correct, otherwise call `expand-abbrev'.

This is implemented in for example tabkey2-mode, but you always have
to type on TAB for indentation first. I think it would be too
confusing otherwise.

Tabkey2 has a list of completion functions and try to use the relevant
one. And let you change it just before you hit TAB again if you need
to.

See EmacsWiki for other alternatives.




reply via email to

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