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 15:59:37 +0100

On Wed, Jan 13, 2010 at 3:55 PM, Deniz Dogan <address@hidden> wrote:
> 2010/1/13 Lennart Borgman <address@hidden>:
>> 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
>>
>
> Thanks, but that only returns the current indentation with no
> indication of whether indenting again will change anything. I'm
> looking for something which will "automagically" understand the
> language and return e.g. nil if and only if the current indentation is
> incorrect. Having looked into indent.el I'm guessing something like
> this doesn't exist today.

You can do it by indenting and then undoing. See mumamo.el for an example.




reply via email to

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