From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: moving some indentation tests Date: Mon, 3 Apr 2017 16:38:03 -0400 Message-ID: References: <878tnj2lap.fsf@tromey.com> <874ly6ft50.fsf@russet.org.uk> <87y3vhd9ud.fsf@russet.org.uk> <874ly5cuob.fsf@russet.org.uk> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1491251932 14555 195.159.176.226 (3 Apr 2017 20:38:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 3 Apr 2017 20:38:52 +0000 (UTC) Cc: Tom Tromey , Emacs discussions To: Phillip Lord Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 03 22:38:43 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cv8kI-0002RQ-FV for ged-emacs-devel@m.gmane.org; Mon, 03 Apr 2017 22:38:38 +0200 Original-Received: from localhost ([::1]:32883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cv8kO-0004A5-BA for ged-emacs-devel@m.gmane.org; Mon, 03 Apr 2017 16:38:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cv8jm-00048k-Lf for emacs-devel@gnu.org; Mon, 03 Apr 2017 16:38:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cv8jl-0000Ut-Jv for emacs-devel@gnu.org; Mon, 03 Apr 2017 16:38:06 -0400 Original-Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:34253) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cv8jl-0000Uc-Du for emacs-devel@gnu.org; Mon, 03 Apr 2017 16:38:05 -0400 Original-Received: by mail-oi0-x22c.google.com with SMTP id d2so7656240oig.1 for ; Mon, 03 Apr 2017 13:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=zZwv354TNkZ9E0fVMv3gexRwBCI4D27o4xWx5Q1RsC0=; b=F8tUANkkd7yJq/M/3lIEa60PD6T32zrzQEOr9A3Sj7snUIo5k0lEmD/RRhgSRcFdJS tUiVpOP60+nepN0StTiREFhifgBuULijFdf21vqYnqYcxgwGsiGOlzgxQagMlGncGe2B BvQq17aEeMqHJveK/sw2qjfXwH06i5iSxj3oNmyNaXPnRQAsf7sZa94n71MpSqZ596FB CkkYG5oj73iO+UoLtgy11Qg66f3mQmdc3SByrt27wrZr2XAZZO/aP5NdpnBdeEGiOehg 2WP0TvHjHn77/IQrsZYK/fzA+oy0PN2V7aytxJhYAvUmRaow8ff0tOnyfbcMxjH9xkT1 IcYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=zZwv354TNkZ9E0fVMv3gexRwBCI4D27o4xWx5Q1RsC0=; b=cHnuUUtlnl3N0jJNDm6dKOuJZBdHMn5PVVIdjHxNHu6OiICfPd5AuLPtCuGMkxp5LA cWjMtiB3oNofZ+xsDgwRRFZLI8gFotP5PCT7/Cd4ATo8L2yibpi1/XxMXGbHp6YrIuIe PZ/UQADaRd+dOeEb46Uw+zRXTk40yqo7XOgh3jlBn5/zCKkHfrQ8vomARlf0uSIzHHUM AndyZOx7wELNp/H4j2cA6sAhrH2iuTCw93MposkkcSj+zwdX4VRECU1zsICGrXr2QuL2 bHc0TMF2+YazAIqudfpUD3muyWn88H/p+B78PywMf0arTW/NSj8iAOi/KEA2W9va81bJ 0VOg== X-Gm-Message-State: AFeK/H3XPMXGX9w38Pnf1LSvRPULEJ4U49mF1vx1cNe51xd17jdcjQYHAUnWCGX7b3XGo+IlSQryPqM0LQSahw== X-Received: by 10.157.7.199 with SMTP id 65mr9600077oto.30.1491251884305; Mon, 03 Apr 2017 13:38:04 -0700 (PDT) Original-Received: by 10.157.80.133 with HTTP; Mon, 3 Apr 2017 13:38:03 -0700 (PDT) In-Reply-To: <874ly5cuob.fsf@russet.org.uk> X-Google-Sender-Auth: eyHs-ZqagjyCgaP0Bll9ADL2F_Y X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213625 Archived-At: On Mon, Apr 3, 2017 at 12:39 PM, Phillip Lord wrote: > > Ah, so you put in some relatively random indentation (well, not random), > and then reindent it, rather than starting from totally unindented. Yes, exactly. Arbitrary, but not random because if you have a test failure it would be annoying to debug it with different indentation each time! > > Although I think emacs-lisp-mode is not working correctly here. In my hands: > > " > (hello > (world)) > " > > indents to > > " > (hello > (world)) > " > > in emacs-lisp mode. So I'm not 100% sure this is assess not working. Ah, because lisp-indent-line doesn't check the parse context. `indent-sexp' does the right thing, if called outside the string (and also inside since #21343 was fixed). I believe my patches at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25122#77 will fix this for `indent-region' (since I happened to copy the syntax-ppss fix from #21343). Probably `lisp-indent-line' should also use syntax-ppss to get the correct parse context.