From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Functionality to check current indentation status Date: Wed, 13 Jan 2010 14:02:51 +0100 Message-ID: References: <7b501d5c1001130455l2615882bg339c4e41d1596102@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1263387838 12690 80.91.229.12 (13 Jan 2010 13:03:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jan 2010 13:03:58 +0000 (UTC) Cc: Emacs-Devel devel To: Deniz Dogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 13 14:03:50 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NV2t2-0000dq-Mx for ged-emacs-devel@m.gmane.org; Wed, 13 Jan 2010 14:03:49 +0100 Original-Received: from localhost ([127.0.0.1]:40721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV2t3-0003C8-Bf for ged-emacs-devel@m.gmane.org; Wed, 13 Jan 2010 08:03:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NV2sY-00030x-4J for emacs-devel@gnu.org; Wed, 13 Jan 2010 08:03:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NV2sT-0002zG-SI for emacs-devel@gnu.org; Wed, 13 Jan 2010 08:03:17 -0500 Original-Received: from [199.232.76.173] (port=55401 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV2sT-0002z6-ES for emacs-devel@gnu.org; Wed, 13 Jan 2010 08:03:13 -0500 Original-Received: from mail-fx0-f228.google.com ([209.85.220.228]:49968) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NV2sS-0002Ga-JU for emacs-devel@gnu.org; Wed, 13 Jan 2010 08:03:12 -0500 Original-Received: by fxm28 with SMTP id 28so14952977fxm.26 for ; Wed, 13 Jan 2010 05:03:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=yZzDoKc2T+vGCGrarXhAZUY6zIQNDsOrqnA0vqrs9O0=; b=sAy6rrpOHdpjPBKPyeajMmEcOk5TPYY/ynTK5eobU+acnDg43LplAT0HeMWUAC1fAA U3ymJJpIpX0JV9fOoUMwIPZXd5C0Zg9TZYhX41PXuecW3AYclnF3eIZFTiamy6PNMG7Y Xxofa4JPgu8p6RU2qnDonK5ofXMkFgKWQ9Lj8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=V9Yj330mzdTzsklfzjFZw3FqaRMGaNEGTKtxGFGG0Qtav8tVrTUCsZVoMdzyZJYeEq ZN2empWs4BqwGsztQYHTqnyn4yaNu3XExYye9qNFjexbErzPJrorIfVQr2zO0TA5Njf5 ess9/HULo4wY38xBdasrW7KpMSDbTT5tmdUh8= Original-Received: by 10.239.183.81 with SMTP id t17mr533412hbg.24.1263387791171; Wed, 13 Jan 2010 05:03:11 -0800 (PST) In-Reply-To: <7b501d5c1001130455l2615882bg339c4e41d1596102@mail.gmail.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:119913 Archived-At: On Wed, Jan 13, 2010 at 1:55 PM, Deniz Dogan 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.