unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57042: 28.1.91; c-mode autoindents cweb style lines
@ 2022-08-07 16:16 Van Ly
  2022-08-07 16:31 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Van Ly @ 2022-08-07 16:16 UTC (permalink / raw)
  To: 57042

[-- 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))

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-08  3:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-07 16:16 bug#57042: 28.1.91; c-mode autoindents cweb style lines Van Ly
2022-08-07 16:31 ` Eli Zaretskii
2022-08-07 18:12   ` Van Ly
2022-08-07 21:58     ` Lars Ingebrigtsen
2022-08-08  3:50       ` Van Ly

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).