From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57042: 28.1.91; c-mode autoindents cweb style lines Date: Sun, 07 Aug 2022 19:31:11 +0300 Message-ID: <83r11svwvk.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2943"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57042@debbugs.gnu.org To: Van Ly Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 07 18:32:29 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 1oKjCW-0000d0-J0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Aug 2022 18:32:28 +0200 Original-Received: from localhost ([::1]:56688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKjCV-0004nO-Ib for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Aug 2022 12:32:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKjC6-0004mf-VS for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 12:32:12 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oKjC6-0002F6-EZ for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 12:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oKjC6-0000iX-9u for bug-gnu-emacs@gnu.org; Sun, 07 Aug 2022 12:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Aug 2022 16:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57042 X-GNU-PR-Package: emacs Original-Received: via spool by 57042-submit@debbugs.gnu.org id=B57042.16598898962721 (code B ref 57042); Sun, 07 Aug 2022 16:32:02 +0000 Original-Received: (at 57042) by debbugs.gnu.org; 7 Aug 2022 16:31:36 +0000 Original-Received: from localhost ([127.0.0.1]:38220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKjBg-0000hp-0o for submit@debbugs.gnu.org; Sun, 07 Aug 2022 12:31:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oKjBe-0000hd-BO for 57042@debbugs.gnu.org; Sun, 07 Aug 2022 12:31:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57784) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKjBW-00025e-Ru; Sun, 07 Aug 2022 12:31:26 -0400 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=0zXUEiECJmKBzmoXwnEZ/WEe59c/UfCSlpnrMkbtobU=; b=DJ/CKVwDY0qp vmdslDTRQWQjszg/PzlYCxy8ibuHcvRNsBNEBRRR0Dpx9DROxgtJfZlesbttKXkOVUz60k23EFL81 DlbS2fdXcc5ajaWs8f2r9ECle8gkfHgRxvYeyDz7Fh7FYh2j4e4soANSlTuoS0zzkiOrjxxsPyQqT e4fqUH5dKD0ZhEUVLGZxVwos0ayrr+tNgxmTWCyJH3XuId/9qI46GpRUovOx2rmwVQE7OZ8GSlFoM 5wYVmVPX4u6Yjx5+joliB99oLpvrJIlepKA9QwkKsSe2MLcnawpcoqvnLXYTPtwBEsRJwDB/Ps61o EWtQ9UO70Z1cVKqRqLrrxA==; Original-Received: from [87.69.77.57] (port=2770 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 1oKjBW-0005Gw-79; Sun, 07 Aug 2022 12:31:26 -0400 In-Reply-To: (message from Van Ly on Sun, 7 Aug 2022 16:16:31 +0000 (UTC)) 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" Xref: news.gmane.io gmane.emacs.bugs:239079 Archived-At: > Date: Sun, 7 Aug 2022 16:16:31 +0000 (UTC) > From: Van Ly > > C Mode autoindents CWEB style lines undesirably. > > Steps to reproduce > . starting from 'emacs -Q' > . open new file 'C-x f /dev/shm/explain.w' > . enable mode for C 'M-x c-mode' > . enter the C CWEB style source text below > . Explanation} > the last two lines autoindent but I expect them to be without > . at line 6 below at # position c-set-offset reports 'cpp-macro' > . at line 0 below at # position c-set-offset reports 'cpp-macro' > > Expected result is for lines 6, F and 0 below to be without indent. > > ``` > 1 @** Convert 511 decimal to octal. > 2 @d _x_number_x_ 511 > 3 @d _x_banner_x_ "What is the value of %d in octal?" > 4 @c > 5 #include > 6 #include "u.h" > 7 int@/ > 8 main(void)@/ > 9 { > A int n = _x_number_x_; > B printf (_x_banner_x_, n); > C printf ("%s! %d decimal is %o octal\n", "Right", n, n); > D } > E @ @(u.h@>= > F @h > 0 #include > ``` Sorry, I don't understand: why do you expect C Mode to DTRT for CWEB files? The above is not valid C code, it's a different language that needs a dedicated major mode.