From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Knut Anders Hatlen Newsgroups: gmane.emacs.bugs Subject: bug#61026: 29.0.60; c-ts-mode: Broken indentation for loops and conditions without brace Date: Sun, 05 Feb 2023 21:32:44 +0100 Message-ID: <871qn3am4z.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24820"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 61026@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 05 21:33:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pOlhM-0006Dy-83 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Feb 2023 21:33:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOlhB-0004C6-Ru; Sun, 05 Feb 2023 15:33:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOlh9-0004Bd-HW for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 15:33:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pOlh9-0003Z8-9n for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 15:33:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pOlh7-0007Vg-Rq for bug-gnu-emacs@gnu.org; Sun, 05 Feb 2023 15:33:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Knut Anders Hatlen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Feb 2023 20:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61026 X-GNU-PR-Package: emacs Original-Received: via spool by 61026-submit@debbugs.gnu.org id=B61026.167562917928857 (code B ref 61026); Sun, 05 Feb 2023 20:33:01 +0000 Original-Received: (at 61026) by debbugs.gnu.org; 5 Feb 2023 20:32:59 +0000 Original-Received: from localhost ([127.0.0.1]:46558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOlh3-0007VM-O2 for submit@debbugs.gnu.org; Sun, 05 Feb 2023 15:32:58 -0500 Original-Received: from mail-ej1-f49.google.com ([209.85.218.49]:41962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pOlgz-0007V3-0Y for 61026@debbugs.gnu.org; Sun, 05 Feb 2023 15:32:54 -0500 Original-Received: by mail-ej1-f49.google.com with SMTP id m2so28906049ejb.8 for <61026@debbugs.gnu.org>; Sun, 05 Feb 2023 12:32:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=lHW/4VoeCVe48Aq06T/y5Ccj4cTgeaIhoB0j2AgXJAU=; b=HN3Cqsl+uWxZZvsmpICZjuMqLORfjehCmC5Ds6rIcsVRYbjxW+zPAObQrejx+fECad VVwgImBEDab1BIi2Flz/gARgzJaHrAgfVZLvOj21CCLOlu0m93Jx11oD84zhTfsV4w4C c1iiy5/i+9SeQHtoqg/XEp6GNB1bsa5hu8xgvR1pzYNwlHHdAtyGSGUTL7oNilQ3oHwH dOdntB/HEfvyAHpecnm8IgbKZcR10LuHk7BU5EIfg9FPYdUeXgX/Y+jGMFNTZqDG0B9F OAztLQQq8fwV8q4cug9vjq/4aXh9D408eTMCTFmjSSwijEC1n9RhlJvgFDN1CAws5L5u AroQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lHW/4VoeCVe48Aq06T/y5Ccj4cTgeaIhoB0j2AgXJAU=; b=fEf1Xk4zFwE959S3/ZtiVxJifOgT3md8VPZHsyPKTFc6UvyWTsDf0PbX5eoFfqnff9 kywHL6sCeQrBTnSXpuIpQHwmtZyOIp4LpHmFGxEJ43+M4g/mTHm307vXYGNY24QhLKjd SkC7Nu1RsET5FwB392zNKzbaSodCZiYAnmj7uZFTX4loqAdqmOn/JDuqgueitm5WfWtg 448CV/KbJcra/ZKaHpu8NV54RhxAB67VKBOG63LQNZvtwjG1p6L/kbG0NVnn2lC48N+5 q0sGW5WfK4zzyMCUVOTRhDyTZKo5ZpMYo3fOz9Dwve9BmUp5TUrpvZHXKeI+SX+THsYk xdig== X-Gm-Message-State: AO0yUKVEjqG1JTmSsCGFhIHvK8CRHbxtOs+7EIKkvJ3ePfNQDLQ/EAjc eWBEo0ouzeHvBgZc5SePsj6sBvdANMPB X-Google-Smtp-Source: AK7set9ws9BCrkSUV0VyKT677ww5UhKCuWVxDJHQm3GvKB2lLhmgjrwY2vHmI/dSXqz/Y/RPUhti/A== X-Received: by 2002:a17:907:6eab:b0:88d:ba89:182f with SMTP id sh43-20020a1709076eab00b0088dba89182fmr14222555ejc.0.1675629166886; Sun, 05 Feb 2023 12:32:46 -0800 (PST) Original-Received: from dell ([2a02:2121:6b1:b9d:6dbe:69a1:124b:c49e]) by smtp.gmail.com with ESMTPSA id lt14-20020a170906fa8e00b00880dbd4b6d7sm4568674ejb.170.2023.02.05.12.32.45 for <61026@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Feb 2023 12:32:46 -0800 (PST) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254892 Archived-At: Hi, I'm still seeing odd indentation for conditions without braces. For example, invoking c-ts-mode-indent-defun (C-c C-q) with the point inside this function ... int f(int x) { if (x > 1) return x; else return x + 1; } ... results in the following indentation with the default GNU style: int f(int x) { if (x > 1) return x; else return x + 1; } I would have expected this: int f(int x) { if (x > 1) return x; else return x + 1; } Is something more needed for this bug, or is the problem I'm seeing a different bug? -- Knut Anders