From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eason Huang Newsgroups: gmane.emacs.bugs Subject: bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled Date: Mon, 28 Nov 2022 21:59:39 +0800 Message-ID: References: <6_5zC6qq_eQV2whwZ7epZMUlEN-yk5iOlJBLuVnNDLzl4RUGCPFnbIN12pG-DyNvCAYlRJTTopEe_RxX2_B7nSJQyBCJrzo915uBA51qW8A=@rjt.dev> <838rjyt15i.fsf@gnu.org> <5ADA88E0-A105-47B5-B590-2591253781C1@gmail.com> <83ilj0rk2y.fsf@gnu.org> <837czgrh9y.fsf@gnu.org> <49C8837A-A6D3-4ABF-BC3B-97ECE925F85C@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24442"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: dev@rjt.dev, Eli Zaretskii , Stefan Monnier , 59498@debbugs.gnu.org, mardani29@yahoo.es To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 28 15:13:03 2022 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 1ozesX-00064w-Tv for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Nov 2022 15:13:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozes5-0006dv-IR; Mon, 28 Nov 2022 09:12:33 -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 1ozerc-0006X5-OX for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 09:12:06 -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 1ozerc-0004OJ-C0 for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 09:12:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ozefy-0004cU-Ux for bug-gnu-emacs@gnu.org; Mon, 28 Nov 2022 09:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eason Huang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Nov 2022 14:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59498 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59498-submit@debbugs.gnu.org id=B59498.166964399417707 (code B ref 59498); Mon, 28 Nov 2022 14:00:02 +0000 Original-Received: (at 59498) by debbugs.gnu.org; 28 Nov 2022 13:59:54 +0000 Original-Received: from localhost ([127.0.0.1]:48772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozefp-0004bX-Gj for submit@debbugs.gnu.org; Mon, 28 Nov 2022 08:59:53 -0500 Original-Received: from out203-205-221-155.mail.qq.com ([203.205.221.155]:58795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozefk-0004bR-TX for 59498@debbugs.gnu.org; Mon, 28 Nov 2022 08:59:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1669643981; bh=7TFDA7arS9XPkACFXDFjZA65IHr0EoAgzVPTOv3ySNk=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=DrLf/gUY4Zy5Rm0M4kO0KtkbnEXh4v7bv44ylISWbQfc8BceTI5W2g4k68jYwiQHf wbm2hZCFpPz1/YRZo3RBIvolz5GaL0qnVDNKlxalGVGkr4qdD6Mpe4a/CoQe9SJIbX pS4oFaewRbrQd8VJGRtFiIJGVQLjlTqX+V8j3yeo= Original-Received: from macbook ([114.82.35.56]) by newxmesmtplogicsvrsza12-0.qq.com (NewEsmtp) with SMTP id EE734692; Mon, 28 Nov 2022 21:59:39 +0800 X-QQ-mid: xmsmtpt1669643979twuu0bcda X-QQ-XMAILINFO: MJWNsjxQgzaEgBAnVIFzgNlK4/X3D8p2G3Dr4G+94hm2vyGErTt5SWloJOKKKl CwJDvBmTCPdHvd1qDEkD2B4eSiI8LQMmj2MbEDcTm3EfDpEhopRTi/BPVS9QXAIrYRL63iMfCwoZ aH8BnpfbuJPLcUcGwqJ9fQYw5xNjvYS7ix0a2o1JDHbVI3KqQ9B+f363TryK4s0dLGzloJnCkkyT I9YTCV4NURPnoc6m4n+Ul1pjOzNA4NAjcEJf8cZMjaZcXvIFzrRLlkAvoKvMGwALD21gFxWu4DOq Bx/DVH11zS0WQBl2ZcFMuL0OFwARWKYNOOPlfnWWqERcnns2YsCJ1ARn1drGvEyKv3T3w3up2Rbl wZ5k2PlJqQF2kzFv+2I8k2K3gMr1sbwBL8j1qeyxg8ykTJ6jNgH/F+1SqwMgy42YUzE1bMrwmUd6 xk3Jg5Wtp1PiIV8xxo4yMk4IkDCLaIH25UKiIEyraHeKL7bFK3Kg2KK+wOPzMfHRb+qeBE6n1j6z avMXhD+EYIjHuMVzHj6FRHliEyNB8t3P7/lnQoWRGkQj67SuXq+iAjFFDgZWz5w+6MsIjYJwFO0n kACkqWPjzC6L8PQ8xFJdyv5qJeX/qcaywtU/1OcHJ+1CnpIOrF65CmpKAZZo53C6sDnEhAM7lTkt 4Sszd18nBNf0XZqwwYsa8DkCvnWWx+gnNXgvxbmEYewHoDpIiwIXp31PqJaGkRn8VuUN5icr5vND Mr7wWl3U+PDFpJPWFVdCzok8ve2xgR62cgzNGaoOlXKF8NqYbJBEGSS+/3VOF+hnMcFi0yRQCbTM TZNvTFo6RTEmEOiyjSjG5Agek0X5SSMSm9ssDKCi In-Reply-To: <49C8837A-A6D3-4ABF-BC3B-97ECE925F85C@gmail.com> (Yuan Fu's message of "Sun, 27 Nov 2022 14:21:46 -0800") Original-Message-ID: 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:249306 Yuan Fu writes: >> On Nov 26, 2022, at 11:24 PM, Eli Zaretskii wrote: >> >>> From: Stefan Monnier >>> Cc: Yuan Fu , dev@rjt.dev, aqua0210@foxmail.com, >>> 59498@debbugs.gnu.org, mardani29@yahoo.es >>> Date: Sun, 27 Nov 2022 02:18:06 -0500 >>> >>>>> I added treesit-comment-start/end to help indenting comments. So this is >>>>> the correct way to use them. The following comment explains why I created >>>>> new variables: >>>>> >>>>> ;; `comment-start' and `comment-end' assume there is only one type of >>>>> ;; comment, and that the comment spans only one line. So they are not >>>>> ;; sufficient for our purpose. >>>> >>>> ??? This is surprisingly unclean, IMO. For starters, the names of the >>>> variables are confusing. The need to define two sets of comment-start and >>>> comment-end regexps is also a nuisance and a source of errors. >>>> >>>> How do non-treesit modes handle this issue? Why do the treesit-based modes >>>> need something special here? >>>> >>>> Stefan, any ideas? >>> >>> `comment-start` and `comment-end` do not describe the set of possible >>> comment delimiters. They describe the comment delimiters that should be >>> *inserted* when we do things like `comment-dwim`. >>> >>> To find/match comment delimiters we have `comment-start-skip` and >>> `comment-end-skip`. They're not ideal, but they've been good enough so far. >>> They don't say which comment starter matches which comment-ender (that >>> was done by the syntax-tables), but tree-sitter should be able to tell >>> us that when we need it. >>> >>> It would be nice if we could avoid the need to set/use >>> `comment-start-skip` and `comment-end-skip` when using tree-sitter. >>> Maybe we can compute their values from the tree-sitter grammar. >>> But getting rid of uses of those vars will take a fair bit more work, >>> I think. >> >> OK, but do you agree that adding yet another pair of variables, >> treesit-comment-start/end, is the opposite of what we want? > > Yes. I removed them in d5dc1dbf7cb. > Hi Yuan, I build Emacs with the commit a85ff22300, which contain d5dc1dbf7cb, I can confirm that the indent issue has been fixed. Thanks you very much. -- Eason Huang