From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 25 23:57:39 2024 Received: (at submit) by debbugs.gnu.org; 26 Aug 2024 03:57:39 +0000 Received: from localhost ([127.0.0.1]:43521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siQrL-0005Qs-4m for submit@debbugs.gnu.org; Sun, 25 Aug 2024 23:57:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:47858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siQrJ-0005Qk-Pr for submit@debbugs.gnu.org; Sun, 25 Aug 2024 23:57:38 -0400 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 1siQqU-0007LF-OJ for bug-gnu-emacs@gnu.org; Sun, 25 Aug 2024 23:56:46 -0400 Received: from mail-oo1-xc32.google.com ([2607:f8b0:4864:20::c32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1siQqT-0007tX-9L for bug-gnu-emacs@gnu.org; Sun, 25 Aug 2024 23:56:46 -0400 Received: by mail-oo1-xc32.google.com with SMTP id 006d021491bc7-5d5b22f97b7so4374315eaf.2 for ; Sun, 25 Aug 2024 20:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724644603; x=1725249403; darn=gnu.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=qcYc4Nswkr6mLNujXcDEXRgO8Z+PRFYuyHpQXnZcow0=; b=EAxhABeZPRlnnAQBE2jEFdkdefwStkNEKk3BU1KZx0PL0KbVJTEf9+I+CFO/utN/IR QTYJac4L4drtnx2a7Vib3cqMcFJ9a9D6y0dISorT5dg1Xuqs6a1J09u3AHjN+qa5bL0d M7nAXJpKy0fvkMcMSTPElFfKL8lYemMJfQxXiAOF0pTl8GiNeCG9S67r5WCHxRc3oIIZ mGENrTL+4MU2CJMXge1oWItCjEuRLuuxbcWnWyRo4lx5tHq7JAT3WVuFjEl9M9cZFgnM GEy/Amm8XD7EUgEbkCs24xu0iNsoKYYXEYzdlpCHN/v8VUPPefSdoje4oYPuVMrVjOzu wzFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724644603; x=1725249403; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qcYc4Nswkr6mLNujXcDEXRgO8Z+PRFYuyHpQXnZcow0=; b=gqtbcMfUT14W96yPH++oNWnnJH+hVxo5YsYw2UThLLHLXABi4KoSy69Lk410C3wkMM szcqUDbPQ59Dh/eYAcrmdQ233P1Sq66mjmVT3ePBRuYhWTfrod2mVMHq5/mD47u9bi+K 5YOjM/gervw/ZVAfWPjMXlclIitQF5mW50fwd0cF/nYU6uaVKTWOBGPT1Tt55t6f6PRT dhtcYFINO9igmo3B1hZsP/OOf6f9qQTOR2sKiONSIsB2OyEvQn33DPTgmguk0BbueJ1S x1UE6W7rfhdC4PM2QWbn0CXofqsxIb2BOlhf3KuZfsOBqjy51FsxuYQZ00yAusWUKXDI nHMA== X-Gm-Message-State: AOJu0YxBvWJf1h7Bn6HNgM0ngM9nauxutQScRT+UnHGs98xM6imeCGar 9zQsHnPM9U0MMyvNAWSU2Jv3TZoKVm8R5Eelodd5N0Z0qpWIENqnTRFFPQ== X-Google-Smtp-Source: AGHT+IEfPmYLxcRzD5RLSvbMcWHOz/IsHYEo3AGOeuhToiYF9fmpzydPBxDaV4Mh7kMaxfVGTmIk0A== X-Received: by 2002:a05:6358:720f:b0:1aa:c71e:2b5d with SMTP id e5c5f4694b2df-1b5c3b0f806mr1238828955d.23.1724644603336; Sun, 25 Aug 2024 20:56:43 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:3470:5bab:363c:9aa2]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7145a3d32b0sm2707271b3a.23.2024.08.25.20.56.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Aug 2024 20:56:42 -0700 (PDT) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? Message-Id: Date: Sun, 25 Aug 2024 20:56:31 -0700 To: Bug Report Emacs X-Mailer: Apple Mail (2.3776.700.51) Received-SPF: pass client-ip=2607:f8b0:4864:20::c32; envelope-from=casouri@gmail.com; helo=mail-oo1-xc32.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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.3 (--) X-Debbugs-CC: eliz@gnu.org , = vincenzo.pupillo@unimi.it Should we add a custom option that controls whether to enable doxygen support in c-ts-mode/c++-ts-mode/java-ts-mode? Technically this isn=E2=80=99t a problem, since the doxygen support is = only enabled if there=E2=80=99s doxygen grammar on the system. But many = people (me) might install a grammar bundle that includes dozens of grammars for convenience. Then the doxygen support would turn on when the user doesn=E2=80=99t really intend to use it. I propose we add custom options like c-ts-mode-enable-doxygen and set it to t by default, so the default behavior is still to enable doxygen support when the grammar for it exists, but people who don=E2=80=99t = want to pay for it can turn it off by setting the option to nil. Yuan From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 26 23:15:14 2024 Received: (at control) by debbugs.gnu.org; 27 Aug 2024 03:15:14 +0000 Received: from localhost ([127.0.0.1]:45748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1simfq-0003JR-4w for submit@debbugs.gnu.org; Mon, 26 Aug 2024 23:15:14 -0400 Received: from mail-io1-f43.google.com ([209.85.166.43]:55307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1simfo-0003JC-FY for control@debbugs.gnu.org; Mon, 26 Aug 2024 23:15:13 -0400 Received: by mail-io1-f43.google.com with SMTP id ca18e2360f4ac-824d911b6c4so190399239f.2 for ; Mon, 26 Aug 2024 20:14:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724728394; x=1725333194; darn=debbugs.gnu.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=sSadSQudRs29/6JG/FpA2p/eK1RmLkD2RFAyZlaI03w=; b=aILzIBVfWU+RlycaG0ZmxW+iccLTPLHtK7mRBsy3dYtHn6rJ0KK13iyynJ53AbirYb 2LOXVr1s/xmewzUhTGZbgORL0Ynwb7gUuSqhQxb9/wWo38yvF3INoboUTjd749rKEvm9 a1ZU+x47MzyqhPslUCXYR+A6WWaLwWF5csJAuIEjg1CPiziLwtKXnSEGuRyvnipdszQO ryb25XDZMWQfILMcZCfOJ7vXBOa39U+TMldwlMMnODYB7NbOWOA56nE9WCPmcwSDAMOZ 5vClxU9AaQfu2VifyO++IiHZ92V0QX61G7/169abQCgknLYu7HV7MmeCFSu+2Fwiou0d k1Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724728394; x=1725333194; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sSadSQudRs29/6JG/FpA2p/eK1RmLkD2RFAyZlaI03w=; b=O4z89WxBn0npu0IDyPQti6jehII3WTF0olHSwrEny69e2BLvjH5EuQ4nmpx61zRbQW Ho0QXTCH28lTJQHbT6JfLEuSEE2k6w1+qQhSl5xoV26ecrRe4numadqgXbAXhjUGLcH7 XVbw7Nl9M/UxZEdMDen7wFZq7lsnRUaZcv+rXkh+iHa7yi4X6BdLpsjMLChwV/vMf6Cy cf4zqfrnjwJGF+r4OHNwzlup4DBqGSx4YkcNzBRYCF8CnjeZmSFiWR0DOj5npDbi06VX XUXVILOusXds5cyueognjkHQGE2uMPraQtXUx/JhfpdxMaY8f3im5SvFa6i9Dk45D6P1 eGWA== X-Gm-Message-State: AOJu0YwuCQsTAmpPJWH7xFczCuc8HCgdyy1pRRuvRuGbZcCvxUfI6p2+ KfXfNMFB5YLjj5nw4cqsOJ5hye2XlDVt6rIzn6KhCzKLYZJ3wLrIaZ6wBA== X-Google-Smtp-Source: AGHT+IEg9s8+t5sZqDZFEJPfUpTG71zMHlgErX+D6VpZfA7JqlQT1dFqiBCIESJ7YqfSE4TN28HbRw== X-Received: by 2002:a05:6e02:19cd:b0:375:c473:4a78 with SMTP id e9e14a558f8ab-39e3c9e99a5mr147293095ab.23.1724728394070; Mon, 26 Aug 2024 20:13:14 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:fd58:c8a8:ed8f:39fa]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7cd9acabbfesm7177354a12.33.2024.08.26.20.13.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Aug 2024 20:13:13 -0700 (PDT) From: Yuan Fu Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: control message for bug #72815 Message-Id: Date: Mon, 26 Aug 2024 20:13:01 -0700 To: control@debbugs.gnu.org X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) merge 72815 72814 quit From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 26 23:16:03 2024 Received: (at 72814) by debbugs.gnu.org; 27 Aug 2024 03:16:03 +0000 Received: from localhost ([127.0.0.1]:45753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1simgd-0003LD-EJ for submit@debbugs.gnu.org; Mon, 26 Aug 2024 23:16:03 -0400 Received: from mail-ot1-f51.google.com ([209.85.210.51]:54385) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1simgb-0003KR-6R for 72814@debbugs.gnu.org; Mon, 26 Aug 2024 23:16:02 -0400 Received: by mail-ot1-f51.google.com with SMTP id 46e09a7af769-7095bfd6346so4508275a34.0 for <72814@debbugs.gnu.org>; Mon, 26 Aug 2024 20:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724728443; x=1725333243; darn=debbugs.gnu.org; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=DMVygSuWII1qECM9njepd2mib/iErk9pEbBbw4H3oTA=; b=eg3wBvOHBmTc6HjWZOTMZ73Avur+GXSpkdyQZw9E6+zqF6SzCmxK1yL/4POfi8+oi2 4SpkaJJ9lvY1BdnTjtJ5xdMmZ2UqypZAJlTqSAbwDUbBhgdGKVdEfAK21wZJHOEEhuxF o02AOMyc6IEaBI+rChjF9kYqide3pWyfUVcwecxQ/Pa4oBYr5eHfnM4IthIwF+CDaX9a UI+d9q6ssVMYuq1aFJNj97nWU4MxVzDiA9FYTS79Rmlusktc7uJ/4wLl8oG0mHyxSip/ j5jCN5sT3vcRyGakektzpJU2T3tzQCJ4qBpcfRK/8OJyFO18+3eqyVyq24KrM+YsBVlm mcyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724728443; x=1725333243; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DMVygSuWII1qECM9njepd2mib/iErk9pEbBbw4H3oTA=; b=LfCtKTvk/0sBdvumk2fWBSPpAtkXIOGp+gx0LjGUUkwW8X5iPFmUclaxJsDc/YUybB voTxNqgkLcIEDfDNk4aI7EZwmNQow03UaY0hAWEJE8jZnfykifiigcTEyIV3SvjJF6zw IXbGkhvCEkVe7YqAWFiJvaPohFp9lgWXOstSYMuTNk9kopFnfKFI+1VOr9saAXCns4HB HcPG28dySiV2SWGm+HX8l8zWYvEGh9zK6gUdSieCnzGLW51zytotgYBb1DcvLFX/XkZc s1czEZGQKodYMdE+vLqkk1DqvHoOScvrOMmHFhcpnP5CqqEtG38k+heiOsPDeqzxpfrN XYrg== X-Gm-Message-State: AOJu0YyjKWfzdOq40L6/9GI6iABPrHnAttKMwWOUgMznpxkHRsUwIJmN kh20ieDaPXvbuIrZ/oeIbXgrEAMYETN2PNpw2CMgnFvY7JiDaiYnf9CWmg== X-Google-Smtp-Source: AGHT+IHfGm36B+2WLci3mML99bg7JdEfX6A84NEQ5rPio4sg1Opvz+3AISfNSUxhaXO5h+BN+YMnbA== X-Received: by 2002:a05:6830:600e:b0:709:3d2f:7b48 with SMTP id 46e09a7af769-70e0ec03290mr13540071a34.24.1724728443076; Mon, 26 Aug 2024 20:14:03 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:fd58:c8a8:ed8f:39fa]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7cd9acabbfesm7177354a12.33.2024.08.26.20.14.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Aug 2024 20:14:02 -0700 (PDT) From: Yuan Fu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#72814: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? Message-Id: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> Date: Mon, 26 Aug 2024 20:13:52 -0700 To: 72814@debbugs.gnu.org X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 72814 Cc: vincenzo.pupillo@unimi.it, eliz@gnu.org 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: > X-Debbugs-CC: eliz@gnu.org , > vincenzo.pupillo@unimi.it > > Should we add a custom option that controls whether to enable doxygen > support in c-ts-mode/c++-ts-mode/java-ts-mode? > > Technically this isn=E2=80=99t a problem, since the doxygen support is = only > enabled if there=E2=80=99s doxygen grammar on the system. But many = people > (me) might install a grammar bundle that includes dozens of > grammars for convenience. Then the doxygen support would turn on when > the user doesn=E2=80=99t really intend to use it. > > I propose we add custom options like c-ts-mode-enable-doxygen and set = it > to t by default, so the default behavior is still to enable doxygen > support when the grammar for it exists, but people who don=E2=80=99t = want to pay > for it can turn it off by setting the option to nil. > > Yuan Eli, WDYT? From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 27 03:38:07 2024 Received: (at submit) by debbugs.gnu.org; 27 Aug 2024 07:38:07 +0000 Received: from localhost ([127.0.0.1]:46015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siqmE-0002NY-LJ for submit@debbugs.gnu.org; Tue, 27 Aug 2024 03:38:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:48766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1siqlz-0002Mq-TP for submit@debbugs.gnu.org; Tue, 27 Aug 2024 03:38:05 -0400 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 1siql8-0007aN-7R for bug-gnu-emacs@gnu.org; Tue, 27 Aug 2024 03:36:59 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1siql5-0003Tu-OT; Tue, 27 Aug 2024 03:36:57 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a86abbd68ffso594886266b.0; Tue, 27 Aug 2024 00:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724744212; x=1725349012; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=s7ZbYuU4Hg11tBqVQb6JFYYJsFylgbgfa1a3l6Mf89A=; b=aUCWD+cfTKN6yt+xViUQ/rXK/bSCbvxQRJ+2rumkwtDJFSpfE+mWOPlFYdAOyAbFUF cmIatAisMPWFZGIhE+KZ3JKc8Tc0bneTUVIdkoulomyPZjhTJqBf7AmLcJg7K6Yp3RL5 JaO30vZVPqDrLLA2xLvDsyD4Ty32uLl8+XvUD0u2V4C2X8fEQ5autZbdVja0qRXFJ0dF D2HrOr066NE9dDymObJe5EYiBRFrbp6FgEa1WAgCGv+NmyvCIWv6Bfxu/LDtgu1w3mmg +T7P6VLt3XutI/Fa1gav1kg3+Hry6SAV4vbOExrIG0YPhEhA8pSoP8qtalEla0jmDDH1 Hyqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724744212; x=1725349012; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=s7ZbYuU4Hg11tBqVQb6JFYYJsFylgbgfa1a3l6Mf89A=; b=TrmRvfIPsX3FslNElXXBmIUWMcpQj4ietGo02MMTnyRxCxMT2mAXaw2mqszkuKLoGO m3S5+S2IDEPr2g3BRs6arK/H84uEtOdHfFii0pdyA0CEkIJ3cAlHjkoWKbhI+GEilHlp AhXuo6LC7f0qZqvbnIj28Bj18fTUVoDm1qnmoEniqbPvpHCXzbr2aLzXphieweiDzHvC XNmQV6Hj8/BSFlbkq889qBNafzzfUwUSTks+t914IpJ4pFhlWpaXQxUYtTHWb9JoYw5N y7KU630gYZrmQU3V2fRGkirWNtFv3+/GMwIPRFj1R4vY7ETfSlf1AICu3LP1FTpOLFcJ 7E7w== X-Gm-Message-State: AOJu0YwsBhXwuA8+QGjUbuyxAEKmgEjGdzkJAXOc3axeCUfonh7E28y4 qY/QrPfgtyJ+KONnuETc3ORsxSR6jXmduaP2uPlLHfjtfHffhtq5FYTt467o X-Google-Smtp-Source: AGHT+IFibPKQZ5FYB4if6SXyG1JPht92N54Je0cYAvCBJUF4AWIAj0pBuNB8xiL0PJrciOpv592qgg== X-Received: by 2002:a17:906:794e:b0:a86:abbd:6834 with SMTP id a640c23a62f3a-a86e2bcd7a1mr207130166b.30.1724744211955; Tue, 27 Aug 2024 00:36:51 -0700 (PDT) Received: from [127.0.0.1] (93-33-63-32.ip43.fastwebnet.it. [93.33.63.32]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a86e549d0a3sm74238666b.46.2024.08.27.00.36.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Aug 2024 00:36:51 -0700 (PDT) Date: Tue, 27 Aug 2024 09:36:51 +0200 From: Vincenzo Pupillo To: bug-gnu-emacs@gnu.org, Yuan Fu , 72814@debbugs.gnu.org Subject: =?US-ASCII?Q?Re=3A_bug=2372814=3A_31=2E0=2E50=3B_Add_a_variable_co?= =?US-ASCII?Q?ntrolling_doxygen_support__in_C/C++/Java=3F?= User-Agent: K-9 Mail for Android In-Reply-To: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> References: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> Message-ID: <333F4FC6-FAB2-4146-BE40-8C1DB2BF36D1@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----Z7VRP8SW4T613N3A6QZJ1MAEX47VQA Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=v.pupillo@gmail.com; helo=mail-ej1-x630.google.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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: eliz@gnu.org 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.3 (--) ------Z7VRP8SW4T613N3A6QZJ1MAEX47VQA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sorry Yuan, the spam filter is aggressive on my work email and I didn't see= your email=2E In early versions of php-ts-mode there were two variables to= disable parser injection for html and phpdoc=2E When, thanks in part to yo= ur help, I was able to get indentation and font locking to work properly, I= preferred to remove them because they seemed unnecessary=2E c-ts-mode has font locking for comments itself, so it is fine to introduce= this variable from my point of view=2E Vincenzo=20 Il 27 agosto 2024 05:13:52 CEST, Yuan Fu ha scritto: > >Yuan Fu writes: > >> X-Debbugs-CC: eliz@gnu=2Eorg , >> vincenzo=2Epupillo@unimi=2Eit >> >> Should we add a custom option that controls whether to enable doxygen >> support in c-ts-mode/c++-ts-mode/java-ts-mode? >> >> Technically this isn=E2=80=99t a problem, since the doxygen support is = only >> enabled if there=E2=80=99s doxygen grammar on the system=2E But many pe= ople >> (me) might install a grammar bundle that includes dozens of >> grammars for convenience=2E Then the doxygen support would turn on when >> the user doesn=E2=80=99t really intend to use it=2E >> >> I propose we add custom options like c-ts-mode-enable-doxygen and set i= t >> to t by default, so the default behavior is still to enable doxygen >> support when the grammar for it exists, but people who don=E2=80=99t wa= nt to pay >> for it can turn it off by setting the option to nil=2E >> >> Yuan > >Eli, WDYT? > > > ------Z7VRP8SW4T613N3A6QZJ1MAEX47VQA Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Sorry Yuan, the spam filter is a= ggressive on my work email and I didn't see your email=2E In early versions= of php-ts-mode there were two variables to disable parser injection for ht= ml and phpdoc=2E When, thanks in part to your help, I was able to get inden= tation and font locking to work properly, I preferred to remove them becaus= e they seemed unnecessary=2E
c-ts-mode has font locking for comments its= elf, so it is fine to introduce this variable from my point of view=2E
<= br>Vincenzo


Il 2= 7 agosto 2024 05:13:52 CEST, Yuan Fu <casouri@gmail=2Ecom> ha scritto= :

Yuan Fu <casouri@gmail=2Eco= m> writes:

X-Debbugs-CC: eliz@gnu=2Eorg <mailto:eliz@gnu=2Eorg>,
vincenzo=2Epupillo@unimi=2Ei= t

Should we add a custom option that controls whether to enable dox= ygen
support in c-ts-mode/c++-ts-mode/java-ts-mode?

Technically= this isn=E2=80=99t a problem, since the doxygen support is only
enable= d if there=E2=80=99s doxygen grammar on the system=2E But many people
(= me) might install a grammar bundle that includes dozens of
grammars for= convenience=2E Then the doxygen support would turn on when
the user do= esn=E2=80=99t really intend to use it=2E

I propose we add custom op= tions like c-ts-mode-enable-doxygen and set it
to t by default, so the = default behavior is still to enable doxygen
support when the grammar fo= r it exists, but people who don=E2=80=99t want to pay
for it can turn i= t off by setting the option to nil=2E

Yuan

Eli, WDYT?



------Z7VRP8SW4T613N3A6QZJ1MAEX47VQA-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 27 08:23:19 2024 Received: (at 72814) by debbugs.gnu.org; 27 Aug 2024 12:23:19 +0000 Received: from localhost ([127.0.0.1]:46203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sivEE-0001ij-Rm for submit@debbugs.gnu.org; Tue, 27 Aug 2024 08:23:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sivED-0001iX-5v for 72814@debbugs.gnu.org; Tue, 27 Aug 2024 08:23:18 -0400 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 1sivDG-0006yi-Nm; Tue, 27 Aug 2024 08:22:18 -0400 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=gDnW+olqwgHCJxhXm41PFt4Q6kLmCWtDCO4cbs3zfdU=; b=UUKE7oervTI2ms8PkT3Z Le/xonmhuW2rdxwgYrCXlHM+DIYBygrdtlaQoxixPQ5fsqbIbc+Es74drYwNSsgSuk3T0B/nNrtCp CbM7hxgOAh0NRKeqidkNDRiJxx8SJ29jVwXlWeIl5Obwdxp19kJiLNBtbeEP94Vsu78GoVWr72xfc 43ZucSUBlkgm/6izV6CjSFRvI/qdF0vsYzAngtUHmZBW+ZDqpVZYlJklXriP2Qic8xL34q8RsYv4l X42cc8sd0KO+OdRa95nPF+qmdZTXayxcwDcKhZ0knJwkUoVYN3lpg8cSIJJqupD6vohzLRh/FSLbi +hBjjzDQF4Iq+g==; Date: Tue, 27 Aug 2024 15:22:16 +0300 Message-Id: <86seuqi29z.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> (message from Yuan Fu on Mon, 26 Aug 2024 20:13:52 -0700) Subject: Re: bug#72814: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? References: <0708616B-CCE4-4AA5-81FA-FF41F2789018@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: 72814 Cc: 72814@debbugs.gnu.org, vincenzo.pupillo@unimi.it 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: Mon, 26 Aug 2024 20:13:52 -0700 > Cc: eliz@gnu.org, > vincenzo.pupillo@unimi.it > > > Yuan Fu writes: > > > X-Debbugs-CC: eliz@gnu.org , > > vincenzo.pupillo@unimi.it > > > > Should we add a custom option that controls whether to enable doxygen > > support in c-ts-mode/c++-ts-mode/java-ts-mode? > > > > Technically this isn’t a problem, since the doxygen support is only > > enabled if there’s doxygen grammar on the system. But many people > > (me) might install a grammar bundle that includes dozens of > > grammars for convenience. Then the doxygen support would turn on when > > the user doesn’t really intend to use it. > > > > I propose we add custom options like c-ts-mode-enable-doxygen and set it > > to t by default, so the default behavior is still to enable doxygen > > support when the grammar for it exists, but people who don’t want to pay > > for it can turn it off by setting the option to nil. > > > > Yuan > > Eli, WDYT? I'm okay with such an option, but it should be careful to check whether the corresponding grammar library is available, and offer a user-friendly diagnostic if not. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 09 05:51:14 2024 Received: (at submit) by debbugs.gnu.org; 9 Sep 2024 09:51:14 +0000 Received: from localhost ([127.0.0.1]:60658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snb3B-0002WT-9r for submit@debbugs.gnu.org; Mon, 09 Sep 2024 05:51:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:33242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snb38-0002WH-D5 for submit@debbugs.gnu.org; Mon, 09 Sep 2024 05:51:11 -0400 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 1snb33-00064W-PC for bug-gnu-emacs@gnu.org; Mon, 09 Sep 2024 05:51:06 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1snb31-0006rU-MG; Mon, 09 Sep 2024 05:51:05 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a8d6ac24a3bso6578166b.1; Mon, 09 Sep 2024 02:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725875462; x=1726480262; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qDnhSvclYV9RPPKPaohyM7poq31Vb02zKis+26Dc0eA=; b=Qf1MK62Wtkd7qAAT6q/lL9ODc7C6ovc0wrcnKz6GP4GoKd8OsBQSCmwJB221k6PDVp HRZTIG2TGs8YBj0k/1Mw8ey+3cTU9enD9tpmhLICyuHD4sIPkfBWIewplpJkocsU9p/n g5znl0eGx7ArTu3lCFiH8i8iu0ViBHW6lJ0/Tcbcprdu++gq6N/rW5drcnbO9UogzxW0 nOGZ66Pv+0fes8y+0T2YaIrp5Qh9YeqlgjwgjwdEeE2JDNBPXf3DFHqncbkGNLloh6hC MU/3rk1FwYRuU7x5OK5M/IdVr48E2M4QkrKW+9zdyvOP2P+8Klq/Y0J/Y9XjvAlAWv+c A6LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725875462; x=1726480262; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qDnhSvclYV9RPPKPaohyM7poq31Vb02zKis+26Dc0eA=; b=vcrdYDAJpiwCoqBmP7QlEeXAjPlmJKUJL8JZM/qyMfUjA/ArWPF96mhYxlbmX7Yyx/ SHGYv5yKXgNpURaVQqpFDkRQ1PakwjvtRopAIY9iNMY1vtjjrs5OS4sl8RKy5OwJMZre p6Z7FOQRqHsOf903h2SRzX/1i2VDd1dJQb1rwHtFZi50OwuI0ZRc6boGybXBwL5O6yIo 9VAu8cnQmO2CdrjBJ+fjvrIQp/0aza+JErGeMN7bunPgOIv7HKX/2PRc5I5Nl8te8h3n uSPD/dU76MuTxyb0NtlyR+/4l4iBmW0Myp9BUJgmS23ESgSI7Dpa3KiMkTaEYXbzqlc2 gf6w== X-Forwarded-Encrypted: i=1; AJvYcCVg+/hd8kr9EGhRClMzRqwnfrVfKh4zpb7o56OYl2j1pmfBUBhllh4wRuWY+CLXoDakL6/8CQ==@gnu.org, AJvYcCXH9e4DP6MLv9nO00leUOgNpeLGWRhaSKxKAcoKDuBWdRBSrzrB09fN/MJVwtkp2o2eXOgc0o253X4eipHO@gnu.org X-Gm-Message-State: AOJu0YyJFkb4m5k7TVtsACcCLNjZLafzSKslmJbYVU1AAMoyuqbjRPef wk0Ym9gzRcFp6WvFL1V+t1YhuCZuxQlWXTJBg2XsZGYJAfcoxdN/ X-Google-Smtp-Source: AGHT+IFtQqjOfYRAdHQcs0svn43TvlzowGwZE+KbSWQWTlUmn3lCX95k4w1HbMIkHydcUi0TmVmatA== X-Received: by 2002:a17:907:6d0e:b0:a8d:4e69:4030 with SMTP id a640c23a62f3a-a8d4e69420bmr393837466b.19.1725875461323; Mon, 09 Sep 2024 02:51:01 -0700 (PDT) Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25ce9ed6sm312967666b.165.2024.09.09.02.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 02:51:00 -0700 (PDT) From: Vincenzo Pupillo To: Yuan Fu , bug-gnu-emacs@gnu.org Subject: Re: bug#72814: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? Date: Mon, 09 Sep 2024 11:50:59 +0200 Message-ID: <2150926.9o76ZdvQCi@fedora> In-Reply-To: <86seuqi29z.fsf@gnu.org> References: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> <86seuqi29z.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2712115.vuYhMxLoTh" Content-Transfer-Encoding: 7Bit Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=v.pupillo@gmail.com; helo=mail-ej1-x636.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 72814@debbugs.gnu.org, Eli Zaretskii , vincenzo.pupillo@unimi.it 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.3 (--) This is a multi-part message in MIME format. --nextPart2712115.vuYhMxLoTh Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In data marted=C3=AC 27 agosto 2024 14:22:16 CEST, Eli Zaretskii ha scritto: > > From: Yuan Fu > > Date: Mon, 26 Aug 2024 20:13:52 -0700 > > Cc: eliz@gnu.org, > >=20 > > vincenzo.pupillo@unimi.it > >=20 > > Yuan Fu writes: > > > X-Debbugs-CC: eliz@gnu.org , > > > vincenzo.pupillo@unimi.it > > >=20 > > > Should we add a custom option that controls whether to enable doxygen > > > support in c-ts-mode/c++-ts-mode/java-ts-mode? > > >=20 > > > Technically this isn=E2=80=99t a problem, since the doxygen support i= s only > > > enabled if there=E2=80=99s doxygen grammar on the system. But many pe= ople > > > (me) might install a grammar bundle that includes dozens of > > > grammars for convenience. Then the doxygen support would turn on when > > > the user doesn=E2=80=99t really intend to use it. > > >=20 > > > I propose we add custom options like c-ts-mode-enable-doxygen and set= it > > > to t by default, so the default behavior is still to enable doxygen > > > support when the grammar for it exists, but people who don=E2=80=99t = want to pay > > > for it can turn it off by setting the option to nil. > > >=20 > > > Yuan > >=20 > > Eli, WDYT? >=20 > I'm okay with such an option, but it should be careful to check > whether the corresponding grammar library is available, and offer a > user-friendly diagnostic if not. Try to take a look at this patch. Is it okay? Vincenzo --nextPart2712115.vuYhMxLoTh Content-Disposition: attachment; filename="0001-Add-a-user-option-to-disable-Doxygen-syntax-highligh.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0001-Add-a-user-option-to-disable-Doxygen-syntax-highligh.patch" >From 0a6d90f25dfddc1da88b5e47a97bc09fe50a6d34 Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Mon, 9 Sep 2024 09:20:42 +0200 Subject: [PATCH] Add a user option to disable Doxygen syntax highlighting (bug#72814). Both 'c-ts-mode' and 'java-ts-mode' have a new user option, 'c-ts-mode-enable-doxygen' and 'java-ts-mode-enable-doxygen' (defaults to t) which allow to disable syntax highlighting of comment blocks based on the Doxygen grammar. * lisp/progmodes/c-ts-mode.el: Add the 'c-ts-mode-enable-doxygen' user option variable to disable doxygen grammar. (bug#72814) * lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Use the new 'c-ts-mode-enable-dodygen' option. * lisp/progmodes/java-ts-mode.el: Add the 'java-ts-mode-enable-doxygen' user option variable to disable doxygen grammar. (bug#72814) * lisp/progmodes/java-ts-mode.el (java-ts-mode): Use the new 'java-ts-mode-enable-dodygen' option. * etc/NEWS: Document the change. --- etc/NEWS | 16 ++++++++ lisp/progmodes/c-ts-mode.el | 71 ++++++++++++++++++++-------------- lisp/progmodes/java-ts-mode.el | 35 +++++++++++------ 3 files changed, 83 insertions(+), 39 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index c6f8b0062e4..5762bc22c54 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -224,6 +224,22 @@ package of the current buffer. It is bound to 'C-c C-t p' in 'go-ts-mode'. The 'go-ts-mode-build-tags' user option is available to set a list of build tags for the test commands. +** C-ts mode + ++++ +*** New user option 'c-ts-mode-enable-doxygen'. +By default, 'c-ts-mode-enable-doxygen' is t, and doxygen comment blocks +are syntax-highlighted if the doxygen grammar is available. If Non-nil, +the comment blocks are highlighted like other comments. + +** Java-ts mode + ++++ +*** New user option 'java-ts-mode-enable-doxygen'. +By default, 'java-ts-mode-enable-doxygen' is t, and doxygen comment blocks +are syntax-highlighted if the doxygen grammar is available. If Non-nil, +the comment blocks are highlighted like other comments. + ** Emacs Lisp mode --- diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 7f23b30a88a..3adf5673e67 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -216,6 +216,17 @@ c-ts-mode-emacs-sources-support :safe 'booleanp :group 'c) +(defcustom c-ts-mode-enable-doxygen t + "Enable doxygen syntax highlighting. +If nil, disable doxygen based font lock for comment. +This needs to be set before enabling `c-ts-mode'; if you change +the value after enabling `c-ts-mode', toggle the mode off and on +again." + :version "31.1" + :type 'boolean + :safe 'booleanp + :group 'c) + ;;; Syntax table (defvar c-ts-mode--syntax-table @@ -1354,20 +1365,22 @@ c-ts-mode (treesit-font-lock-recompute-features '(emacs-devel))) ;; Inject doxygen parser for comment. - (when (treesit-ready-p 'doxygen t) - (setq-local treesit-primary-parser primary-parser) - (setq-local treesit-font-lock-settings - (append - treesit-font-lock-settings - c-ts-mode-doxygen-comment-font-lock-settings)) - (setq-local treesit-range-settings - (treesit-range-rules - :embed 'doxygen - :host 'c - :local t - `(((comment) @cap - (:match - ,c-ts-mode--doxygen-comment-regex @cap))))))))) + (when c-ts-mode-enable-doxygen + (if (not (treesit-ready-p 'doxygen t)) + (warn "Doxygen language grammar is unavailable, please install it.") + (setq-local treesit-primary-parser primary-parser) + (setq-local treesit-font-lock-settings + (append + treesit-font-lock-settings + c-ts-mode-doxygen-comment-font-lock-settings)) + (setq-local treesit-range-settings + (treesit-range-rules + :embed 'doxygen + :host 'c + :local t + `(((comment) @cap + (:match + ,c-ts-mode--doxygen-comment-regex @cap)))))))))) (derived-mode-add-parents 'c-ts-mode '(c-mode)) @@ -1415,20 +1428,22 @@ c++-ts-mode #'c-ts-mode--emacs-current-defun-name)) ;; Inject doxygen parser for comment. - (when (treesit-ready-p 'doxygen t) - (setq-local treesit-primary-parser primary-parser) - (setq-local treesit-font-lock-settings - (append - treesit-font-lock-settings - c-ts-mode-doxygen-comment-font-lock-settings)) - (setq-local treesit-range-settings - (treesit-range-rules - :embed 'doxygen - :host 'cpp - :local t - `(((comment) @cap - (:match - ,c-ts-mode--doxygen-comment-regex @cap))))))))) + (when c-ts-mode-enable-doxygen + (if (not (treesit-ready-p 'doxygen t)) + (warn "Doxygen language grammar is unavailable, please install it.") + (setq-local treesit-primary-parser primary-parser) + (setq-local treesit-font-lock-settings + (append + treesit-font-lock-settings + c-ts-mode-doxygen-comment-font-lock-settings)) + (setq-local treesit-range-settings + (treesit-range-rules + :embed 'doxygen + :host 'cpp + :local t + `(((comment) @cap + (:match + ,c-ts-mode--doxygen-comment-regex @cap)))))))))) (derived-mode-add-parents 'c++-ts-mode '(c++-mode)) diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index ac104534734..f12c7ec81ef 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@ -48,6 +48,17 @@ java-ts-mode-indent-offset :safe 'integerp :group 'java) +(defcustom java-ts-mode-enable-doxygen t + "Enable doxygen syntax highlighting. +If nil, disable doxygen based font lock for comment. +This needs to be set before enabling `java-ts-mode'; if you change +the value after enabling `java-ts-mode', toggle the mode off and on +again." + :version "31.1" + :type 'boolean + :safe 'booleanp + :group 'java) + (defvar java-ts-mode--syntax-table (let ((table (make-syntax-table))) ;; Taken from the cc-langs version @@ -401,17 +412,19 @@ java-ts-mode java-ts-mode--font-lock-settings) ;; Inject doxygen parser for comment. - (when (treesit-ready-p 'doxygen t) - (setq-local treesit-primary-parser primary-parser) - (setq-local treesit-font-lock-settings - (append treesit-font-lock-settings - c-ts-mode-doxygen-comment-font-lock-settings)) - (setq-local treesit-range-settings - (treesit-range-rules - :embed 'doxygen - :host 'java - :local t - `(((block_comment) @cap (:match "/\\*\\*" @cap))))))) + (when java-ts-mode-enable-doxygen + (if (not (treesit-ready-p 'doxygen t)) + (warn "Doxygen language grammar is unavailable, please install it.") + (setq-local treesit-primary-parser primary-parser) + (setq-local treesit-font-lock-settings + (append treesit-font-lock-settings + c-ts-mode-doxygen-comment-font-lock-settings)) + (setq-local treesit-range-settings + (treesit-range-rules + :embed 'doxygen + :host 'java + :local t + `(((block_comment) @cap (:match "/\\*\\*" @cap)))))))) (setq-local treesit-font-lock-feature-list java-ts-mode--feature-list) -- 2.46.0 --nextPart2712115.vuYhMxLoTh-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 11 00:54:59 2024 Received: (at 72814) by debbugs.gnu.org; 11 Sep 2024 04:54:59 +0000 Received: from localhost ([127.0.0.1]:37496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soFNa-00017Y-Pj for submit@debbugs.gnu.org; Wed, 11 Sep 2024 00:54:59 -0400 Received: from mail-pl1-f179.google.com ([209.85.214.179]:61847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soFNY-00017J-RE for 72814@debbugs.gnu.org; Wed, 11 Sep 2024 00:54:57 -0400 Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-20696938f86so52835515ad.3 for <72814@debbugs.gnu.org>; Tue, 10 Sep 2024 21:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726030425; x=1726635225; darn=debbugs.gnu.org; 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=tXgXrWBor5SressEpf66NO9bHbESvs/m+T0xWzaqPcg=; b=Qi5OzIWjzxl+Hc8yRMz1MKbh3g/DhwNbxXH4iydJ9xHx1VmbsEMbD6APJEYJ0EKdTM HhyxUDr8/ZYWfv93skxnvYqqIZDiBtY0Q6JnKU2BEFjlIGk5YJgkke8odRo7wrmzRT3N xWddoGFVdkBH6ioFjwoKrxj74V8gVswEVPOJzVfVWNZtgD4igSGlYBF1cPC0g3xItyqC 767PTErc37CagnPAXNHQwppXbvcNv2d67qZsNFTJ+5z2ldHO+CYj3UjdjUOs9CxtuRAr SJxrMPRHbhcFODXhJMwUABN/rAGFiW6HuJELS7iYEX6fQ5uuYM+30fOuS2r/9nZacKal uSEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726030425; x=1726635225; 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=tXgXrWBor5SressEpf66NO9bHbESvs/m+T0xWzaqPcg=; b=OEWZJnkLLA9fZdGyEmvLwQ0ZIqwsJMxEDOlwxtS2eToAJgoHiSnPfy4TfBaf9pk5RZ 7Au05HU/sTwe+R+RIdqChgCywmdyuxaqr//WfyxZpHsBjlUUtx7LhPkF73d8o3ivhM2x iqN4KW98VoKH3RWlOksMGKAurhlRk95S4/LloVy84l6K0AinXEKz2WgCTuNMR6N66VwA KlFDMe2eD5Xuj+VRUBN9gFhH+JMDlBR/SZMJX9DsCZUY9iBvcRDS52AyHFfXDW2X+H7R iFaQRL263PNVxlXwuMA2N4YRBkKSTKiSkyvKwXYEHFOYHhDW6pTfLQrup3cOGxTF9048 r5pA== X-Forwarded-Encrypted: i=1; AJvYcCVooMqsNITr9/kbvAg8qME8L0/Xdwn1sZiriIb4HUm44TwxhcUDGPSEpHAVadotO2n+xRFDnw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxDJuluh9iGRDC7dTeMidEC5bv9hGuAIHc3GE8oiW6vuRZgvh3n q7pNJMgZF2knk316r4cjbAh8ONYDWcdGqV7F0O4tzhKot62hPypv X-Google-Smtp-Source: AGHT+IG/V3o19ljX3yPbZLTZ/5Wm7XiIzORozlgU4aKT/0nexOw9vIVjOF54r8iRxg6KvwhH2+42TQ== X-Received: by 2002:a17:903:948:b0:205:6c25:fe12 with SMTP id d9443c01a7336-2074c61b41cmr49750355ad.34.1726030424931; Tue, 10 Sep 2024 21:53:44 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:a1a8:5602:237b:300d]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20710e123d1sm55963205ad.53.2024.09.10.21.53.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Sep 2024 21:53:44 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#72814: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? From: Yuan Fu In-Reply-To: <2150926.9o76ZdvQCi@fedora> Date: Tue, 10 Sep 2024 21:53:32 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <5EDA64BE-4612-4614-9CA4-D93BB30674A8@gmail.com> References: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> <86seuqi29z.fsf@gnu.org> <2150926.9o76ZdvQCi@fedora> To: Vincenzo Pupillo X-Mailer: Apple Mail (2.3776.700.51) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 72814 Cc: 72814@debbugs.gnu.org, Bug Report Emacs , Eli Zaretskii , vincenzo.pupillo@unimi.it 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 Sep 9, 2024, at 2:50=E2=80=AFAM, Vincenzo Pupillo = wrote: >=20 > In data marted=C3=AC 27 agosto 2024 14:22:16 CEST, Eli Zaretskii ha = scritto: >>> From: Yuan Fu >>> Date: Mon, 26 Aug 2024 20:13:52 -0700 >>> Cc: eliz@gnu.org, >>>=20 >>> vincenzo.pupillo@unimi.it >>>=20 >>> Yuan Fu writes: >>>> X-Debbugs-CC: eliz@gnu.org , >>>> vincenzo.pupillo@unimi.it >>>>=20 >>>> Should we add a custom option that controls whether to enable = doxygen >>>> support in c-ts-mode/c++-ts-mode/java-ts-mode? >>>>=20 >>>> Technically this isn=E2=80=99t a problem, since the doxygen support = is only >>>> enabled if there=E2=80=99s doxygen grammar on the system. But many = people >>>> (me) might install a grammar bundle that includes dozens of >>>> grammars for convenience. Then the doxygen support would turn on = when >>>> the user doesn=E2=80=99t really intend to use it. >>>>=20 >>>> I propose we add custom options like c-ts-mode-enable-doxygen and = set it >>>> to t by default, so the default behavior is still to enable doxygen >>>> support when the grammar for it exists, but people who don=E2=80=99t = want to pay >>>> for it can turn it off by setting the option to nil. >>>>=20 >>>> Yuan >>>=20 >>> Eli, WDYT? >>=20 >> I'm okay with such an option, but it should be careful to check >> whether the corresponding grammar library is available, and offer a >> user-friendly diagnostic if not. >=20 > Try to take a look at this patch. Is it okay? >=20 > Vincenzo > <0001-Add-a-user-option-to-disable-Doxygen-syntax-highligh.patch> Thanks for taking this up! I won=E2=80=99t signal a warning if doxygen = grammar isn=E2=80=99t found. Imagine a user without doxygen grammar, and = din=E2=80=99t change c-ts-mode-enable-doxygen: they=E2=80=99ll get a = warning whenever they open a C file. We should either set = c-ts-mode-enable-doxygen to nil by default, or not warn when doxygen = grammar doesn=E2=80=99t exist. Otherwise, the patch looks good to me. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 11 05:40:33 2024 Received: (at submit) by debbugs.gnu.org; 11 Sep 2024 09:40:33 +0000 Received: from localhost ([127.0.0.1]:37785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soJpw-0007PR-Nm for submit@debbugs.gnu.org; Wed, 11 Sep 2024 05:40:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:50252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soJpv-0007PK-5I for submit@debbugs.gnu.org; Wed, 11 Sep 2024 05:40:32 -0400 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 1soJpo-0004bn-BG for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 05:40:24 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soJpm-0006Kt-9z; Wed, 11 Sep 2024 05:40:23 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5becfd14353so6210128a12.1; Wed, 11 Sep 2024 02:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726047620; x=1726652420; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dOj68ytSos6VSEaOEmIHESX0TB7vmsqcMpBAZuTl8sE=; b=kh4rGxn9ZGjCvZoxt2i6vZqIGmMPb/jzllLNj1ZslsslmZNq/fiNLiM2ZNEG1As72E +PhQvpN6KpY4a0L4DI4Pa4qoaEEKxMS3tXqGI9e+UEqR+Xjlld+Drz4eV/LHIApEVhR3 mYCljRR0y8GN5vv5edqpN4cImG0ULBK1fsgCIdndAt1IiFKW3ZHx9rzmeIDblezQn+T4 rhu//4HddJOhhFAIJFuQ6HEMfgj2qbrjm1w5X+rI3mR4Zbh9LUZGkyvFpsZmc22W8ivf EqJdFva9jwrLSLlI/WWqMITyXZB6T5uPz8gxUQzfjxR2uRhNbgnyAbL/kf+nL3XLhBAj oxOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726047620; x=1726652420; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dOj68ytSos6VSEaOEmIHESX0TB7vmsqcMpBAZuTl8sE=; b=HnErAfcyOdybl0XasiotrWt8uAWm1FU1Im/lj9DYByZ9JEa2UfAHOA8UQT19I3GS72 CX9vepmJKXpq6lGv4U6EQ4V7dL7yvBndLK7WKvK+132ilMhE3ZC8Kg8eup2IpyjGtZWs sXua9Ftzx7GKRo5phoiqqcxoW2HLzmSf0o3rN4JqzRMAiwzq0fBUUI6cGPmjmLFsk5a+ pq2DRvRbr7avml/r1LnypZ6jplJf2cEVQak491IXHkN1Vj2MYAlXlXRAwHb1vnZkdvQG HXYL8KM/LovLgSLw0QX7OsQdLNVKi7/73vEUrsDHY/DdnsTStz4LJO9w7ol15ZuOLEUV Olhg== X-Forwarded-Encrypted: i=1; AJvYcCWGOnve8yA9/MiPlIM1VLXDpO2Sywl3EWTdx1W82cXFX5X1lRfNsSY9fEjqucUrhfRW6dLu@gnu.org X-Gm-Message-State: AOJu0Yw66GDBAThLo3nQ5T12uqU/NwS1snKqkHo5EMxx3rt167N2za38 URxoaFGdIkn85pQ5PaVYqimPB1B4xC/Hm3k2T6Q9jgxVQk8d9vSy X-Google-Smtp-Source: AGHT+IFXyv/fLDSmWzHav6JX68Sxe9JSk6XwO0d1ULV5jsZNMKTT3EXFTICODQJQtY8Vz+YRlCc+Ow== X-Received: by 2002:a05:6402:2115:b0:5c4:8ac:ff80 with SMTP id 4fb4d7f45d1cf-5c408ad0316mr3442772a12.33.1726047619403; Wed, 11 Sep 2024 02:40:19 -0700 (PDT) Received: from 3-191.divsi.unimi.it (3-191.divsi.unimi.it. [159.149.3.191]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c3ebd424dasm5265879a12.9.2024.09.11.02.40.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 02:40:18 -0700 (PDT) From: Vincenzo Pupillo To: Yuan Fu , Eli Zaretskii Subject: Re: bug#72814: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? Date: Wed, 11 Sep 2024 11:40:17 +0200 Message-ID: <26605291.1r3eYUQgxm@3-191.divsi.unimi.it> In-Reply-To: <5EDA64BE-4612-4614-9CA4-D93BB30674A8@gmail.com> References: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> <2150926.9o76ZdvQCi@fedora> <5EDA64BE-4612-4614-9CA4-D93BB30674A8@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=v.pupillo@gmail.com; helo=mail-ed1-x52f.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 72814@debbugs.gnu.org, Bug Report Emacs 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.3 (--) In data mercoled=C3=AC 11 settembre 2024 06:53:32 CEST, Yuan Fu ha scritto: >=20 > > On Sep 9, 2024, at 2:50=E2=80=AFAM, Vincenzo Pupillo wrote: > >=20 > > In data marted=C3=AC 27 agosto 2024 14:22:16 CEST, Eli Zaretskii ha scr= itto: > >>> From: Yuan Fu > >>> Date: Mon, 26 Aug 2024 20:13:52 -0700 > >>> Cc: eliz@gnu.org, > >>>=20 > >>> vincenzo.pupillo@unimi.it > >>>=20 > >>> Yuan Fu writes: > >>>> X-Debbugs-CC: eliz@gnu.org , > >>>> vincenzo.pupillo@unimi.it > >>>>=20 > >>>> Should we add a custom option that controls whether to enable doxygen > >>>> support in c-ts-mode/c++-ts-mode/java-ts-mode? > >>>>=20 > >>>> Technically this isn=E2=80=99t a problem, since the doxygen support = is only > >>>> enabled if there=E2=80=99s doxygen grammar on the system. But many p= eople > >>>> (me) might install a grammar bundle that includes dozens of > >>>> grammars for convenience. Then the doxygen support would turn on when > >>>> the user doesn=E2=80=99t really intend to use it. > >>>>=20 > >>>> I propose we add custom options like c-ts-mode-enable-doxygen and se= t it > >>>> to t by default, so the default behavior is still to enable doxygen > >>>> support when the grammar for it exists, but people who don=E2=80=99t= want to pay > >>>> for it can turn it off by setting the option to nil. > >>>>=20 > >>>> Yuan > >>>=20 > >>> Eli, WDYT? > >>=20 > >> I'm okay with such an option, but it should be careful to check > >> whether the corresponding grammar library is available, and offer a > >> user-friendly diagnostic if not. > >=20 > > Try to take a look at this patch. Is it okay? > >=20 > > Vincenzo > > <0001-Add-a-user-option-to-disable-Doxygen-syntax-highligh.patch> >=20 > Thanks for taking this up! I won=E2=80=99t signal a warning if doxygen gr= ammar isn=E2=80=99t found. Imagine a user without doxygen grammar, and din= =E2=80=99t change c-ts-mode-enable-doxygen: they=E2=80=99ll get a warning w= henever they open a C file.=20 > We should either set c-ts-mode-enable-doxygen to nil by default, or not w= arn when doxygen grammar doesn=E2=80=99t exist. Otherwise, the patch looks = good to me. Okay, fine. But Eli said something different... What do we do? Vincenzo >=20 > Yuan >=20 From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 11 08:05:31 2024 Received: (at submit) by debbugs.gnu.org; 11 Sep 2024 12:05:31 +0000 Received: from localhost ([127.0.0.1]:37888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soM6E-0006M2-SW for submit@debbugs.gnu.org; Wed, 11 Sep 2024 08:05:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:40844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soM6D-0006Lt-Eo for submit@debbugs.gnu.org; Wed, 11 Sep 2024 08:05:30 -0400 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 1soM66-0002N8-8j for bug-gnu-emacs@gnu.org; Wed, 11 Sep 2024 08:05:22 -0400 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 1soM60-0005Wc-QF; Wed, 11 Sep 2024 08:05:21 -0400 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=u+v8w0TrrkoeUBIBXOrxrZBvkRCMhgIUzjdQ9dW7urY=; b=DQiCZ81B79AhJjd0fviw yslAEMuXLFrV5Q7FpHZ853eH0+FSF13gsLniDSMlCFZ0euyNQVC7GnXVIFB7/3r7O/EaClF5nOWS8 zN00pNJNRwHvJtqpOL5i2mjk+gdaAgwo1qEce06AYnqFepd07+wfYgYXxmnqvxAZTSKIA0IXruF7W dp8WIg3sSr24vh8WmkdKrijwyQsmTZ6wOnjdpvBKM0kahTXOYsSVuoQ3SdtDFdgQW+nQwwr1J3wr1 +2fS86wlGtPYgNLhv+nLsTBj102lJAj6uT5VrwCoSLps/1v+D8TyXTRjowaKEijeyW7H9T7rn4TEE 4CUKzCKjO4xgAw==; Date: Wed, 11 Sep 2024 15:05:10 +0300 Message-Id: <867cbipf9l.fsf@gnu.org> From: Eli Zaretskii To: Vincenzo Pupillo In-Reply-To: <26605291.1r3eYUQgxm@3-191.divsi.unimi.it> (message from Vincenzo Pupillo on Wed, 11 Sep 2024 11:40:17 +0200) Subject: Re: bug#72814: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? References: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> <2150926.9o76ZdvQCi@fedora> <5EDA64BE-4612-4614-9CA4-D93BB30674A8@gmail.com> <26605291.1r3eYUQgxm@3-191.divsi.unimi.it> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: 72814@debbugs.gnu.org, casouri@gmail.com, bug-gnu-emacs@gnu.org 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: Vincenzo Pupillo > Cc: Bug Report Emacs , 72814@debbugs.gnu.org > Date: Wed, 11 Sep 2024 11:40:17 +0200 > > > Thanks for taking this up! I won’t signal a warning if doxygen grammar isn’t found. Imagine a user without doxygen grammar, and din’t change c-ts-mode-enable-doxygen: they’ll get a warning whenever they open a C file. > > We should either set c-ts-mode-enable-doxygen to nil by default, or not warn when doxygen grammar doesn’t exist. Otherwise, the patch looks good to me. > > Okay, fine. But Eli said something different... Not necessarily. All I said was "issue a user-friendly diagnostic". We could output the message into *Messages*, and do it only once per Emacs session. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 12 03:51:47 2024 Received: (at submit) by debbugs.gnu.org; 12 Sep 2024 07:51:47 +0000 Received: from localhost ([127.0.0.1]:40051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soecE-0000jE-O4 for submit@debbugs.gnu.org; Thu, 12 Sep 2024 03:51:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:50842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soecC-0000j5-QE for submit@debbugs.gnu.org; Thu, 12 Sep 2024 03:51:45 -0400 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 1soec4-0005mf-5y for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 03:51:36 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soec2-0002ik-6j; Thu, 12 Sep 2024 03:51:35 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2057835395aso7751385ad.3; Thu, 12 Sep 2024 00:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726127492; x=1726732292; darn=gnu.org; 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=U+QWrpRWaZqrPT58Lgyp6QdNEfVlMW82xib1u0PbojU=; b=FgWoCS+ohl1DwKpkxA1WaAtICCgIdyyiN3Nyr+BwoDkmbUB+01K1l9RAVwkzbK07e2 wBwHP0hmnOQqOlyIL1J1jJzG9g+m0/xfqC7w7uDCWHNV7F4e5cyO84OSx+d6N1mAObtK UzBQkilDIid4bqTO/3XfxZo64sgKVdauHNxFg72NDlZTuu4AvAkUtkgeRLsymC1rcPZX XIC+R9y/6Kb+yeKuqhd97ox776slTHm+u67h++s/tyEhiWnENBf8kYdNreWhKEnNttV+ KeQj0U79RSrsQ+OxFtUHlgJa32T+xZWGXWgTAhgTczadR/8yiEIvXfyINOf7WRwcAGVO 0CxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726127492; x=1726732292; 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=U+QWrpRWaZqrPT58Lgyp6QdNEfVlMW82xib1u0PbojU=; b=OfTlNmRd4lFADFMW9sx8bcCtikaaanK7+QelTpeMd+kxufIA4RUQOwAxGf/v5PLzyZ ofPiSGpxJw1t2VZG3Gnxl16otc9gTyG9iEjTil+fRrizH3YKDlKYaSOT4kTYywshyGEE hFp2furJKzmVPj+adgip2yUhbc3w3VIuidPi2EeEnhxThQUVp+xm1fL1GjZMjKyXETqt s5OCBWyAYOPIeBIJgDi3mrDf0ZDeql+eKmDOFD8+XrShO4UbIdbEbwj4FKYa2F8Pql6l 0L+tWdKghL0yxL7Ga+D5+byHM4bEuTGoYH52hmye6Cygtl50poTf+PkZ+Gyc7+3Cpdzi JMsA== X-Forwarded-Encrypted: i=1; AJvYcCWfV9Nk0XjK4EY7iG8q2KjqIVsyop7VlXFGbaQHehS8DwMUafTraZ7YsZHzWGbG9kMUw4XphGljzeNOvaIk@gnu.org X-Gm-Message-State: AOJu0YzuyN+BApZt6BQ7qqh4vLGVuE6w7mxSS0/6jg+PUuCWDKkB3poP MCaYYyGIWT8GYOguCtTWFFmkamoAtve6/Brmdndfsbne3uvY5rCkv+su4w== X-Google-Smtp-Source: AGHT+IEnaW5T/0EwlnkND6I4MuPyC4ubsc75ANLjGpXVd/V3OmlfHoo5vU2FIw2bgG2IIX7wdQI4MA== X-Received: by 2002:a17:903:22c3:b0:206:bbaa:84e9 with SMTP id d9443c01a7336-2076e3eaadfmr30732195ad.47.1726127491748; Thu, 12 Sep 2024 00:51:31 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:5922:91:f01d:e306]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2076afe9ea2sm9720305ad.233.2024.09.12.00.51.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Sep 2024 00:51:31 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#72814: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? From: Yuan Fu In-Reply-To: <867cbipf9l.fsf@gnu.org> Date: Thu, 12 Sep 2024 00:51:20 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <2AD1D9D4-8F89-4FCC-B4A9-E53CC6D8AB11@gmail.com> References: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> <2150926.9o76ZdvQCi@fedora> <5EDA64BE-4612-4614-9CA4-D93BB30674A8@gmail.com> <26605291.1r3eYUQgxm@3-191.divsi.unimi.it> <867cbipf9l.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3776.700.51) Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=casouri@gmail.com; helo=mail-pl1-x635.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 72814@debbugs.gnu.org, Bug Report Emacs , Vincenzo Pupillo 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.3 (--) > On Sep 11, 2024, at 5:05=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Vincenzo Pupillo >> Cc: Bug Report Emacs , 72814@debbugs.gnu.org >> Date: Wed, 11 Sep 2024 11:40:17 +0200 >>=20 >>> Thanks for taking this up! I won=E2=80=99t signal a warning if = doxygen grammar isn=E2=80=99t found. Imagine a user without doxygen = grammar, and din=E2=80=99t change c-ts-mode-enable-doxygen: they=E2=80=99l= l get a warning whenever they open a C file.=20 >>> We should either set c-ts-mode-enable-doxygen to nil by default, or = not warn when doxygen grammar doesn=E2=80=99t exist. Otherwise, the = patch looks good to me. >>=20 >> Okay, fine. But Eli said something different... >=20 > Not necessarily. All I said was "issue a user-friendly diagnostic". > We could output the message into *Messages*, and do it only once per > Emacs session. Another idea: use tertiary value for c-ts-mode-enable-doxygen, t for = enable (and issue warning if doxygen isn=E2=80=99t present), nil for = enable if doxygen exists but don=E2=80=99t issue any warning, = =E2=80=98disabled for disable. (I don=E2=80=99t think there=E2=80=99s a = convention for the three values of tertiary toggle, is that right Eli?) Yuan= From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 12 04:32:32 2024 Received: (at submit) by debbugs.gnu.org; 12 Sep 2024 08:32:32 +0000 Received: from localhost ([127.0.0.1]:40109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sofFf-0002sK-Le for submit@debbugs.gnu.org; Thu, 12 Sep 2024 04:32:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:46904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sofFd-0002sD-Vz for submit@debbugs.gnu.org; Thu, 12 Sep 2024 04:32:30 -0400 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 1sofFV-00062G-27 for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2024 04:32:22 -0400 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 1sofFT-0007HW-7D; Thu, 12 Sep 2024 04:32:20 -0400 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=VDPjH+4or4jjxJrpgXTxQWyYQLbWaLEvE1syWWFfNEE=; b=awEobi5lAEGN1I3kgafp kTfoIHY2Sl66fmDdtbiXy1iqCPAan6AHEDeFLFZ3QDYCRgXyZzKymYduFMgZU0f2DPpvKu1hMBFPU YJZyg1sTnA9wElmjRvpcOwUSxliRL9MfAiemvd/7kRCvv73QhRLx72jGdIRkvyuJeR9rz0/36irhT 7gsI8jp6Nup4/jzRdSi2zrHf7iV8DjpNmSmDuv1xPGFnHkeo32I9sv6Iwh9tbPnAS6Lma/9WoqNx4 HImYG/SbD+wcWk9p4Tetyz7K0CyiMe+PTB1GXFjzJJhssSE/lIDOZGiy1BDxptGl8deAeuLlWet5h g/zg+NgbDNStyw==; Date: Thu, 12 Sep 2024 11:31:56 +0300 Message-Id: <86ed5pff2b.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <2AD1D9D4-8F89-4FCC-B4A9-E53CC6D8AB11@gmail.com> (message from Yuan Fu on Thu, 12 Sep 2024 00:51:20 -0700) Subject: Re: bug#72814: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? References: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> <2150926.9o76ZdvQCi@fedora> <5EDA64BE-4612-4614-9CA4-D93BB30674A8@gmail.com> <26605291.1r3eYUQgxm@3-191.divsi.unimi.it> <867cbipf9l.fsf@gnu.org> <2AD1D9D4-8F89-4FCC-B4A9-E53CC6D8AB11@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: submit Cc: 72814@debbugs.gnu.org, bug-gnu-emacs@gnu.org, v.pupillo@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: Yuan Fu > Date: Thu, 12 Sep 2024 00:51:20 -0700 > Cc: Vincenzo Pupillo , > Bug Report Emacs , > 72814@debbugs.gnu.org > > > > > On Sep 11, 2024, at 5:05 AM, Eli Zaretskii wrote: > > > >> From: Vincenzo Pupillo > >> Cc: Bug Report Emacs , 72814@debbugs.gnu.org > >> Date: Wed, 11 Sep 2024 11:40:17 +0200 > >> > >>> Thanks for taking this up! I won’t signal a warning if doxygen grammar isn’t found. Imagine a user without doxygen grammar, and din’t change c-ts-mode-enable-doxygen: they’ll get a warning whenever they open a C file. > >>> We should either set c-ts-mode-enable-doxygen to nil by default, or not warn when doxygen grammar doesn’t exist. Otherwise, the patch looks good to me. > >> > >> Okay, fine. But Eli said something different... > > > > Not necessarily. All I said was "issue a user-friendly diagnostic". > > We could output the message into *Messages*, and do it only once per > > Emacs session. > > Another idea: use tertiary value for c-ts-mode-enable-doxygen, t for enable (and issue warning if doxygen isn’t present), nil for enable if doxygen exists but don’t issue any warning, ‘disabled for disable. (I don’t think there’s a convention for the three values of tertiary toggle, is that right Eli?) That could also be OK, but I prefer something that does TRT by default. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 14 13:26:30 2024 Received: (at submit) by debbugs.gnu.org; 14 Sep 2024 17:26:30 +0000 Received: from localhost ([127.0.0.1]:47749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spWXV-0003uw-PQ for submit@debbugs.gnu.org; Sat, 14 Sep 2024 13:26:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:37940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spWXQ-0003ui-Uf for submit@debbugs.gnu.org; Sat, 14 Sep 2024 13:26:27 -0400 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 1spWXF-0004HX-Tp for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 13:26:13 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1spWXD-0007kh-Uq; Sat, 14 Sep 2024 13:26:13 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a8d4979b843so429145766b.3; Sat, 14 Sep 2024 10:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726334769; x=1726939569; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Wd1TRFdSt9X24VGvWVW8MdTc9qPaIWZ+iUdgCiBXTO8=; b=DzQJdfOYeTYlQiqH7ChjCDDBN01RFnkO0J7hT2DoslGMeVBMnIRtKyh6sz5yrFBIlj YtE5NJEz9MDC1olWI6Wk8e9nBbPHVwX5ndNQdc9Fq6hdg1Dgbnv0dLSoOUTJLRJ/d1n9 4vDzwaWLYXcJiVNHYg7tbOyzDSKVpAtdOGcq6YiaGh4pdWZbB5ZgcLl1SbrSa0Gaat/J UFQeVF31o3xsEZXs8bQFYr1TqpwKkmnXJQMdVLDrc3BzHRcgSavsODjLJK24GHuaE0Gs nmcJ+Yt42HjfN6ce6NbKhv3uswHoVOkdpTu8oT4uQIu92GSJKgbgR/TBBN4LyZhT+xuu 4++A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726334769; x=1726939569; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wd1TRFdSt9X24VGvWVW8MdTc9qPaIWZ+iUdgCiBXTO8=; b=jmu1GkQdXfJ3xre52ydHQBwHFWtCccuK287uOGulsO+mhiOW5s51Eg0MkOcz6nhArp xKJdtUrgm8LZ7zwNm0ASUDWkDBPR5+bFZDeVwRmLNnAAb4W3VQPY07gF+SZrxQaUtNik mBOus0BDhIPXjJt7xeK5FAmm4fhlamGGe+DZ4tG2pozAXZ4HOgmVVW3EK9Gc6CNWE0Rp ipboeM1dg/e2RjY0T2+ooq+gyLmKvUqC35G91ymCxf/WWyOeiDeKrdHAU9SKa9aIMHNb KZkLXvcNw46yu/dV9DdPt5uViq6exAUibhPbkXdEFAKi2aMvwyGQzp+t46gcdqdY+gmH QcnA== X-Forwarded-Encrypted: i=1; AJvYcCVj1EU8AaIXD7Vev6viHt6VP7ZfFNNYTio+rmrkNSKwYBs+qMGQdSY/B+jar/fB/FyqVJdr@gnu.org X-Gm-Message-State: AOJu0YwT5CRBRBBbcCxIkgs6M3Z8fRZJsyQnoH1OKSzR80NGi2a05veL gzhiGUnijLuV47CthmbjkqB8ARmfDqS7xwHEdOomExtn0ckFKwEOt+Mzxu3P X-Google-Smtp-Source: AGHT+IG2azCbW0sc7wj5jqRBryiyP+81Wr1fCZ5+KB2G+kxZUehJcnzAcE2KeU9olkYocZFQpb0Gzw== X-Received: by 2002:a17:907:97c8:b0:a7a:8c55:6b2 with SMTP id a640c23a62f3a-a902946e6b8mr1054596066b.14.1726334768965; Sat, 14 Sep 2024 10:26:08 -0700 (PDT) Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90610f453asm102308966b.88.2024.09.14.10.26.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Sep 2024 10:26:08 -0700 (PDT) From: Vincenzo Pupillo To: Yuan Fu , Eli Zaretskii Subject: Re: bug#72814: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? Date: Sat, 14 Sep 2024 19:26:07 +0200 Message-ID: <26625715.1r3eYUQgxm@fedora> In-Reply-To: <86ed5pff2b.fsf@gnu.org> References: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> <2AD1D9D4-8F89-4FCC-B4A9-E53CC6D8AB11@gmail.com> <86ed5pff2b.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2335227.vFx2qVVIhK" Content-Transfer-Encoding: 7Bit Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=v.pupillo@gmail.com; helo=mail-ej1-x62f.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 72814@debbugs.gnu.org, bug-gnu-emacs@gnu.org 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.3 (--) This is a multi-part message in MIME format. --nextPart2335227.vFx2qVVIhK Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In data gioved=C3=AC 12 settembre 2024 10:31:56 CEST, Eli Zaretskii ha scri= tto: > > From: Yuan Fu > > Date: Thu, 12 Sep 2024 00:51:20 -0700 > > Cc: Vincenzo Pupillo , > >=20 > > Bug Report Emacs , > > 72814@debbugs.gnu.org > > =20 > > > On Sep 11, 2024, at 5:05=E2=80=AFAM, Eli Zaretskii wro= te: > > >> From: Vincenzo Pupillo > > >> Cc: Bug Report Emacs , 72814@debbugs.gnu.org > > >> Date: Wed, 11 Sep 2024 11:40:17 +0200 > > >>=20 > > >>> Thanks for taking this up! I won=E2=80=99t signal a warning if doxy= gen grammar > > >>> isn=E2=80=99t found. Imagine a user without doxygen grammar, and di= n=E2=80=99t change > > >>> c-ts-mode-enable-doxygen: they=E2=80=99ll get a warning whenever th= ey open a > > >>> C file. We should either set c-ts-mode-enable-doxygen to nil by > > >>> default, or not warn when doxygen grammar doesn=E2=80=99t exist. Ot= herwise, > > >>> the patch looks good to me.> >>=20 > > >> Okay, fine. But Eli said something different... > > >=20 > > > Not necessarily. All I said was "issue a user-friendly diagnostic". > > > We could output the message into *Messages*, and do it only once per > > > Emacs session. > >=20 > > Another idea: use tertiary value for c-ts-mode-enable-doxygen, t for > > enable (and issue warning if doxygen isn=E2=80=99t present), nil for en= able if > > doxygen exists but don=E2=80=99t issue any warning, =E2=80=98disabled f= or disable. (I > > don=E2=80=99t think there=E2=80=99s a convention for the three values o= f tertiary toggle, > > is that right Eli?) > That could also be OK, but I prefer something that does TRT by > default. Ciao, in this new version of the patch, as default, the *-ts-mode-enable-doxygen = are=20 set to nil, and issue a diagnostic (one per session) when Not-nil and if th= e =20 grammar isn't present. It is OK? Vincenzo --nextPart2335227.vFx2qVVIhK Content-Disposition: attachment; filename="0001-Add-a-user-option-to-enable-Doxygen-syntax-highlight.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0001-Add-a-user-option-to-enable-Doxygen-syntax-highlight.patch" >From 71de6870d6b341e09fa6c79e38ca73e60fda8805 Mon Sep 17 00:00:00 2001 From: Vincenzo Pupillo Date: Mon, 9 Sep 2024 09:20:42 +0200 Subject: [PATCH] Add a user option to enable Doxygen syntax highlighting (bug#72814). Both 'c-ts-mode' and 'java-ts-mode' have a new user option, 'c-ts-mode-enable-doxygen' and 'java-ts-mode-enable-doxygen' (defaults to nil) which allow to enable syntax highlighting of comment blocks based on the Doxygen grammar. * lisp/progmodes/c-ts-mode.el: Add the 'c-ts-mode-enable-doxygen' user option variable to disable doxygen grammar. (bug#72814) Notifies the user if doxygen grammar is not available. * lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Use the new 'c-ts-mode-enable-doxygen' option. * lisp/progmodes/java-ts-mode.el: Add the 'java-ts-mode-enable-doxygen' user option variable to disable doxygen grammar. (bug#72814) Notifies the user if doxygen grammar is not available. * lisp/progmodes/java-ts-mode.el (java-ts-mode): Use the new 'java-ts-mode-enable-doxygen' option. * etc/NEWS: Document the change. --- etc/NEWS | 16 ++++++++++++++++ lisp/progmodes/c-ts-mode.el | 20 +++++++++++++++++--- lisp/progmodes/java-ts-mode.el | 18 ++++++++++++++++-- 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index c6f8b0062e4..8de4f886d67 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -224,6 +224,22 @@ package of the current buffer. It is bound to 'C-c C-t p' in 'go-ts-mode'. The 'go-ts-mode-build-tags' user option is available to set a list of build tags for the test commands. +** C-ts mode + ++++ +*** New user option 'c-ts-mode-enable-doxygen'. +By default, 'c-ts-mode-enable-doxygen' is nil, and the comment blocks +are highlighted like other comments. When Non-nil doxygen comment +blocks are syntax-highlighted if the doxygen grammar is available. + +** Java-ts mode + ++++ +*** New user option 'java-ts-mode-enable-doxygen'. +By default, 'java-ts-mode-enable-doxygen' is nil, and the comment blocks +are highlighted like other comments. When Non-nil doxygen comment +blocks are syntax-highlighted if the doxygen grammar is available. + ** Emacs Lisp mode --- diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 7f23b30a88a..10fa3bc3bb3 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -65,7 +65,7 @@ ;; libraries installed. ;; ;; If the tree-sitter doxygen grammar is available, then the comment -;; blocks will be highlighted according to this grammar. +;; blocks can be highlighted according to this grammar. ;;; Code: @@ -216,6 +216,17 @@ c-ts-mode-emacs-sources-support :safe 'booleanp :group 'c) +(defcustom c-ts-mode-enable-doxygen nil + "Enable doxygen syntax highlighting. +If Non-nil, enable doxygen based font lock for comment blocks. +This needs to be set before enabling `c-ts-mode'; if you change +the value after enabling `c-ts-mode', toggle the mode off and on +again." + :version "31.1" + :type 'boolean + :safe 'booleanp + :group 'c) + ;;; Syntax table (defvar c-ts-mode--syntax-table @@ -1354,7 +1365,7 @@ c-ts-mode (treesit-font-lock-recompute-features '(emacs-devel))) ;; Inject doxygen parser for comment. - (when (treesit-ready-p 'doxygen t) + (when (and c-ts-mode-enable-doxygen (treesit-ready-p 'doxygen t)) (setq-local treesit-primary-parser primary-parser) (setq-local treesit-font-lock-settings (append @@ -1415,7 +1426,7 @@ c++-ts-mode #'c-ts-mode--emacs-current-defun-name)) ;; Inject doxygen parser for comment. - (when (treesit-ready-p 'doxygen t) + (when (and c-ts-mode-enable-doxygen (treesit-ready-p 'doxygen t)) (setq-local treesit-primary-parser primary-parser) (setq-local treesit-font-lock-settings (append @@ -1527,6 +1538,9 @@ c-or-c++-ts-mode (treesit-ready-p 'c)) (add-to-list 'major-mode-remap-defaults '(c-or-c++-mode . c-or-c++-ts-mode))) +(when (and c-ts-mode-enable-doxygen (not (treesit-ready-p 'doxygen t))) + (message "Doxygen syntax highlighting can't be enabled, please install the language grammar.")) + (provide 'c-ts-mode) (provide 'c++-ts-mode) diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index ac104534734..177f914160c 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@ -25,7 +25,7 @@ ;;; Commentary: ;; ;; If the tree-sitter doxygen grammar is available, then the comment -;; blocks will be highlighted according to this grammar. +;; blocks can be highlighted according to this grammar. ;;; Code: @@ -48,6 +48,17 @@ java-ts-mode-indent-offset :safe 'integerp :group 'java) +(defcustom java-ts-mode-enable-doxygen nil + "Enable doxygen syntax highlighting. +If Non-nil, enable doxygen based font lock for comment blocks. +This needs to be set before enabling `java-ts-mode'; if you change +the value after enabling `java-ts-mode', toggle the mode off and on +again." + :version "31.1" + :type 'boolean + :safe 'booleanp + :group 'java) + (defvar java-ts-mode--syntax-table (let ((table (make-syntax-table))) ;; Taken from the cc-langs version @@ -401,7 +412,7 @@ java-ts-mode java-ts-mode--font-lock-settings) ;; Inject doxygen parser for comment. - (when (treesit-ready-p 'doxygen t) + (when (and java-ts-mode-enable-doxygen (treesit-ready-p 'doxygen t)) (setq-local treesit-primary-parser primary-parser) (setq-local treesit-font-lock-settings (append treesit-font-lock-settings @@ -428,6 +439,9 @@ java-ts-mode (if (treesit-ready-p 'java) (add-to-list 'auto-mode-alist '("\\.java\\'" . java-ts-mode))) +(when (and java-ts-mode-enable-doxygen (not (treesit-ready-p 'doxygen t))) + (message "Doxygen syntax highlighting can't be enabled, please install the language grammar.")) + (provide 'java-ts-mode) ;;; java-ts-mode.el ends here -- 2.46.0 --nextPart2335227.vFx2qVVIhK-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 21 05:44:05 2024 Received: (at submit) by debbugs.gnu.org; 21 Sep 2024 09:44:05 +0000 Received: from localhost ([127.0.0.1]:37193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srwer-0003YZ-HM for submit@debbugs.gnu.org; Sat, 21 Sep 2024 05:44:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:50720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srweq-0003YS-Ao for submit@debbugs.gnu.org; Sat, 21 Sep 2024 05:44:04 -0400 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 1srweW-00026w-2s for bug-gnu-emacs@gnu.org; Sat, 21 Sep 2024 05:43:44 -0400 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 1srweV-0000Xv-My; Sat, 21 Sep 2024 05:43:43 -0400 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=7uEWcyXXMbX9XvZLdUponBl6MJjQvUCcQZTNaf2HeTE=; b=PtF551LBJM4qWygBLl8J 664ay22xRy67562uMoHpNXRTmNoSdjzWtaU7d5tUS6mWt57NaiClrWYd2jMVB/4SX8FqVW95Pb074 5f0vU3AEf6wFb1DCaJxtAe/55HD6z3oy+25qct9jfut71G5A4PpkS0UNjB+CB/RUqhpux6BqXtC8p d2mqAA5udbwVRhUELjWfkJyq175hePkQKxSUteM6uFgMjqUkjv5jRainCBqdkr3Yt5N6n6RkeT/f/ 05FNWO4wMEKN8ayn+Kx0BwvbCgFF9DQWRyAu1wzRNoFI10SnhQ2uuWB4NCLm0f7PFWVvtRIKdNTmI g4PNQqo8aAAMUg==; Date: Sat, 21 Sep 2024 12:43:40 +0300 Message-Id: <86ikup4a0j.fsf@gnu.org> From: Eli Zaretskii To: Vincenzo Pupillo In-Reply-To: <26625715.1r3eYUQgxm@fedora> (message from Vincenzo Pupillo on Sat, 14 Sep 2024 19:26:07 +0200) Subject: Re: bug#72814: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? References: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> <2AD1D9D4-8F89-4FCC-B4A9-E53CC6D8AB11@gmail.com> <86ed5pff2b.fsf@gnu.org> <26625715.1r3eYUQgxm@fedora> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: casouri@gmail.com, 72814-done@debbugs.gnu.org, bug-gnu-emacs@gnu.org 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: Vincenzo Pupillo > Cc: bug-gnu-emacs@gnu.org, 72814@debbugs.gnu.org > Date: Sat, 14 Sep 2024 19:26:07 +0200 > > > > Another idea: use tertiary value for c-ts-mode-enable-doxygen, t for > > > enable (and issue warning if doxygen isn’t present), nil for enable if > > > doxygen exists but don’t issue any warning, ‘disabled for disable. (I > > > don’t think there’s a convention for the three values of tertiary toggle, > > > is that right Eli?) > > That could also be OK, but I prefer something that does TRT by > > default. > > Ciao, > in this new version of the patch, as default, the *-ts-mode-enable-doxygen are > set to nil, and issue a diagnostic (one per session) when Not-nil and if the > grammar isn't present. It is OK? Thanks, installed on master, and closing the bug. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 22 02:45:52 2024 Received: (at submit) by debbugs.gnu.org; 22 Sep 2024 06:45:52 +0000 Received: from localhost ([127.0.0.1]:40732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssGLv-00062e-V3 for submit@debbugs.gnu.org; Sun, 22 Sep 2024 02:45:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:44982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ssGLt-00062V-Jj for submit@debbugs.gnu.org; Sun, 22 Sep 2024 02:45:50 -0400 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 1ssGLS-0007Mk-0R for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2024 02:45:27 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssGLQ-0003ZD-CQ; Sun, 22 Sep 2024 02:45:21 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-2053a0bd0a6so33579765ad.3; Sat, 21 Sep 2024 23:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726987516; x=1727592316; darn=gnu.org; 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=Z7fm9svkiUMh3Lv4s+yyUWJiS+ciw3p32aLsAoWg3TU=; b=fBYyUaGCv+ZO+PyHbOC7FGVqLkCm+RegjGl95eF24VXQj1xfWr42Kh2Rbe2yfwtscw Vu1JHCWcGSYSSpr4/1UF9R8rdym61OcNAXeJb8NC4dwTW25S8XSzF2ehs0/Jdyb8CaXC 6ODOR1wUPNmQiVJWxswy5JukCHtq5EQc5WjviQ+N4EaY0OrzzVBHnXryUXhTquEN/7TI vs4FrnddO4ddaLP6nb8r9MmVP3DU4nd4u6B2M0zmuNkBRMD6ch3eG5CNdREzvhb9nueS 5C6FPHN1iJZ4rIZ9pS7eoP2DyfdTN7S3Ki2S/1dPX1yMKe3tJGoXpm3qvSbRuKLXroaD eJKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726987516; x=1727592316; 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=Z7fm9svkiUMh3Lv4s+yyUWJiS+ciw3p32aLsAoWg3TU=; b=NBPUquYqRYx+OHjwnghgD/0s6IVzzaJm0g/6ppXNUDkHDytu+Fojo62a2Zz3Uv5Jga mWO7fLUM8rVjwCZbwi9Cms04PAwgXDwt1f4SMMbRD8h7EK9W0DOw7TBMqV8NkLFPsbLX Fg0AwNtwA64cg6RvJ1R1cxmvZmZutHFzczNg2UH1SxIwf8xcaUYjN3Pw+vFx4YzmH7Ja yxPf9fTvLH+d50nY9QMEFsKSIiq+vMe0jnucA9gfqvt9lHqD7QlSRFqfFkoo0gshul2v 0LQ/v4NXbiiyqH+J11dnnOXMja4kUZ4CqMkZZy1hk7FV7cH96gEa5+LikIzHPKS3Wgef /TWQ== X-Forwarded-Encrypted: i=1; AJvYcCUfUIwBI6KBkbsE0XLfUA/cBo3sK0VIrD68i2pq9GEnlrkFT5rjLQ3mJNVVCn7gYRKZ7P938dGiuw92YgwC@gnu.org X-Gm-Message-State: AOJu0Yw/kXPpQ1iDu98GSxME7CK+CkTjm5/4fr3IjNchFTf3SWdKEvRK xyjFOMVINGHf0fSsSBPs1dLTyBKGPRf7UFyj0KmYhikoONoR2Kp/LavXLA== X-Google-Smtp-Source: AGHT+IFO3iiW04tRJkywQM8n66PDIKp50SG5QAFQr/snT4S5pR3jNqWWf4XH1lVVu0dvlgj9EDigcQ== X-Received: by 2002:a17:902:e54e:b0:205:894b:b5b0 with SMTP id d9443c01a7336-208d83a1cabmr120008185ad.33.1726987516238; Sat, 21 Sep 2024 23:45:16 -0700 (PDT) Received: from smtpclient.apple ([2601:646:8f81:6120:b925:297e:910c:4115]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20794735810sm115947795ad.278.2024.09.21.23.45.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Sep 2024 23:45:15 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: bug#72814: 31.0.50; Add a variable controlling doxygen support in C/C++/Java? From: Yuan Fu In-Reply-To: <86ikup4a0j.fsf@gnu.org> Date: Sat, 21 Sep 2024 23:45:05 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <5BEE6727-B7BF-4A7B-9FCF-B9A54A62BC08@gmail.com> References: <0708616B-CCE4-4AA5-81FA-FF41F2789018@gmail.com> <2AD1D9D4-8F89-4FCC-B4A9-E53CC6D8AB11@gmail.com> <86ed5pff2b.fsf@gnu.org> <26625715.1r3eYUQgxm@fedora> <86ikup4a0j.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3776.700.51) Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=casouri@gmail.com; helo=mail-pl1-x62b.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Bug Report Emacs , Vincenzo Pupillo , 72814-done@debbugs.gnu.org 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.3 (--) > On Sep 21, 2024, at 2:43=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Vincenzo Pupillo >> Cc: bug-gnu-emacs@gnu.org, 72814@debbugs.gnu.org >> Date: Sat, 14 Sep 2024 19:26:07 +0200 >>=20 >>>> Another idea: use tertiary value for c-ts-mode-enable-doxygen, t = for >>>> enable (and issue warning if doxygen isn=E2=80=99t present), nil = for enable if >>>> doxygen exists but don=E2=80=99t issue any warning, =E2=80=98disabled= for disable. (I >>>> don=E2=80=99t think there=E2=80=99s a convention for the three = values of tertiary toggle, >>>> is that right Eli?) >>> That could also be OK, but I prefer something that does TRT by >>> default. >>=20 >> Ciao, >> in this new version of the patch, as default, the = *-ts-mode-enable-doxygen are=20 >> set to nil, and issue a diagnostic (one per session) when Not-nil and = if the =20 >> grammar isn't present. It is OK? >=20 > Thanks, installed on master, and closing the bug. Thanks to you both! From unknown Fri Jun 20 07:29:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 20 Oct 2024 11:24:06 +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