From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 01 09:37:32 2023 Received: (at submit) by debbugs.gnu.org; 1 Mar 2023 14:37:32 +0000 Received: from localhost ([127.0.0.1]:53106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXNaG-0003cV-7S for submit@debbugs.gnu.org; Wed, 01 Mar 2023 09:37:32 -0500 Received: from lists.gnu.org ([209.51.188.17]:47284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXNaE-0003cN-Qy for submit@debbugs.gnu.org; Wed, 01 Mar 2023 09:37:31 -0500 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 1pXNaE-0001yz-Kk for bug-gnu-emacs@gnu.org; Wed, 01 Mar 2023 09:37:30 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXNaD-0004aR-Se; Wed, 01 Mar 2023 09:37:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Subject:To:From:Date:mime-version:in-reply-to: references; bh=ey1Mx3+vGaxk6JSRO+aMpFSDZv5Odh5cjihMpDEhf2Y=; b=deUNBdOH0O1lxr KP9sI+6dVhu5zy8+XCbVV/G9aSstHEqN6gr4nQxgWYKk7MFqXfFxwbkSlUck0SZgnxa/YcYjBB0Va zyKu8JdjRGhQf2sYg89Hojy0oDdwK0GGtthq3mOyjWBFGi9epCF8zIge/DZfxFz17UnN2kiXqDGIG zZz8UUfNq7ghyOiyxK+tCUc110dbDQNIu675a/Vx+k0G9vH/QauV956jf2pVE/kqZJ0AXgf4Pfk0M Q0Knc/T09ow3AQ/qmABOLfwtAj2mF0mJ3A3UdjRfpC4godwAVHEh2qmyqn2FDuUXhjEr+0K2YnJBX VRPu3PUfqJAo0/Oe3Mww==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXNaD-0005N1-9U; Wed, 01 Mar 2023 09:37:29 -0500 Date: Wed, 01 Mar 2023 16:37:43 +0200 Message-Id: <83k000fsg8.fsf@gnu.org> From: Eli Zaretskii To: bug-gnu-emacs@gnu.org Subject: 29.0.60; Indentation in c-ts-mode broken again X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Yuan Fu , Theodor Thornhill X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Indentation in c-ts-mode on today's emacs-29 branch is in muc worse shape than it was a few days ago. To reproduce: emacs -Q C-x C-f src/dispnew.c RET M-x c-ts-mode RET Go to line 170 and type "C-e RET": point goes to BOL instead of column 2. Similar problems happen in many other places in the file. It also sometimes happens inside a block: for example, go to line 290 and type "C-e RET". But in other places within a block RET behaves correctly. What happened? In GNU Emacs 29.0.60 (build 363, i686-pc-mingw32) of 2023-03-01 built on HOME-C4E4A596F7 Repository revision: 40c9fc8e3b3f55c9122b95e21660b5709109bd1a Repository branch: emacs-29 Windowing system distributor 'Microsoft Corp.', version 5.1.2600 System Description: Microsoft Windows XP Service Pack 3 (v5.1.0.2600) Configured using: 'configure -C --prefix=/d/usr --with-wide-int --enable-checking=yes,glyphs 'CFLAGS=-O0 -gdwarf-4 -g3'' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB Important settings: value of $LANG: ENU locale-coding-system: cp1255 Major mode: C/* Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils c-ts-mode c-ts-common treesit cl-seq vc-git diff-mode easy-mmode vc vc-dispatcher bug-reference byte-opt gv bytecomp byte-compile cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 81788 11421) (symbols 48 9613 0) (strings 16 28450 3239) (string-bytes 1 916865) (vectors 16 15810) (vector-slots 8 208511 14555) (floats 8 28 75) (intervals 40 2215 89) (buffers 888 11)) From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 01 11:36:12 2023 Received: (at submit) by debbugs.gnu.org; 1 Mar 2023 16:36:12 +0000 Received: from localhost ([127.0.0.1]:54770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXPR6-0001dO-6U for submit@debbugs.gnu.org; Wed, 01 Mar 2023 11:36:12 -0500 Received: from lists.gnu.org ([209.51.188.17]:42680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXPR4-0001dG-Cj for submit@debbugs.gnu.org; Wed, 01 Mar 2023 11:36:10 -0500 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 1pXPR3-0006jJ-Dg for bug-gnu-emacs@gnu.org; Wed, 01 Mar 2023 11:36:09 -0500 Received: from out-9.mta1.migadu.com ([95.215.58.9]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXPQx-00032V-Kd for bug-gnu-emacs@gnu.org; Wed, 01 Mar 2023 11:36:08 -0500 Date: Wed, 01 Mar 2023 17:35:55 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1677688559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pr+yC5Cio3ckC9gKoSg49QOdkUWPkq0CzaLy6Zaq00s=; b=Xs+UO39P2Wt/HBeqnBKLBqO5p40+NURHTPZv0Ezbst1P7I3q1Vet3n7xBOqxV5L7ieNWSU 2HC/nhtX8CgQAtu52sEO/6ziJf3BAWU3s8KmACKEnFSK7Hz57PDhSok8VSp4Y6PK2yR3Op ZfV0K8hVOnBvhYqCDi+D2OhzwlMysuCAYvRPvNgrwxDO0XshEbnzTD5WoicJFLDr4s1A8b aSk9uxmnbwPpqxySdHBbAG/6O0HAATTSiiATnuxLiZgQDDxrwPIJccV84VdqHvIvWqKDTp jaElcEB3kIPenp6b/5IX+D+lOyO11v9lh1webDdv5Iuc4qpaVHg4hqLUuEuf8w== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Theodor Thornhill To: Eli Zaretskii , bug-gnu-emacs@gnu.org Subject: Re: 29.0.60; Indentation in c-ts-mode broken again In-Reply-To: <83k000fsg8.fsf@gnu.org> References: <83k000fsg8.fsf@gnu.org> Message-ID: <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.9; envelope-from=theo@thornhill.no; helo=out-9.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Yuan Fu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) On 1 March 2023 15:37:43 CET, Eli Zaretskii wrote: >Indentation in c-ts-mode on today's emacs-29 branch is in muc worse >shape than it was a few days ago=2E > >To reproduce: > > emacs -Q > C-x C-f src/dispnew=2Ec RET > M-x c-ts-mode RET > Not sure, don't believe I've touched it last couple of days=2E I can take = a look this evening! Theo From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 01 11:59:00 2023 Received: (at submit) by debbugs.gnu.org; 1 Mar 2023 16:59:01 +0000 Received: from localhost ([127.0.0.1]:54790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXPnA-0002FP-IV for submit@debbugs.gnu.org; Wed, 01 Mar 2023 11:59:00 -0500 Received: from lists.gnu.org ([209.51.188.17]:36140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXPn9-0002FG-8S for submit@debbugs.gnu.org; Wed, 01 Mar 2023 11:58:59 -0500 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 1pXPn2-0005sk-Up for bug-gnu-emacs@gnu.org; Wed, 01 Mar 2023 11:58:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXPn2-00082B-Eu; Wed, 01 Mar 2023 11:58:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mEPgL6LJxMW0+fDCVIn1fGH+0lSubZAgt5mBSfVdCUk=; b=T3HNMD/VNenc M6Ok4uw0KphD/ZfTapFvxAlvjAphjYVm/HZgxtx0A9FPzad2OMVIF7LeHXt/v0OvJru2na5G2jhbw 2n08ki8QBe2G5IkM+s1F9lAhMqO8OY4Eq1AnglF0C/ibmSXVofukONG8YO2WXYSwQPhtwOJtq3JHv sZMndFyMFOI0z38CGGwFtmSJRPdzN8bYqzZLanO69VSNHRvX7U5zVofkSbnA/Ib4BtTbIQ8odH8N2 PWseK8UWVA2c63p23si/uM8kQlJO3QAj3VoyBedzIKQNiIMxWPgQKrjpXgKQl4j1OCnqFJ9Tf8uOE q92Z8P+NsDqgRAzoI8hH0Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXPn1-0006Q3-0v; Wed, 01 Mar 2023 11:58:51 -0500 Date: Wed, 01 Mar 2023 18:59:05 +0200 Message-Id: <83a60wflwm.fsf@gnu.org> From: Eli Zaretskii To: Theodor Thornhill In-Reply-To: <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> (message from Theodor Thornhill on Wed, 01 Mar 2023 17:35:55 +0100) Subject: Re: 29.0.60; Indentation in c-ts-mode broken again References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org, casouri@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 01 Mar 2023 17:35:55 +0100 > From: Theodor Thornhill > CC: Yuan Fu > > > > On 1 March 2023 15:37:43 CET, Eli Zaretskii wrote: > >Indentation in c-ts-mode on today's emacs-29 branch is in muc worse > >shape than it was a few days ago. > > > >To reproduce: > > > > emacs -Q > > C-x C-f src/dispnew.c RET > > M-x c-ts-mode RET > > > > > Not sure, don't believe I've touched it last couple of days. I can take a look this evening! Thanks. It's always possible that it behaved like that back then, although I'm almost sure it didn't. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 01 12:13:49 2023 Received: (at 61893) by debbugs.gnu.org; 1 Mar 2023 17:13:49 +0000 Received: from localhost ([127.0.0.1]:54808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXQ1U-0002cs-RU for submit@debbugs.gnu.org; Wed, 01 Mar 2023 12:13:49 -0500 Received: from sonic304-22.consmr.mail.ir2.yahoo.com ([77.238.179.147]:42717) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXQ1S-0002cd-Jd for 61893@debbugs.gnu.org; Wed, 01 Mar 2023 12:13:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1677690820; bh=2AdzRAiOdQN6pwoWSjOscubTgjepIEVarFM5F48SKAU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=PpG4EGzvuyVKBPelBdtwvOU3SxFDIMQGoqJ5MYWY6yG1bxvWkTd7pXxrNGMkZSSrYk8ebY80mL2VGaS16OXf7uzErSkmDDHRyo9EIeQSt+bihou3Ezt0mH5HgqaVRqbw6rs/nI0AwBG62WY/61aJeyyOakJ4nlXh6tlaaoA4KKd6eWopx566l9lXEwamPBHiR16KmUv4GKfliEQqtv+cvYcPYszeNhej5ZIsvWozD3DoFn5Pot+Ink9VPL7unH4DuN6O/qNs1ovo+ZyJf47CDKJw2/TlLPNLeNn0CaLAcKpn/zefnhUs5iBRy37rij85UgwMC8QuRqAts6eq1YnkoQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677690820; bh=nYDwwBCA4LRO7BfRuzY61xGaVCDDmZrWPBddgZc+dTk=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=mi0jyDBY9HN/2PkxZ7c0V2+EaL13AMI4orppQOhVrHpRmRP1rwFrSG04q6chbuW++PX8bbe3TclXqmKa8n2SRcYfLeVEssCy3S4Xk/9xr4lO7LJInl8KAlDDAm8LNMFFiu6Rai6sPWrKK11d0OvcyUXI+Bgwx4irD2HmnZ1vJrcv00vGqBDpy1t1kdTvI+CQomMrk/s3x6ZrTA6E7blY1OV/A4b7wR5fr8Qpr3Kv6gcuVcaxD/7TMW2a2w/UMlKhdq4OFS68M97lgL1XEko7t3lzpYkkX6LT4c//nFMi9rnJHQpTtBGQT12mFlZvWIxMnjLeraYPZMgOAW2OcimAdg== X-YMail-OSG: TJcnSwIVM1kx3U5uW8z5UZOeoftiJO_ZuNex.MIW1a4Dt2LjC69OFh6BHyL81IP IlIhPO9wJ1oHe0h3aGMllxub8N16ob5a9WqjGNyj3tcmrSZPqDzWfKsZoRh2d4F_02NZj8dwLtZC unNOMqMyS6aG.e2HLtdSD4gve9d8NqQW8Nrc1xXVSbzq1vnYTJp.9bvuvOzbFUNFCgP.mpasiQT3 J3WYC8QZ062jjIUWhogXvjpGPXiAt5_laPffinFS21Sj_4YSXsRlUHCOPosIImzdaoJVEdrg4MT4 rcFD6UwzmRZ6xA1rXL5o_3kP8hgoBgYRg_ZkVbvsRJVyHSU3TWJf1D9JsinqwB1ubg0bTZ973zr1 NIso5_T8FLKwECio3TqHOgImYSw7BLnOLB117DGJHFBMPO6VsS7wh82hiHDSrJVRaV9HhfET8z4U G.j6BIh8a5Qo0lS6aKogr_GGwsL1Xgd8hwCwQOs9NP63BKDi2nP8VtQJpIfM.P93zf_CSJxiliW5 KkE7dEgmhQvz1syaTpmY7rWtgQV3iHo5AoJrQEVGBOiM0iN3GJ7iBf18uswFQmXNzS4GWlMtEltG jkk.aV5d4AdYpDBxrV9e7Bt4ISorXj96S6w3iOuRIiL4z6WV_bG9KCStUEBoKU79RstbZpcWih5A 91epxHqT0Z6_FJXXTPRfYeAQGuHCu50pXI7VvvJEmNM7ga8g2CcH2DGsnwyuJBbQDZBe7Bk7sGW5 qcK.tXqH5HJ9v7MyB0L3UAh0nEy70rdGQdQYkteBdbRg.voVj1HZsOcrxsEkQOmILlviul2zevqG u64GCxXjW03P.5qPjWtLt.W1crS0sQIRbFREYQjQxect9gbhDOgknhR7PmkfHS7.tSV7GZxqjdsy HMajJKB4tLCUJYMCEBPkN0LxfwjYf58Zzx4K822dTQnWAwwZ1LlyH0R.voXiJAiUncuojQxtp2tw M7VDJxpM84WTFYM4K2lQavi1JtA4UnE1aVattKPDioPX_03bJKHLr0Us23FL8jEPbrH42epPjv_m Xu4E9Fh.hnom88DKvh8QY_ok5MgPyKJfSQYQJ9MNFekTKaZznCLDfvfmaOyzPnDOwTfBPi3RrX_W T1uIPjtJa4qv9KUYMDA6qwf7Y2j7JqDvIslWYeFq.YT7jLw8YD7UXJIrrvB59eM3U4z7xNcu8_m4 bZZb6DlukzayAscigw9RpD9275do_2TAO1SWIu2obz847DhCWQlf6bjyiNXFrbS91rmJJs9Sew0z 1qU1Uv5odFqLG2HFcupA6oXrEX8ayjSyeTgF59rAZ4_cQhJt07lSepcqXP5pHeknBh78aZ2tpou. 9IbAt4uWp1IEq4xcDJRV0dx9Nl7cYosXv281nqAaVXwKG70ixZ2v11.pVXtxbZ1grg85h9XCKBhZ e7Cg9WpyMqUJIYqrg0SBfzhwXaqipSmzdqy7xae5atifBinlPAMe_hNPQLHIjAjlWMUxdW3meY6t xeTwPEsHn4N3wVi2TvG5dEUTOOmXhKfd5.5gqcG7wuz58HeegSaD_DwViA8GE.jnUPm7X.EaLfQw WOaVbPKg2v8wzTPwNM83jBlwWjxcASFhucY15Lx2xwnMxGfYgerHpqmQB52ZogBxlZPP20AhQElk XW9IrHr0QqyYQSaWOHnxZ_FLOGs26GNL80kMCx417zn9KMGOX0oCV5PN3TuRLLZsiDYjqrSR1dih tEEvIVH8z5GIMxRcSyQvvHbEH33Ry1F_BpK7qvGUPAksARSCr9PvD4JzefxZrF2UNPuxg3_ZnivI k_NeEIisK93oDyX6f5wYFDU9uM5h0iP1dkixPEuFiO7ndif84W4RmQ.e9CC2E98z_gpiXwT8rf2t cNl1g7OsY0JP3X6_xZLCFub9Pn38yqBkfU9Kp8z1szVkZXmrIbVdvTJoWE6JbxT92IUR.DupoF1n E2aahxbEAX1juoZNnKpYi1mYQH5J_wl1mBPqwwxHwQwY_cw4dkEKgT1YtIAFre1IGLSfExMmml6b LNLuRt77vkLw_Ow6APTlWwDB4Qnl3v71Su69Efm24JhRwGXqMF.McWnJtdCBFwfPIxpdvSH11esR noIjpa2YEGqMRi_woyKZu9xEj5IOoo7ohHQh7PRWA7tRAZgplivcqqA47Y5bdupFGrVdJB8k7VhS xa7PbZH5NZQNBJBMpiBR_.p_LChU2tRogLApuCFPcCrEpeYqM_jrtef_2qTfRokyBTIhd42lTbnu RAxe1FD9xIrsSRIRCNqJhdZgCyFEYbMHdhoJ74AA.QJc- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Wed, 1 Mar 2023 17:13:40 +0000 Received: by hermes--production-ir2-65c64dfd66-pqdpl (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 217ef40a16e30ad612c8f81de664d9dd; Wed, 01 Mar 2023 17:13:38 +0000 (UTC) From: =?utf-8?Q?Daniel_Mart=C3=ADn?= To: Eli Zaretskii Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> Date: Wed, 01 Mar 2023 18:13:37 +0100 In-Reply-To: <83a60wflwm.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 01 Mar 2023 18:59:05 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21221 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1365 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 61893 Cc: 61893@debbugs.gnu.org, Theodor Thornhill , casouri@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> Date: Wed, 01 Mar 2023 17:35:55 +0100 >> From: Theodor Thornhill >> CC: Yuan Fu >> >> >> >> On 1 March 2023 15:37:43 CET, Eli Zaretskii wrote: >> >Indentation in c-ts-mode on today's emacs-29 branch is in muc worse >> >shape than it was a few days ago. >> > >> >To reproduce: >> > >> > emacs -Q >> > C-x C-f src/dispnew.c RET >> > M-x c-ts-mode RET >> > >> >> >> Not sure, don't believe I've touched it last couple of days. I can take a look this evening! > > Thanks. It's always possible that it behaved like that back then, > although I'm almost sure it didn't. A git bisect pointed to this commit, in case that helps: commit 4a25fa4586c9d419ca96441120f4b9189e13ae1c Author: Yuan Fu Date: Fri Feb 24 18:40:52 2023 -0800 Align to prev sibling for c-ts-mode indentation As requested by a discussion on emacs-devel. * lisp/progmodes/c-ts-mode.el: (c-ts-mode--anchor-prev-sibling): New function. (c-ts-mode--indent-styles): Indent first child as before, indent the rest to their previous sibling. Remove bracketless statement rules that I forgot to remove previously. lisp/progmodes/c-ts-mode.el | 46 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 01 13:26:25 2023 Received: (at 61893) by debbugs.gnu.org; 1 Mar 2023 18:26:25 +0000 Received: from localhost ([127.0.0.1]:54904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXR9l-0004Vr-6x for submit@debbugs.gnu.org; Wed, 01 Mar 2023 13:26:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXR9j-0004Vc-Um for 61893@debbugs.gnu.org; Wed, 01 Mar 2023 13:26:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXR9e-0007Jq-4v; Wed, 01 Mar 2023 13:26:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=SDmaV59yJJjpE6JrLeCCKOy8uo8fCsLVNHVp/7fug0o=; b=rRzWXhQtVyC9NIXk8Bhf ypCLWX38NhHF2ci3OJpDgZd4huWMpe5tClw4UQFvyS4BVusV3U5d5Pppb+RPe4oyVJ4eQx61ESwYF 5z0J4yli40GS0EAFmvTu/GjK4ARhqMLU75lv9fQtxwVyOrB0eojLQmpDtdzDM3f5dDhI5yQA98bi/ U+RCaA6uCCtjoqxhCbX3hOoiuhW+6RA97FOCw7OMPpg3O5SbEUqT3Jo7tlFVQrlBIntO8e5cpYQbF jkLVPl8ATJNLwH1PiZ0S/7xpZ5jUhM4zKsz2VMMVjdCb5LF3ZCq114Bi+LzR4nQm47rCgrjXlY2sJ Jaq2ahhHFYHRsA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXR9d-0007VP-A5; Wed, 01 Mar 2023 13:26:17 -0500 Date: Wed, 01 Mar 2023 20:26:31 +0200 Message-Id: <835ybkfhuw.fsf@gnu.org> From: Eli Zaretskii To: Daniel =?utf-8?Q?Mart=C3=ADn?= In-Reply-To: (message from Daniel =?utf-8?Q?Mart?= =?utf-8?Q?=C3=ADn?= on Wed, 01 Mar 2023 18:13:37 +0100) Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61893 Cc: 61893@debbugs.gnu.org, theo@thornhill.no, casouri@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Daniel Martín > Cc: Theodor Thornhill , 61893@debbugs.gnu.org, > casouri@gmail.com > Date: Wed, 01 Mar 2023 18:13:37 +0100 > > >> Not sure, don't believe I've touched it last couple of days. I can take a look this evening! > > > > Thanks. It's always possible that it behaved like that back then, > > although I'm almost sure it didn't. > > A git bisect pointed to this commit, in case that helps: Thanks. So I wasn't dreaming after all. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 01 17:08:43 2023 Received: (at 61893) by debbugs.gnu.org; 1 Mar 2023 22:08:43 +0000 Received: from localhost ([127.0.0.1]:55196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXUct-0002Fg-7I for submit@debbugs.gnu.org; Wed, 01 Mar 2023 17:08:43 -0500 Received: from mail-pj1-f41.google.com ([209.85.216.41]:33422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXUcs-0002FS-9C for 61893@debbugs.gnu.org; Wed, 01 Mar 2023 17:08:42 -0500 Received: by mail-pj1-f41.google.com with SMTP id m3-20020a17090ade0300b00229eec90a7fso2182025pjv.0 for <61893@debbugs.gnu.org>; Wed, 01 Mar 2023 14:08:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=aASQ4XUcrdd/RQuvsn1nNfUO2aW9QvQaETFndS2WJ+s=; b=GoPHTCcH4VnaFUq2RKBOJIis47FiOw3i87RxtntygrSX7tnB31fhs+O4C66t13Uk+J YyG1hcpMrz1dQFrT8qfU22wt2st1GxbvFsoDbHjoSK1A9PbxrPxvjtOHHS7ecRV5Qnpv mQtvpp7MUG2BXB1ToMqL8Q1hvviQ5SgQnkmBb8htvVXrXm/NGPhhWpsBscltmNSvGZHt 3aEDeCfn6FE+IgJf3VLk7v5qx7C6SBaWAqx6+VMFNqbqZ27bTVsJc2hG8hJW2IU2ftMm 4PV3goVZ3kJbKyj6qZNTCfzxyMQuBGd6a2dh2S+bciCCb+Fr7aGcF6GC/U7CDI5Y6sXs pgKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aASQ4XUcrdd/RQuvsn1nNfUO2aW9QvQaETFndS2WJ+s=; b=TWpKX8AkNGKcUashgKO9/hEB/ujkyvwWGxKRT2pAQIZUVu9eah29ypVuqD5evD/NO1 Sh53dEoeN0oiqn8I7s/vjkCH/R3VNtgcituH4SSoLBlWNhLjC0+Foy3DBaXZN2UbAbYt lwfvXz0h/eIkGR5AtyVC/P/sjYB7qeGWahiSLMR07jY/vimLoNXAmO/AEkaxt8rWserv lPYvkUl6v+Vdvt0vwG/o7uKKxFefySjV833DPsC8nqoe+fb+cRRY21eTiv25+EG22wmz pGvEHanRAJt5NKwYD3xjluAYIUF5AKGsnUPOFl4r/ZpcA8Fis2PSzAB1bWlMKtWs1n7m V3oQ== X-Gm-Message-State: AO0yUKXX4fI6S/YwucgFyyILB8bpwM+OYdSGjmkhxn+Gj/bDnJ7aZbrG sxZnOl9c9nKCX74ihNb/zso= X-Google-Smtp-Source: AK7set9h3xWphep3qldLj/7/3d/sVr5xJxp9A1WhrYjLVpVXzA35x7yrHX+dw+I3EV2VzTVsz3QTgA== X-Received: by 2002:a05:6a20:192f:b0:c7:2a63:8792 with SMTP id bv47-20020a056a20192f00b000c72a638792mr7381584pzb.29.1677708516232; Wed, 01 Mar 2023 14:08:36 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id m12-20020aa78a0c000000b005a8ae0c52cfsm8689298pfa.16.2023.03.01.14.08.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Mar 2023 14:08:35 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again From: Yuan Fu In-Reply-To: <835ybkfhuw.fsf@gnu.org> Date: Wed, 1 Mar 2023 14:08:23 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61893 Cc: 61893@debbugs.gnu.org, Theodor Thornhill , =?utf-8?Q?Daniel_Mart=C3=ADn?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Mar 1, 2023, at 10:26 AM, Eli Zaretskii wrote: >=20 >> From: Daniel Mart=C3=ADn >> Cc: Theodor Thornhill , 61893@debbugs.gnu.org, >> casouri@gmail.com >> Date: Wed, 01 Mar 2023 18:13:37 +0100 >>=20 >>>> Not sure, don't believe I've touched it last couple of days. I can = take a look this evening! >>>=20 >>> Thanks. It's always possible that it behaved like that back then, >>> although I'm almost sure it didn't. >>=20 >> A git bisect pointed to this commit, in case that helps: >=20 > Thanks. So I wasn't dreaming after all. Sorry about that. It should be fixed now. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 01:31:14 2023 Received: (at 61893) by debbugs.gnu.org; 2 Mar 2023 06:31:14 +0000 Received: from localhost ([127.0.0.1]:55586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXcTB-0000sJ-Ny for submit@debbugs.gnu.org; Thu, 02 Mar 2023 01:31:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXcT9-0000s4-99 for 61893@debbugs.gnu.org; Thu, 02 Mar 2023 01:31:11 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXcT2-0005Iz-OS; Thu, 02 Mar 2023 01:31:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=gydkOsVGccDzrTv9jpn/+JTZoabcVJDV1GDsJ3cmeI0=; b=ryK5L3bM2uYapjpcy9CG 6VeXcp+NVZS6o27S2CTOBI0fD2V1bqkDF8tnmJ2vZqYLfll4QhJ1Z9O4vE8ZvQPqPTgzbd/91YpWw NpBnXoY+laQrrf2PpQ5V3Gvk2p6u+WqO2wlyJJDKKYyF2xFOzFnB82iUyA9U0Qyor9mQeQgheoKwX 5GxGoCGpGf8KadPZhqAbYM5AZ+TaWg0XojYSQguQCZKG4hzBjW3wn3qNRzG0nF1Bgpe4+ARDCo/Qt FOvz5U9Mynsco/bqEBXL56wOST6daR2xc3Ra0WHTG6OKHF0LjUibxYFuvaOEXx987YEhcYeaBSyRx PLJvBguWoBKJYQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXcT2-0000rI-5J; Thu, 02 Mar 2023 01:31:04 -0500 Date: Thu, 02 Mar 2023 08:31:19 +0200 Message-Id: <83y1ofekaw.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> (message from Yuan Fu on Wed, 1 Mar 2023 14:08:23 -0800) Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61893 Cc: 61893@debbugs.gnu.org, theo@thornhill.no, mardani29@yahoo.es X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuan Fu > Date: Wed, 1 Mar 2023 14:08:23 -0800 > Cc: Daniel Martín , > Theodor Thornhill , > 61893@debbugs.gnu.org > > > Thanks. So I wasn't dreaming after all. > > Sorry about that. It should be fixed now. Thanks, it's much better now. I spotted the following problems, not sure if they are new or not: go to line 297 of dispnew.c, which is "#endif". Then type "C-e RET" -- point goes to column zero instead of the expected column 6. This affects the following 3 lines as well; only the next 'if' fixes the indentation. I see the same problem with every "#endif" line. Line 6584 of dispnew.c, which is this: #endif /* HAVE_WINDOW_SYSTEM */ exhibits a slightly different incorrect behavior: "C-e RET" on that line moves point to column 7, not column 6, presumably to align with the "/*" of the comment? Line 6608 of dispnew.c is just "#else"; typing "C-e RET" there unexpectedly goes to column 2 instead of 4. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 23:08:04 2023 Received: (at 61893) by debbugs.gnu.org; 3 Mar 2023 04:08:05 +0000 Received: from localhost ([127.0.0.1]:59376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXwiC-0005D3-GD for submit@debbugs.gnu.org; Thu, 02 Mar 2023 23:08:04 -0500 Received: from mail-pl1-f177.google.com ([209.85.214.177]:46065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXwiA-0005CX-Ge for 61893@debbugs.gnu.org; Thu, 02 Mar 2023 23:08:03 -0500 Received: by mail-pl1-f177.google.com with SMTP id z2so1427648plf.12 for <61893@debbugs.gnu.org>; Thu, 02 Mar 2023 20:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677816476; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Dt8hJ/EgXTrn+IdesAFFKIjbHn4kJcUVDwiHwPV3tgw=; b=jqtyjWz4RHSC7wHp7sKfVOKt4HWXdtxz7vtwUoFzAMPYwi/xv4JwAdkuDoEHSqYFNr HrvmWEUPTWoUR2HR+YEs0WooAUzUPbIYHtYHbWYXLijnZ5Q6eytgj88/cykG0H1W8MPO Iv8Po3k97nMfevi+jAZ3QHsjUpbMs1eY6/pKimHqFvSm8bg/FA0oM1WKvTMeL6SvMBRp u7ZwMbSpBO0L+aXgrMAs8IteC0Fj87Q1tMbr2w+C+oXTnmepBlJvP8f0p5bQuSMVj1st FFAVowEDB+O11/L5xynLQsnLgZIgfhpBOBj46DHxn/IdXO5Oq0BY+viJNeOoYEV1BESG k0+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677816476; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dt8hJ/EgXTrn+IdesAFFKIjbHn4kJcUVDwiHwPV3tgw=; b=NKgSIq5rawbPPGTfGIThyihkFzaunLr4EngOVqTqHb6dnA9E4FLvIaG+FnJWn5g/Y1 yVNN8bj/c+Nw8sRPLbj5ZQiurmR7LNf37AX8MaokacbAvQwhyU1m/oqv8IqKoE2oT0HW DR4s6Ub1wmgqBnSBiT4D+3KlS4F6R7hM5Hk7nvwXy8fHDJ9kZycd2xDY8wmAEohxxdfp ReDHLgjLxgEGiOfKSzCsP8GsAaRi0Fw2XQLqwLgIRAS3H4dJIjFpIU7HXRmB2T91eJpm wTvV2XkZnQHJBiRtdBFkxR/vV3oV1EpROrIVZIKW/aQ8tKrSu6zpWuXZYQFvf7AXO/z0 e8/A== X-Gm-Message-State: AO0yUKV+Pj+aFxJXpLnNbvwliJQai9jJLpEMLkO/JB+EopPUJtWF1PhB xKsoUdbn+ld2DeqB+x4FiZg= X-Google-Smtp-Source: AK7set8vEyuuXQ+1dXiAVOFSmZtqoapn1UxHkOUvvuRkxowyhzkWbV6LpGMotKCLizuD8rYFF8ThuA== X-Received: by 2002:a17:90b:1d07:b0:237:e1d2:c659 with SMTP id on7-20020a17090b1d0700b00237e1d2c659mr281108pjb.2.1677816476575; Thu, 02 Mar 2023 20:07:56 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id h9-20020a17090acf0900b00219752c8ea5sm478170pju.37.2023.03.02.20.07.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Mar 2023 20:07:56 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again From: Yuan Fu In-Reply-To: <83y1ofekaw.fsf@gnu.org> Date: Thu, 2 Mar 2023 20:07:44 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> <83y1ofekaw.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61893 Cc: 61893@debbugs.gnu.org, Theodor Thornhill , =?utf-8?Q?Daniel_Mart=C3=ADn?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Mar 1, 2023, at 10:31 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Wed, 1 Mar 2023 14:08:23 -0800 >> Cc: Daniel Mart=C3=ADn , >> Theodor Thornhill , >> 61893@debbugs.gnu.org >>=20 >>> Thanks. So I wasn't dreaming after all. >>=20 >> Sorry about that. It should be fixed now. >=20 > Thanks, it's much better now. >=20 > I spotted the following problems, not sure if they are new or not: go > to line 297 of dispnew.c, which is "#endif". Then type "C-e RET" -- > point goes to column zero instead of the expected column 6. This > affects the following 3 lines as well; only the next 'if' fixes the > indentation. I see the same problem with every "#endif" line. >=20 > Line 6584 of dispnew.c, which is this: >=20 > #endif /* HAVE_WINDOW_SYSTEM */ >=20 > exhibits a slightly different incorrect behavior: "C-e RET" on that > line moves point to column 7, not column 6, presumably to align with > the "/*" of the comment? >=20 > Line 6608 of dispnew.c is just "#else"; typing "C-e RET" there > unexpectedly goes to column 2 instead of 4. That=E2=80=99s indeed the =E2=80=9Calign to previous statement=E2=80=9D=E2= =80=99s fault, caused by preproc directives Theo was working on. I=E2=80=99= ve fixed it. Theo, while working on this, I found some problem with the = current indent for preproc directives. In the following example: static void free_glyph_pool (struct glyph_pool *pool) { if (pool) { #if defined GLYPH_DEBUG int c =3D 1; #endif int check_this =3D 3; #ifdef stuff int c =3D 1; #elif defined stuff int e =3D 5; #else int d =3D 11; #endif int check_this =3D 3; } } The elif directive=E2=80=99s and subsequent directives aren=E2=80=99t = indented properly. Looking at the parsed tree, the elif directives are = nested in the if directive, and the nesting can be arbitrarily deep. We = probably need a custom function rather than great-grand-parent to find = the anchor, like a function that keeps going up the tree until the node = isn=E2=80=99t a preproc directive anymore. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 03 01:08:06 2023 Received: (at 61893) by debbugs.gnu.org; 3 Mar 2023 06:08:06 +0000 Received: from localhost ([127.0.0.1]:59448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXyaL-0008LC-Ts for submit@debbugs.gnu.org; Fri, 03 Mar 2023 01:08:06 -0500 Received: from out-1.mta1.migadu.com ([95.215.58.1]:52607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXyaJ-0008L2-DC for 61893@debbugs.gnu.org; Fri, 03 Mar 2023 01:08:04 -0500 Date: Fri, 03 Mar 2023 07:07:59 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1677823681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g/CH50lZQtvLu1rEnj9Gq7gbc6iex+O4I4D4H+ROtMQ=; b=CWlMTBWS3jIicJ6ZJmP5goN/GPqqMWCQKYw5/8NJUlE1j+X0fdjZEyVeI3k/QCZVLwwgON uFHEdcql9GbbsrJFgzR4onX2Bodhv+E5F40fAxgmjz5Ws+jTh7M4DEtSdnbFEZH2NAtpxg jEx/p9W/ORfqqDIBC+Cxl+zkbFk+QAQmyaPuU6h5mSTVKkkVlrlfsP9VA6kHZvsd7eE/D3 FHiAQvHBusvCw6sO4z900BbaNRhBpTJHF4xUXMZkbmfq54x8Z1RZuTRJpHTjc+yECOhXSY zw0ZcGpdBLUO3lCwWhtujF3CT05he6Z55lF+5P8P2hHsdBI0JuO8ER9kY+dLow== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Theodor Thornhill To: Yuan Fu , Eli Zaretskii Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again In-Reply-To: References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> <83y1ofekaw.fsf@gnu.org> Message-ID: <3B2BAD9F-84AB-4243-AC98-95C52BA492E3@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61893 Cc: 61893@debbugs.gnu.org, =?ISO-8859-1?Q?Daniel_Mart=EDn?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 3 March 2023 05:07:44 CET, Yuan Fu wrote: > > >> On Mar 1, 2023, at 10:31 PM, Eli Zaretskii wrote: >>=20 >>> From: Yuan Fu >>> Date: Wed, 1 Mar 2023 14:08:23 -0800 >>> Cc: Daniel Mart=C3=ADn , >>> Theodor Thornhill , >>> 61893@debbugs=2Egnu=2Eorg >>>=20 >>>> Thanks=2E So I wasn't dreaming after all=2E >>>=20 >>> Sorry about that=2E It should be fixed now=2E >>=20 >> Thanks, it's much better now=2E >>=20 >> I spotted the following problems, not sure if they are new or not: go >> to line 297 of dispnew=2Ec, which is "#endif"=2E Then type "C-e RET" -= - >> point goes to column zero instead of the expected column 6=2E This >> affects the following 3 lines as well; only the next 'if' fixes the >> indentation=2E I see the same problem with every "#endif" line=2E >>=20 >> Line 6584 of dispnew=2Ec, which is this: >>=20 >> #endif /* HAVE_WINDOW_SYSTEM */ >>=20 >> exhibits a slightly different incorrect behavior: "C-e RET" on that >> line moves point to column 7, not column 6, presumably to align with >> the "/*" of the comment? >>=20 >> Line 6608 of dispnew=2Ec is just "#else"; typing "C-e RET" there >> unexpectedly goes to column 2 instead of 4=2E > >That=E2=80=99s indeed the =E2=80=9Calign to previous statement=E2=80=9D= =E2=80=99s fault, caused by preproc directives Theo was working on=2E I=E2= =80=99ve fixed it=2E Theo, while working on this, I found some problem with= the current indent for preproc directives=2E In the following example: > >static void >free_glyph_pool (struct glyph_pool *pool) >{ > if (pool) > { >#if defined GLYPH_DEBUG > int c =3D 1; >#endif > int check_this =3D 3; >#ifdef stuff > int c =3D 1; >#elif defined stuff > int e =3D 5; >#else > int d =3D 11; >#endif > int check_this =3D 3; > } >} > >The elif directive=E2=80=99s and subsequent directives aren=E2=80=99t ind= ented properly=2E Looking at the parsed tree, the elif directives are neste= d in the if directive, and the nesting can be arbitrarily deep=2E We probab= ly need a custom function rather than great-grand-parent to find the anchor= , like a function that keeps going up the tree until the node isn=E2=80=99t= a preproc directive anymore=2E > >Yuan Yeah, you're right=2E I'll see what I can do, but bandwidth is a little lo= w at the moment, so if you have some extra time, don't hesitate to improve = it :) Theo From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 03 17:01:59 2023 Received: (at 61893) by debbugs.gnu.org; 3 Mar 2023 22:01:59 +0000 Received: from localhost ([127.0.0.1]:34092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYDTS-0007k9-Sl for submit@debbugs.gnu.org; Fri, 03 Mar 2023 17:01:59 -0500 Received: from mail-pl1-f174.google.com ([209.85.214.174]:39797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYDTR-0007jv-7v for 61893@debbugs.gnu.org; Fri, 03 Mar 2023 17:01:57 -0500 Received: by mail-pl1-f174.google.com with SMTP id i3so4232798plg.6 for <61893@debbugs.gnu.org>; Fri, 03 Mar 2023 14:01:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677880911; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YsTI38z01Yo+54ReYSgDcDqCLTFvP4i1W+cudvRjesc=; b=QlouELE94YATov+iYqyl74Rc0/4+cq6DE7SkeBpHDQ1P7RAK7pXe57qz+GSSAQn1IK 4rE+WaDvexIWo/9pLyX5xvKdt3MV5fOPBtijcqorKMQRQbDSyR30u7A5NQL0eZiyb243 rQxD7nncD9WHjpxBHCdudW/fydQZPqceTIB0Cfqg09rQu7OiDtEXflAwPfLe+IXmVn5P VOa/Uvfc5tYuykGfIGA5Ww42sUqNJjITDfwyPyEf4O8jDUXfWten7Lc6YfHGyRhNrnu6 MPy2UUOscX3LmAvRQVDSj/AqSsEmh1eBoWzuJcQLxzm4gGmoLLQtsL205ne6aaHAODyo 2mRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677880911; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YsTI38z01Yo+54ReYSgDcDqCLTFvP4i1W+cudvRjesc=; b=IIqubZuELOBUwj8L0JgwVKU7b6fYl97QwBPkZYTZQeuHbRkk3Nh7tuIUVGMDrHum4k uw63KMMkRjFeuNLF/h6tUWd1b3ktOMPJ2TxAZo4sZbpegowHTw7ACyt68MvMVfKXJzEX 9sQoUOqNDHZTHxdCNXWVUBGo80uqL+b76nuDGTo1DFyqCOBmAtCpFlErqlSlK3NrJTyP CXcImlShfYugGztp5nkBSLx/uA/liNUuroB1n8YkAZkbNVNVUnddr2BhPd9ACYjk5Sno JzzQ92EfRe9q2PFr0FNnIRTpS7oIDYylPTBl34c/BaMReyQUykSJMF0ub7XHio6OFuAZ qOsQ== X-Gm-Message-State: AO0yUKXNLEo2QD/bZDOAPgfO96dzlhBqVs1YeFT6WGZtoHwUtqEV9xl4 IyniUZgRgxDPGiaYtI33wGQ= X-Google-Smtp-Source: AK7set+9w4cPi8qZK5YhpoVAZLAXkZBoUPH83HgcDVOpmVb3NzqwVKYURCxdZU2wBmMh8ukkc0yuLQ== X-Received: by 2002:a17:90a:359:b0:233:fdfd:7122 with SMTP id 25-20020a17090a035900b00233fdfd7122mr3165825pjf.37.1677880911065; Fri, 03 Mar 2023 14:01:51 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id y20-20020a17090abd1400b00234e6d2de3dsm1955390pjr.11.2023.03.03.14.01.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Mar 2023 14:01:50 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again From: Yuan Fu In-Reply-To: <3B2BAD9F-84AB-4243-AC98-95C52BA492E3@thornhill.no> Date: Fri, 3 Mar 2023 14:01:39 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <0476A0F0-75E4-45EF-9B18-ECC5E87851C1@gmail.com> References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> <83y1ofekaw.fsf@gnu.org> <3B2BAD9F-84AB-4243-AC98-95C52BA492E3@thornhill.no> To: Theodor Thornhill X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61893 Cc: Eli Zaretskii , 61893@debbugs.gnu.org, =?utf-8?Q?Daniel_Mart=C3=ADn?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Mar 2, 2023, at 10:07 PM, Theodor Thornhill = wrote: >=20 >=20 >=20 > On 3 March 2023 05:07:44 CET, Yuan Fu wrote: >>=20 >>=20 >>> On Mar 1, 2023, at 10:31 PM, Eli Zaretskii wrote: >>>=20 >>>> From: Yuan Fu >>>> Date: Wed, 1 Mar 2023 14:08:23 -0800 >>>> Cc: Daniel Mart=C3=ADn , >>>> Theodor Thornhill , >>>> 61893@debbugs.gnu.org >>>>=20 >>>>> Thanks. So I wasn't dreaming after all. >>>>=20 >>>> Sorry about that. It should be fixed now. >>>=20 >>> Thanks, it's much better now. >>>=20 >>> I spotted the following problems, not sure if they are new or not: = go >>> to line 297 of dispnew.c, which is "#endif". Then type "C-e RET" -- >>> point goes to column zero instead of the expected column 6. This >>> affects the following 3 lines as well; only the next 'if' fixes the >>> indentation. I see the same problem with every "#endif" line. >>>=20 >>> Line 6584 of dispnew.c, which is this: >>>=20 >>> #endif /* HAVE_WINDOW_SYSTEM */ >>>=20 >>> exhibits a slightly different incorrect behavior: "C-e RET" on that >>> line moves point to column 7, not column 6, presumably to align with >>> the "/*" of the comment? >>>=20 >>> Line 6608 of dispnew.c is just "#else"; typing "C-e RET" there >>> unexpectedly goes to column 2 instead of 4. >>=20 >> That=E2=80=99s indeed the =E2=80=9Calign to previous statement=E2=80=9D= =E2=80=99s fault, caused by preproc directives Theo was working on. = I=E2=80=99ve fixed it. Theo, while working on this, I found some problem = with the current indent for preproc directives. In the following = example: >>=20 >> static void >> free_glyph_pool (struct glyph_pool *pool) >> { >> if (pool) >> { >> #if defined GLYPH_DEBUG >> int c =3D 1; >> #endif >> int check_this =3D 3; >> #ifdef stuff >> int c =3D 1; >> #elif defined stuff >> int e =3D 5; >> #else >> int d =3D 11; >> #endif >> int check_this =3D 3; >> } >> } >>=20 >> The elif directive=E2=80=99s and subsequent directives aren=E2=80=99t = indented properly. Looking at the parsed tree, the elif directives are = nested in the if directive, and the nesting can be arbitrarily deep. We = probably need a custom function rather than great-grand-parent to find = the anchor, like a function that keeps going up the tree until the node = isn=E2=80=99t a preproc directive anymore. >>=20 >> Yuan >=20 > Yeah, you're right. I'll see what I can do, but bandwidth is a little = low at the moment, so if you have some extra time, don't hesitate to = improve it :) Absolutely, I=E2=80=99ll work on it.=20 Yuan= From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 04 03:54:36 2023 Received: (at 61893) by debbugs.gnu.org; 4 Mar 2023 08:54:36 +0000 Received: from localhost ([127.0.0.1]:35230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYNf1-0002WX-Lu for submit@debbugs.gnu.org; Sat, 04 Mar 2023 03:54:36 -0500 Received: from out-7.mta0.migadu.com ([91.218.175.7]:10342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYNez-0002WM-J6 for 61893@debbugs.gnu.org; Sat, 04 Mar 2023 03:54:34 -0500 Date: Sat, 04 Mar 2023 09:54:29 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1677920071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mLV55bjDrM61nJxal8tt7hJvA+vrQZ72Nfoofh9X+LI=; b=0yC5RuZh8xsQ/6FDF9Oz85UMWwiKYMeID+8XMAnuh1urxQnoucSbGQaF0MUqA5r+l9ynpR kuwO2CqVVu4AZ1/MFzPxoyZn+LdVX+enN7RkehrL7btSJarP0R3x4f9Qjd7g4IQ/XS1yfZ bHyIUgsnxBKoIlpG45PDvB+jDOzqrnvmzAzxcsvr+KlPcycKNxEeM7uRKelZdar5RTm0N8 q85KfNr2qJnSgjKO3yscrmzuYp44yIp6xIXyFcfq6Ivxu5bHqhdIaHNCljfQoxp89q/M9J PtEUWaGBSMPAf+nX4sapOFmIVgz1pY1AqtlecU5Fu3l5IfD9rsD3ibyU4JalUg== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Theodor Thornhill To: Yuan Fu Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again In-Reply-To: <0476A0F0-75E4-45EF-9B18-ECC5E87851C1@gmail.com> References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> <83y1ofekaw.fsf@gnu.org> <3B2BAD9F-84AB-4243-AC98-95C52BA492E3@thornhill.no> <0476A0F0-75E4-45EF-9B18-ECC5E87851C1@gmail.com> Message-ID: <5F5AF93A-E0A8-47BF-97DB-1AAA9A025FA4@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61893 Cc: Eli Zaretskii , 61893@debbugs.gnu.org, =?ISO-8859-1?Q?Daniel_Mart=EDn?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 3 March 2023 23:01:39 CET, Yuan Fu wrote: > > >> On Mar 2, 2023, at 10:07 PM, Theodor Thornhill wr= ote: >>=20 >>=20 >>=20 >> On 3 March 2023 05:07:44 CET, Yuan Fu wrote: >>>=20 >>>=20 >>>> On Mar 1, 2023, at 10:31 PM, Eli Zaretskii wrote: >>>>=20 >>>>> From: Yuan Fu >>>>> Date: Wed, 1 Mar 2023 14:08:23 -0800 >>>>> Cc: Daniel Mart=C3=ADn , >>>>> Theodor Thornhill , >>>>> 61893@debbugs=2Egnu=2Eorg >>>>>=20 >>>>>> Thanks=2E So I wasn't dreaming after all=2E >>>>>=20 >>>>> Sorry about that=2E It should be fixed now=2E >>>>=20 >>>> Thanks, it's much better now=2E >>>>=20 >>>> I spotted the following problems, not sure if they are new or not: go >>>> to line 297 of dispnew=2Ec, which is "#endif"=2E Then type "C-e RET"= -- >>>> point goes to column zero instead of the expected column 6=2E This >>>> affects the following 3 lines as well; only the next 'if' fixes the >>>> indentation=2E I see the same problem with every "#endif" line=2E >>>>=20 >>>> Line 6584 of dispnew=2Ec, which is this: >>>>=20 >>>> #endif /* HAVE_WINDOW_SYSTEM */ >>>>=20 >>>> exhibits a slightly different incorrect behavior: "C-e RET" on that >>>> line moves point to column 7, not column 6, presumably to align with >>>> the "/*" of the comment? >>>>=20 >>>> Line 6608 of dispnew=2Ec is just "#else"; typing "C-e RET" there >>>> unexpectedly goes to column 2 instead of 4=2E >>>=20 >>> That=E2=80=99s indeed the =E2=80=9Calign to previous statement=E2=80= =9D=E2=80=99s fault, caused by preproc directives Theo was working on=2E I= =E2=80=99ve fixed it=2E Theo, while working on this, I found some problem w= ith the current indent for preproc directives=2E In the following example: >>>=20 >>> static void >>> free_glyph_pool (struct glyph_pool *pool) >>> { >>> if (pool) >>> { >>> #if defined GLYPH_DEBUG >>> int c =3D 1; >>> #endif >>> int check_this =3D 3; >>> #ifdef stuff >>> int c =3D 1; >>> #elif defined stuff >>> int e =3D 5; >>> #else >>> int d =3D 11; >>> #endif >>> int check_this =3D 3; >>> } >>> } >>>=20 >>> The elif directive=E2=80=99s and subsequent directives aren=E2=80=99t = indented properly=2E Looking at the parsed tree, the elif directives are ne= sted in the if directive, and the nesting can be arbitrarily deep=2E We pro= bably need a custom function rather than great-grand-parent to find the anc= hor, like a function that keeps going up the tree until the node isn=E2=80= =99t a preproc directive anymore=2E >>>=20 >>> Yuan >>=20 >> Yeah, you're right=2E I'll see what I can do, but bandwidth is a little= low at the moment, so if you have some extra time, don't hesitate to impro= ve it :) > >Absolutely, I=E2=80=99ll work on it=2E=20 > >Yuan Thanks :) From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 04 18:04:08 2023 Received: (at 61893) by debbugs.gnu.org; 4 Mar 2023 23:04:08 +0000 Received: from localhost ([127.0.0.1]:38019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYav9-0008HA-VY for submit@debbugs.gnu.org; Sat, 04 Mar 2023 18:04:08 -0500 Received: from mail-pj1-f44.google.com ([209.85.216.44]:39761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYav7-0008Fr-7L for 61893@debbugs.gnu.org; Sat, 04 Mar 2023 18:04:05 -0500 Received: by mail-pj1-f44.google.com with SMTP id 6-20020a17090a190600b00237c5b6ecd7so9622965pjg.4 for <61893@debbugs.gnu.org>; Sat, 04 Mar 2023 15:04:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677971039; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UP8zKRXnAO4fLdzdswNxtUyT6Bs3V+q1dr7ACmOSkko=; b=gyV3L/3cpCPjaHuzFXzmXwtslh221dYtft50RlCoMA6F3h07JAUilnBniOsAxmqGoa 93eksFh1CYmgN8UU6ojORAlmMCeFgIKYql0nBcNUyTTP532lHM0lX/jEtacxHVGyqKEm LsXuujXtsi1tgO5emy0KoRxDHvEbgbFOQadxVMbTRKYpwk9SW2DijqwRrRnlf1VXxDC6 DVKP3dJK9snsMSJ2TPIV6aYoAaGWBWENRFiySmdAcxevTPZrLSvzFa43GcEIIEP1KGPd onDxnt6zLrE/sAsY2OLgajJoFSEppexT+j831ct22o0/8pgsmwbBDByi+hxF+zrzH2DZ R88A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677971039; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UP8zKRXnAO4fLdzdswNxtUyT6Bs3V+q1dr7ACmOSkko=; b=uCBZTPeOkUXhl3XNuQ6j7WR8QJYTAun7GoLkkyEBYmX9Is5RkL1L7CH7lAYRipPkqg m15PJ4ylGX8QjPPBRLUbxnQPiMWnYUA2YlqsXFsASNVAC9cBM5/l5srozRj3CGHufX3j UnjlH6wJGWkTfNoY03oGbinZTT+X0LCB69yLjpMYwFBw31sZXdOac1UsHgr+pcPH2J4z aGScP9Pj5NmWP4etDEfBUTjPQKtNIvaQUB4V4eEN6iLWB3oqUyeGWVFTb5UUtW27eTVe JvGLWeKzTaH1iYEwXiQBeMi1S9yb3p6suGY8Ci8Fqk8nZWSOD9s2NfvWtHJmG5eIHZjN RmJw== X-Gm-Message-State: AO0yUKVk49yTrLJiD2JXNBVoMoCnR4zoQGTLazvf53GaWWr5gBYwUzkn XDfoxiJJradovgMAMJxaQtI= X-Google-Smtp-Source: AK7set+SqyCcwF924+71crpRQWRzP73hWLFp5ZOYo19Mblvk8QI2rPHukZV+N0SJZ8rkHT4vt3gfEg== X-Received: by 2002:a17:902:9b8a:b0:19a:acc2:73e4 with SMTP id y10-20020a1709029b8a00b0019aacc273e4mr5824391plp.22.1677971039496; Sat, 04 Mar 2023 15:03:59 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id b2-20020a170903228200b001994a0f3380sm3772177plh.265.2023.03.04.15.03.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Mar 2023 15:03:59 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again From: Yuan Fu In-Reply-To: <5F5AF93A-E0A8-47BF-97DB-1AAA9A025FA4@thornhill.no> Date: Sat, 4 Mar 2023 15:03:46 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <3A152DB8-DA88-4E40-A536-4514E2C3501A@gmail.com> References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> <83y1ofekaw.fsf@gnu.org> <3B2BAD9F-84AB-4243-AC98-95C52BA492E3@thornhill.no> <0476A0F0-75E4-45EF-9B18-ECC5E87851C1@gmail.com> <5F5AF93A-E0A8-47BF-97DB-1AAA9A025FA4@thornhill.no> To: Theodor Thornhill X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61893 Cc: Eli Zaretskii , 61893@debbugs.gnu.org, =?utf-8?Q?Daniel_Mart=C3=ADn?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Mar 4, 2023, at 12:54 AM, Theodor Thornhill = wrote: >=20 >=20 >=20 > On 3 March 2023 23:01:39 CET, Yuan Fu wrote: >>=20 >>=20 >>> On Mar 2, 2023, at 10:07 PM, Theodor Thornhill = wrote: >>>=20 >>>=20 >>>=20 >>> On 3 March 2023 05:07:44 CET, Yuan Fu wrote: >>>>=20 >>>>=20 >>>>> On Mar 1, 2023, at 10:31 PM, Eli Zaretskii wrote: >>>>>=20 >>>>>> From: Yuan Fu >>>>>> Date: Wed, 1 Mar 2023 14:08:23 -0800 >>>>>> Cc: Daniel Mart=C3=ADn , >>>>>> Theodor Thornhill , >>>>>> 61893@debbugs.gnu.org >>>>>>=20 >>>>>>> Thanks. So I wasn't dreaming after all. >>>>>>=20 >>>>>> Sorry about that. It should be fixed now. >>>>>=20 >>>>> Thanks, it's much better now. >>>>>=20 >>>>> I spotted the following problems, not sure if they are new or not: = go >>>>> to line 297 of dispnew.c, which is "#endif". Then type "C-e RET" = -- >>>>> point goes to column zero instead of the expected column 6. This >>>>> affects the following 3 lines as well; only the next 'if' fixes = the >>>>> indentation. I see the same problem with every "#endif" line. >>>>>=20 >>>>> Line 6584 of dispnew.c, which is this: >>>>>=20 >>>>> #endif /* HAVE_WINDOW_SYSTEM */ >>>>>=20 >>>>> exhibits a slightly different incorrect behavior: "C-e RET" on = that >>>>> line moves point to column 7, not column 6, presumably to align = with >>>>> the "/*" of the comment? >>>>>=20 >>>>> Line 6608 of dispnew.c is just "#else"; typing "C-e RET" there >>>>> unexpectedly goes to column 2 instead of 4. >>>>=20 >>>> That=E2=80=99s indeed the =E2=80=9Calign to previous = statement=E2=80=9D=E2=80=99s fault, caused by preproc directives Theo = was working on. I=E2=80=99ve fixed it. Theo, while working on this, I = found some problem with the current indent for preproc directives. In = the following example: >>>>=20 >>>> static void >>>> free_glyph_pool (struct glyph_pool *pool) >>>> { >>>> if (pool) >>>> { >>>> #if defined GLYPH_DEBUG >>>> int c =3D 1; >>>> #endif >>>> int check_this =3D 3; >>>> #ifdef stuff >>>> int c =3D 1; >>>> #elif defined stuff >>>> int e =3D 5; >>>> #else >>>> int d =3D 11; >>>> #endif >>>> int check_this =3D 3; >>>> } >>>> } >>>>=20 >>>> The elif directive=E2=80=99s and subsequent directives aren=E2=80=99t= indented properly. Looking at the parsed tree, the elif directives are = nested in the if directive, and the nesting can be arbitrarily deep. We = probably need a custom function rather than great-grand-parent to find = the anchor, like a function that keeps going up the tree until the node = isn=E2=80=99t a preproc directive anymore. >>>>=20 >>>> Yuan >>>=20 >>> Yeah, you're right. I'll see what I can do, but bandwidth is a = little low at the moment, so if you have some extra time, don't hesitate = to improve it :) >>=20 >> Absolutely, I=E2=80=99ll work on it.=20 >>=20 >> Yuan >=20 > Thanks :) Done! From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 03:23:15 2023 Received: (at 61893) by debbugs.gnu.org; 5 Mar 2023 08:23:15 +0000 Received: from localhost ([127.0.0.1]:38376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYjeF-0006pi-DC for submit@debbugs.gnu.org; Sun, 05 Mar 2023 03:23:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYjeD-0006p2-Ia for 61893@debbugs.gnu.org; Sun, 05 Mar 2023 03:23:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYje7-0004kS-SH; Sun, 05 Mar 2023 03:23:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=2y3bX2wa9GIo0xBhuOjyUbrYI9MISq6NJ/jh/jtSaO4=; b=SR1ZlUyHmkTr98IGYddk pjc4TnKW13Uw6zXCgJWX1A/69XrxCfKlIvCcwYIkISLxFknoEoh7lgZz5777hRUVGAIzzqqzZU37C UHksbBTyRY2JexjkK8mGnZeSFhohHQCrRt9oaO8A8Ifgd2B5fZDkdm1W/Z52WoK9M51I7K4Nkuxof Tdh7V42Max59R10BiSmJ0tKiaWdNosdWKofulUh109jFHua5Wgz5X6kk57q9xpTT8Np5sppSagBzD 5jws+U7jGDSVJ45UClCrJkL5spCfLMcTe8jUA7iHc03xY7iOEHH+4xMgty6d6Kqf3Xtqc6zmtxqfw 84CNBrf7PLqfeg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYje7-0004ON-6T; Sun, 05 Mar 2023 03:23:07 -0500 Date: Sun, 05 Mar 2023 10:22:56 +0200 Message-Id: <83ttyz8v4v.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <3A152DB8-DA88-4E40-A536-4514E2C3501A@gmail.com> (message from Yuan Fu on Sat, 4 Mar 2023 15:03:46 -0800) Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> <83y1ofekaw.fsf@gnu.org> <3B2BAD9F-84AB-4243-AC98-95C52BA492E3@thornhill.no> <0476A0F0-75E4-45EF-9B18-ECC5E87851C1@gmail.com> <5F5AF93A-E0A8-47BF-97DB-1AAA9A025FA4@thornhill.no> <3A152DB8-DA88-4E40-A536-4514E2C3501A@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61893 Cc: 61893@debbugs.gnu.org, theo@thornhill.no, mardani29@yahoo.es X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuan Fu > Date: Sat, 4 Mar 2023 15:03:46 -0800 > Cc: Eli Zaretskii , > Daniel Martín , > 61893@debbugs.gnu.org > > >>>> The elif directive’s and subsequent directives aren’t indented properly. Looking at the parsed tree, the elif directives are nested in the if directive, and the nesting can be arbitrarily deep. We probably need a custom function rather than great-grand-parent to find the anchor, like a function that keeps going up the tree until the node isn’t a preproc directive anymore. > >>>> > >>>> Yuan > >>> > >>> Yeah, you're right. I'll see what I can do, but bandwidth is a little low at the moment, so if you have some extra time, don't hesitate to improve it :) > >> > >> Absolutely, I’ll work on it. > >> > >> Yuan > > > > Thanks :) > > Done! Thanks. Some problems still remain. Line 1761 of dispnew.c: type "C-e RET" -- point goes to column 7 instead of the expected column 2. Line 3381 of dispnew.c: type "C-e RET" -- point goes to the correct column, but line 3381 is reindented incorrectly. Line 6611 of dispnew.e: type "C-e RET" -- point goes to column 0 instead of the expected column 2. If you type "C-e RET" on the next line 6612, point goes to column 0 and the line is reindented incorrectly. Line 13925 of xdisp.c: type "C-e RET" -- point goes to column 33(!) and line 13925 is reindented incorrectly. Lines 34529 and 34530 of xdisp.c: "C-e RET" produces incorrect column of point and reindents line 34530. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 18:27:06 2023 Received: (at 61893) by debbugs.gnu.org; 5 Mar 2023 23:27:06 +0000 Received: from localhost ([127.0.0.1]:40942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYxkv-0006Zt-Pr for submit@debbugs.gnu.org; Sun, 05 Mar 2023 18:27:06 -0500 Received: from mail-pj1-f52.google.com ([209.85.216.52]:37719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYxkt-0006ZO-9k for 61893@debbugs.gnu.org; Sun, 05 Mar 2023 18:27:03 -0500 Received: by mail-pj1-f52.google.com with SMTP id me6-20020a17090b17c600b0023816b0c7ceso11476852pjb.2 for <61893@debbugs.gnu.org>; Sun, 05 Mar 2023 15:27:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678058817; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZODUCu3a2dvN4mx+YuPYJJfItOfaJxGxy7kCQUlwk7U=; b=Ac5705MxOufC91NaqGPtsqWq2iEjJMDEdZF7pPXPPUtn+9jrrBL1PtjS+0OzabFazQ DxlS+wAnDbhjOJVJ/6Hmrte/YFYcDne3NzyX/N/kjVgMYLlL8ZjqT+WJ8cq4LhzKrW1p bkMzZU9asnOTAfVTQpn7WyWa3TY4lAQxxajE1oscSpP0+TjlQZ+z0F/8OQ5Qgz4FdIQh dJfhOU3K0OB9ZSSWwSRUFj9pQQ5beeRQA13TzT7ziTdM47c6R/T5QrhxaOQut77tZbaJ fzWhVPb+TBFdci0bdydyKCH+xieR/QsKMhiwXcpUKuEwe4DvL9+qkxT4SzDlumebzxRQ V2Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678058817; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZODUCu3a2dvN4mx+YuPYJJfItOfaJxGxy7kCQUlwk7U=; b=jDNKAyB8uAFNPk0uRdZV2ZP9v3u9fG4yugsK+7g1ASmcrAF8/8dbzBOtvjTFW9OcSx j+4iuji9TwVCovDX23fzYHHhoRNNGH+Sq2eOln74ShGLPh17sBVu4me177sBd4cfs+Ef YZTcWTTE5SIReoHMrUeOvajZOGDywqFg377HpMt/rbcQe7UluISRUnYUsf6u3pzAZ/7j MQG5PMUWFTyxstQsf2nMIJ6Y7bRzBh/tSt/lRvLWohuNcJbg+QP9Z/NMYIW/fLQhb9l6 QWrO0UF0iX86uCvVaHijUabZPN+bq+JOhu/5gF+aXldK5ebmRcdOI/sDQt262i29P+ul mCow== X-Gm-Message-State: AO0yUKVaLC1NT0SzaFkiOxVNa+7gn/crKHzpLHu/Ul92TsVPga5fXtSA laUBfJrBl0XTNKBZedff/3s= X-Google-Smtp-Source: AK7set/pynEMwPUyH9WLXApoSj5Q1kxBnhqWtyGRzaPv5c/ZB7jW7feweM86ZFrRIQ/T/jRR41n4Iw== X-Received: by 2002:a17:902:e882:b0:19d:1720:3873 with SMTP id w2-20020a170902e88200b0019d17203873mr12380578plg.57.1678058817145; Sun, 05 Mar 2023 15:26:57 -0800 (PST) Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id c10-20020a170902aa4a00b0019e8915b1b5sm5231192plr.105.2023.03.05.15.26.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Mar 2023 15:26:56 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again From: Yuan Fu In-Reply-To: <83ttyz8v4v.fsf@gnu.org> Date: Sun, 5 Mar 2023 15:26:45 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <7CDB5C99-AC13-463A-9B59-B6BB5011E683@gmail.com> References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> <83y1ofekaw.fsf@gnu.org> <3B2BAD9F-84AB-4243-AC98-95C52BA492E3@thornhill.no> <0476A0F0-75E4-45EF-9B18-ECC5E87851C1@gmail.com> <5F5AF93A-E0A8-47BF-97DB-1AAA9A025FA4@thornhill.no> <3A152DB8-DA88-4E40-A536-4514E2C3501A@gmail.com> <83ttyz8v4v.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61893 Cc: 61893@debbugs.gnu.org, Theodor Thornhill , =?utf-8?Q?Daniel_Mart=C3=ADn?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Mar 5, 2023, at 12:22 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Sat, 4 Mar 2023 15:03:46 -0800 >> Cc: Eli Zaretskii , >> Daniel Mart=C3=ADn , >> 61893@debbugs.gnu.org >>=20 >>>>>> The elif directive=E2=80=99s and subsequent directives aren=E2=80=99= t indented properly. Looking at the parsed tree, the elif directives are = nested in the if directive, and the nesting can be arbitrarily deep. We = probably need a custom function rather than great-grand-parent to find = the anchor, like a function that keeps going up the tree until the node = isn=E2=80=99t a preproc directive anymore. >>>>>>=20 >>>>>> Yuan >>>>>=20 >>>>> Yeah, you're right. I'll see what I can do, but bandwidth is a = little low at the moment, so if you have some extra time, don't hesitate = to improve it :) >>>>=20 >>>> Absolutely, I=E2=80=99ll work on it.=20 >>>>=20 >>>> Yuan >>>=20 >>> Thanks :) >>=20 >> Done! >=20 > Thanks. >=20 > Some problems still remain. Thanks, there are so many edge cases :-) >=20 > Line 1761 of dispnew.c: type "C-e RET" -- point goes to column 7 > instead of the expected column 2. Fixed. >=20 > Line 3381 of dispnew.c: type "C-e RET" -- point goes to the correct > column, but line 3381 is reindented incorrectly. This is due to it aligning to the previous sibling, aka the comment. Do = we want to skip comments for the =E2=80=9Calign to the prev sibling=E2=80=9D= rule? >=20 > Line 6611 of dispnew.e: type "C-e RET" -- point goes to column 0 > instead of the expected column 2. If you type "C-e RET" on the next > line 6612, point goes to column 0 and the line is reindented > incorrectly. Fixed. >=20 > Line 13925 of xdisp.c: type "C-e RET" -- point goes to column 33(!) > and line 13925 is reindented incorrectly. Fixed. >=20 > Lines 34529 and 34530 of xdisp.c: "C-e RET" produces incorrect column > of point and reindents line 34530. The preproc directive messed the parse tree, and tree-sitter can=E2=80=99t= tell that it=E2=80=99s an else statement, so it can=E2=80=99t be easily = fixed sadly. Yuan From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 06 01:03:39 2023 Received: (at 61893) by debbugs.gnu.org; 6 Mar 2023 06:03:39 +0000 Received: from localhost ([127.0.0.1]:41156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZ3wg-0008UK-Ka for submit@debbugs.gnu.org; Mon, 06 Mar 2023 01:03:39 -0500 Received: from out-25.mta0.migadu.com ([91.218.175.25]:52040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZ3we-0008UC-QU for 61893@debbugs.gnu.org; Mon, 06 Mar 2023 01:03:37 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1678082614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DGVG4maPIjxWRuvOzTCpdV3yox9FKyA/g/bt8y3AJzo=; b=o+yTPAD7lD7uvSsJQz+ldj0wNHoYWDLRDV5lDWRCwqphVkhp1nu/52l+61w1X4Qbt7uI9k m4i3/RAjuU/3OtXlYU6+8GPe7VYQj1NGdzpNDMlSFnvL5JtxMu3u9BVcGP31n0RZAASXM0 cDI4RA6Cg3gH99ePsQ+Cpbx+9N3TctgDWSc0+/eBKTxV9j335lbFkSwli605kJ2Z6q2Cfd d8SqGQzbRVHz/hgifAmng2HAr/HcLMae+st3GHJU9/Z9owMWmADWNhedJCK46d755fKQb2 YV3fVTsxjq0KpaKGezOHxUJg1vdeOORwx2NyrLykS6G0GUGBkqzkF4tv6nUcNw== From: Theodor Thornhill To: Yuan Fu Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again In-Reply-To: <7CDB5C99-AC13-463A-9B59-B6BB5011E683@gmail.com> (Yuan Fu's message of "Sun, 5 Mar 2023 15:26:45 -0800") References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> <83y1ofekaw.fsf@gnu.org> <3B2BAD9F-84AB-4243-AC98-95C52BA492E3@thornhill.no> <0476A0F0-75E4-45EF-9B18-ECC5E87851C1@gmail.com> <5F5AF93A-E0A8-47BF-97DB-1AAA9A025FA4@thornhill.no> <3A152DB8-DA88-4E40-A536-4514E2C3501A@gmail.com> <83ttyz8v4v.fsf@gnu.org> <7CDB5C99-AC13-463A-9B59-B6BB5011E683@gmail.com> Date: Mon, 06 Mar 2023 07:03:33 +0100 Message-ID: <877cvuo1qi.fsf@thornhill.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61893 Cc: Eli Zaretskii , 61893@debbugs.gnu.org, Daniel =?utf-8?Q?Mart=C3=ADn?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Yuan Fu writes: >> On Mar 5, 2023, at 12:22 AM, Eli Zaretskii wrote: >>=20 >>> From: Yuan Fu >>> Date: Sat, 4 Mar 2023 15:03:46 -0800 >>> Cc: Eli Zaretskii , >>> Daniel Mart=C3=ADn , >>> 61893@debbugs.gnu.org >>>=20 >>>>>>> The elif directive=E2=80=99s and subsequent directives aren=E2=80= =99t indented >>>>>>> properly. Looking at the parsed tree, the elif directives are neste= d in >>>>>>> the if directive, and the nesting can be arbitrarily deep. We proba= bly >>>>>>> need a custom function rather than great-grand-parent to find the a= nchor, >>>>>>> like a function that keeps going up the tree until the node isn=E2= =80=99t a >>>>>>> preproc directive anymore. >>>>>>>=20 >>>>>>> Yuan >>>>>>=20 >>>>>> Yeah, you're right. I'll see what I can do, but bandwidth is a littl= e low at the moment, so if you have some extra time, don't hesitate to impr= ove it :) >>>>>=20 >>>>> Absolutely, I=E2=80=99ll work on it.=20 >>>>>=20 >>>>> Yuan >>>>=20 >>>> Thanks :) >>>=20 >>> Done! >>=20 >> Thanks. >>=20 >> Some problems still remain. > > Thanks, there are so many edge cases :-) > >>=20 >> Line 1761 of dispnew.c: type "C-e RET" -- point goes to column 7 >> instead of the expected column 2. > > Fixed. >>=20 >> Line 3381 of dispnew.c: type "C-e RET" -- point goes to the correct >> column, but line 3381 is reindented incorrectly. > > This is due to it aligning to the previous sibling, aka the comment. Do w= e want to skip comments for the =E2=80=9Calign to the prev sibling=E2=80=9D= rule? > >>=20 >> Line 6611 of dispnew.e: type "C-e RET" -- point goes to column 0 >> instead of the expected column 2. If you type "C-e RET" on the next >> line 6612, point goes to column 0 and the line is reindented >> incorrectly. > > Fixed. >>=20 >> Line 13925 of xdisp.c: type "C-e RET" -- point goes to column 33(!) >> and line 13925 is reindented incorrectly. > > Fixed. >>=20 >> Lines 34529 and 34530 of xdisp.c: "C-e RET" produces incorrect column >> of point and reindents line 34530. > > The preproc directive messed the parse tree, and tree-sitter can=E2=80=99= t tell that it=E2=80=99s an else statement, so it can=E2=80=99t be easily f= ixed sadly. > > Yuan Now this isn't indenting how I expect: int foo { | // <-- Now point is indented to column 0 } It seems like `c-ts-mode--anchor-prev-sibling` isn't handling this? Theo From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 06 07:57:59 2023 Received: (at 61893) by debbugs.gnu.org; 6 Mar 2023 12:57:59 +0000 Received: from localhost ([127.0.0.1]:41629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZAPf-00055J-9b for submit@debbugs.gnu.org; Mon, 06 Mar 2023 07:57:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZAPd-000552-4U for 61893@debbugs.gnu.org; Mon, 06 Mar 2023 07:57:57 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZAPX-00084K-Gv; Mon, 06 Mar 2023 07:57:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=VV8kAKsHwRXR3l94g1SFCA2bA+KSfRyY2WipTUqycrc=; b=PIXWXvXS+9EqHIONgq92 5jgF2SLIflH3swj3Ca26V3RSjVifwKVgbgeug5C+1EmlFKR7OQsySuIE+bLw2cpOAQEcwmxwnQp95 gCv0M9W0ng5Y7s1EIdbYRdEOh3pQTM8B7nUafv2gXqK4HzT0E7xrBUVk96bUVpp6mrCGQiYNxggnx 0pCWPVwGLmdJxaf04nQBb2ZDVhKK0PJNkGZZKTGkEkX+7u/vnivuXA4I1+vpz1aG36MoXaikG7hF6 Giyk6ki/meUe5Sy33cFS2zRTBLBArOKCE7WsHHVOf4Pk/L559hVxNScnZegp3mmShesbVsaoXqhrm t2S0kuj00d1gfQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZAPW-0000i8-OS; Mon, 06 Mar 2023 07:57:51 -0500 Date: Mon, 06 Mar 2023 14:57:44 +0200 Message-Id: <831qm282bb.fsf@gnu.org> From: Eli Zaretskii To: Theodor Thornhill In-Reply-To: <877cvuo1qi.fsf@thornhill.no> (message from Theodor Thornhill on Mon, 06 Mar 2023 07:03:33 +0100) Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> <83y1ofekaw.fsf@gnu.org> <3B2BAD9F-84AB-4243-AC98-95C52BA492E3@thornhill.no> <0476A0F0-75E4-45EF-9B18-ECC5E87851C1@gmail.com> <5F5AF93A-E0A8-47BF-97DB-1AAA9A025FA4@thornhill.no> <3A152DB8-DA88-4E40-A536-4514E2C3501A@gmail.com> <83ttyz8v4v.fsf@gnu.org> <7CDB5C99-AC13-463A-9B59-B6BB5011E683@gmail.com> <877cvuo1qi.fsf@thornhill.no> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61893 Cc: casouri@gmail.com, 61893@debbugs.gnu.org, mardani29@yahoo.es X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Theodor Thornhill > Cc: Eli Zaretskii , 61893@debbugs.gnu.org, Daniel > Martín > > Date: Mon, 06 Mar 2023 07:03:33 +0100 > > Now this isn't indenting how I expect: > > int foo > { > | // <-- Now point is indented to column 0 > } Seems to work for me? From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 06 07:59:00 2023 Received: (at 61893-done) by debbugs.gnu.org; 6 Mar 2023 12:59:00 +0000 Received: from localhost ([127.0.0.1]:41635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZAQd-00057R-ND for submit@debbugs.gnu.org; Mon, 06 Mar 2023 07:58:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZAQc-00057C-Fi for 61893-done@debbugs.gnu.org; Mon, 06 Mar 2023 07:58:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZAQX-0008K6-6j; Mon, 06 Mar 2023 07:58:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=rYK+Vk5yDOla0SCetrXwS6wQLQYSEAyzqy+ARw1YCzg=; b=kjyX7+z+ciyjQlmDLE47 FJeLLsstQgJ+rYQ0eze1HMe7i81vvO/OH+SHFRV9tm6ggv3n3BT51KGg3FORrdxmTn46IA/7Wly5n y+JaZcISqspxBstQOZfN4aI5/nns4Uv4VXT3M1rF2O6YVxjq3ypPhRmx6m1o/0g2pC4beSIFJEpua 3iXNGhs9Gj8q+5dEftE00/sxMsTK0nS/C05OoEzcYrAZl2wJOUnip1WMj5sZv5gsH73Kw2LZ2SfZB TwPp2gHDtZa9UjQBlWPuZHwUuwxrCE1COFcHJ+HJm4dcb9O9dejAz7rvJO0vtiVIWw0dFsaAGnpDp Bbh9p3StzLkRtQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZAQW-0002ix-CL; Mon, 06 Mar 2023 07:58:52 -0500 Date: Mon, 06 Mar 2023 14:58:46 +0200 Message-Id: <83zg8q6np5.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <7CDB5C99-AC13-463A-9B59-B6BB5011E683@gmail.com> (message from Yuan Fu on Sun, 5 Mar 2023 15:26:45 -0800) Subject: Re: bug#61893: 29.0.60; Indentation in c-ts-mode broken again References: <83k000fsg8.fsf@gnu.org> <990CFB42-B7E4-4692-858B-20080B19A801@thornhill.no> <83a60wflwm.fsf@gnu.org> <835ybkfhuw.fsf@gnu.org> <3F6EB4C0-8216-4783-9DE4-0719F514F1B7@gmail.com> <83y1ofekaw.fsf@gnu.org> <3B2BAD9F-84AB-4243-AC98-95C52BA492E3@thornhill.no> <0476A0F0-75E4-45EF-9B18-ECC5E87851C1@gmail.com> <5F5AF93A-E0A8-47BF-97DB-1AAA9A025FA4@thornhill.no> <3A152DB8-DA88-4E40-A536-4514E2C3501A@gmail.com> <83ttyz8v4v.fsf@gnu.org> <7CDB5C99-AC13-463A-9B59-B6BB5011E683@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61893-done Cc: 61893-done@debbugs.gnu.org, theo@thornhill.no, mardani29@yahoo.es X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuan Fu > Date: Sun, 5 Mar 2023 15:26:45 -0800 > Cc: Theodor Thornhill , > Daniel Martín , > 61893@debbugs.gnu.org > > > Line 3381 of dispnew.c: type "C-e RET" -- point goes to the correct > > column, but line 3381 is reindented incorrectly. > > This is due to it aligning to the previous sibling, aka the comment. Do we want to skip comments for the “align to the prev sibling” rule? No, this behavior is okay. > > Lines 34529 and 34530 of xdisp.c: "C-e RET" produces incorrect column > > of point and reindents line 34530. > > The preproc directive messed the parse tree, and tree-sitter can’t tell that it’s an else statement, so it can’t be easily fixed sadly. I see. Thanks for the other fixes. I'm closing this bug. From unknown Sun Aug 10 10:54:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Apr 2023 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator