From: Van Ly <van.ly@sdf.org>
To: 57042@debbugs.gnu.org
Subject: bug#57042: 28.1.91; c-mode autoindents cweb style lines
Date: Sun, 7 Aug 2022 16:16:31 +0000 (UTC) [thread overview]
Message-ID: <f0e6cd3a-5d2f-53e8-6d69-de1d2a5dd3f@SDF.ORG> (raw)
[-- Attachment #1: Type: text/plain, Size: 887 bytes --]
Hello,
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 <stdio.h>
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 <stdlib.h>
```
--
vl
[-- Attachment #2: generated details for bug report --]
[-- Type: text/plain, Size: 3264 bytes --]
In GNU Emacs 28.1.91 (build 1, aarch64-unknown-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
of 2022-08-08 built on charlie
Repository revision: 059ab47a0664012b4d8cf8cc36b7d8a28b80c614
Repository branch: main
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB
Important settings:
value of $LC_ALL: en_AU.UTF-8
value of $LANG: en_AU.UTF-8
locale-coding-system: utf-8-unix
Major mode: C/*l
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
abbrev-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils time-date subr-x bookmark
text-property-search pp seq byte-opt gv bytecomp byte-compile cconv
tutorial vc-git diff-mode easy-mmode vc-dispatcher view dired-aux dired
dired-loaddefs help-fns radix-tree help-mode cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 92389 4478)
(symbols 48 9389 1)
(strings 32 29591 1471)
(string-bytes 1 1078473)
(vectors 16 18973)
(vector-slots 8 239472 9959)
(floats 8 28 46)
(intervals 56 1556 0)
(buffers 992 21))
next reply other threads:[~2022-08-07 16:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-07 16:16 Van Ly [this message]
2022-08-07 16:31 ` bug#57042: 28.1.91; c-mode autoindents cweb style lines Eli Zaretskii
2022-08-07 18:12 ` Van Ly
2022-08-07 21:58 ` Lars Ingebrigtsen
2022-08-08 3:50 ` Van Ly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f0e6cd3a-5d2f-53e8-6d69-de1d2a5dd3f@SDF.ORG \
--to=van.ly@sdf.org \
--cc=57042@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.