From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Platon Pronko <platon7pronko@gmail.com>
Newsgroups: gmane.emacs.bugs
Subject: bug#68111: 30.0.50; backward-kill-word too eager in cc-mode
Date: Fri, 29 Dec 2023 21:23:54 +0500
Message-ID: <ea32455e-4b81-472a-9ee6-28bda3518dcd@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="19262"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Mozilla Thunderbird
To: 68111@debbugs.gnu.org
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 29 17:25:20 2023
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1rJFfj-0004pR-SB
	for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Dec 2023 17:25:19 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1rJFfU-0005th-Dr; Fri, 29 Dec 2023 11:25:04 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1rJFfS-0005tU-Hk
 for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 11:25:02 -0500
Original-Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1rJFfS-0007oD-1z
 for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 11:25:02 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rJFfR-0005J3-VG
 for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 11:25:01 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Platon Pronko <platon7pronko@gmail.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Fri, 29 Dec 2023 16:25:01 +0000
Resent-Message-ID: <handler.68111.B.170386705420332@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 68111
X-GNU-PR-Package: emacs
X-Debbugs-Original-To: bug-gnu-emacs@gnu.org
Original-Received: via spool by submit@debbugs.gnu.org id=B.170386705420332
 (code B ref -1); Fri, 29 Dec 2023 16:25:01 +0000
Original-Received: (at submit) by debbugs.gnu.org; 29 Dec 2023 16:24:14 +0000
Original-Received: from localhost ([127.0.0.1]:42088 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1rJFef-0005Hq-80
 for submit@debbugs.gnu.org; Fri, 29 Dec 2023 11:24:13 -0500
Original-Received: from lists.gnu.org ([2001:470:142::17]:37642)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <platon7pronko@gmail.com>) id 1rJFec-0005Hd-OW
 for submit@debbugs.gnu.org; Fri, 29 Dec 2023 11:24:11 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <platon7pronko@gmail.com>)
 id 1rJFeX-0005oT-8Z
 for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 11:24:05 -0500
Original-Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <platon7pronko@gmail.com>)
 id 1rJFeU-00066U-5R
 for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2023 11:24:05 -0500
Original-Received: by mail-lf1-x12d.google.com with SMTP id
 2adb3069b0e04-50e7ddd999bso3989290e87.1
 for <bug-gnu-emacs@gnu.org>; Fri, 29 Dec 2023 08:24:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1703867040; x=1704471840; darn=gnu.org;
 h=content-transfer-encoding:subject:from:to:content-language
 :user-agent:mime-version:date:message-id:from:to:cc:subject:date
 :message-id:reply-to;
 bh=RxZD2aZTjEAt6t3kxbY4aB90VDLtAJIKrd+y13FJjOc=;
 b=R3iS4cH/ro4f5pR8GKrS97hMecLYsRszrLfZAVuF6Hmr7mB0fHXqbTZMJKOMYjRYWh
 auki/sZS4hPZMskV77GdkmHJmZxMYaQsTwys/bWDtB8jMElxN0giUIAlOp4aSfiGNxYT
 PE67d931UkoL4wpFafowwYPaxTe3gTL+5s6pSbqMrKNlvFU0DrCK3okfZjqKyQUH3JIX
 w6v9l4MDw6Ex1CR5SPi+xgDQj90Hj/M72tDx7cUOsLthTSietU1g8faZJ18d9S3PkvX+
 26MzBDYO63XUVtpGgcLQWoydHgish/t7ktz3e3P76lxYZ8v6r3YLhZsnF9p+CbVXSv9d
 td9g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1703867040; x=1704471840;
 h=content-transfer-encoding:subject:from:to:content-language
 :user-agent:mime-version:date:message-id:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=RxZD2aZTjEAt6t3kxbY4aB90VDLtAJIKrd+y13FJjOc=;
 b=XZxJsjiLX6f+fb9mkvauo5dxFwmmUxIEXU/q+SAmftB1yqsWCZaTlLvgSA3y4JSA69
 +ogX8rPGhlZV67oKIUCaAu48U+ArqwA2rmgD+XaqXdOEFKsIvjONvmGcOS+XqeUbR4JB
 euvj7jJ9YJKOxPW3cmDImr679v3acGn0HHP5ofvvtHrRQ4i4HqC/pDdRRU3JHtwUtGNu
 0bBUyZzNGDiF45qSkoUwTvenotDveGJSp5T3sbUcRzbqVztwKCvsPNYvdR+SlAOOCzFu
 ZT5xH3HR5Ja/F1sV2vE8vRNwB76XCN6MZ/GFlHRgTsqxhXWOBtEOtilrKlZnM96IFbj4
 R/ww==
X-Gm-Message-State: AOJu0YyDHeF2IP2t2KXduXK2z1DtZH0blwjibr9NGtEnZlPjJP59H8pL
 cq7Hoj96YOZ5pOroVYbewy5kfDqBo34=
X-Google-Smtp-Source: AGHT+IHRplvdcFnnYS3wiicr6akp/bYCtw+sj0gOXteqVbxtZDzVnUZvDwxFAMLWYMVJcXbj57ByBw==
X-Received: by 2002:a05:6512:131c:b0:50e:80dc:e77d with SMTP id
 x28-20020a056512131c00b0050e80dce77dmr4108089lfu.37.1703867039512; 
 Fri, 29 Dec 2023 08:23:59 -0800 (PST)
Original-Received: from [192.168.0.200] ([82.215.116.146])
 by smtp.gmail.com with ESMTPSA id
 d21-20020ac25455000000b0050e7ee56355sm1315788lfn.23.2023.12.29.08.23.58
 for <bug-gnu-emacs@gnu.org>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 29 Dec 2023 08:23:58 -0800 (PST)
Content-Language: en-US
Received-SPF: pass client-ip=2a00:1450:4864:20::12d;
 envelope-from=platon7pronko@gmail.com; helo=mail-lf1-x12d.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-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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.emacs.bugs:277024
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/277024>

In cc-mode (C lang files) calling backward-kill-word seems to be too eager. For example, given the following file and cursor position:

```
int main() {
   printf("alpha beta gamma<cursor>
}
```

calling backward-kill-word results in

```
int main() {
   <cursor>
}
```

while the expected result is probably:

```
int main() {
   printf("alpha beta <cursor>
}
```

It seems that this is a regression in commit dae8aab52874441a70a94435d50f25b27301d9b0, by Alan Mackenzie on 2023-06-21.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
  3.24.39, cairo version 1.18.0) of 2023-12-29 built on the-big-maker
Repository revision: ea3d211f3f7ecc5b59d5affc1aed812a2ded62b0
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101010
System Description: Arch Linux

Configured using:
  'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
  --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
  --with-modules --without-m17n-flt --without-gconf
  --with-native-compilation=no --with-xinput2 --with-x-toolkit=gtk3
  --without-xaw3d --with-sound=no --with-tree-sitter --without-gpm
  --without-compress-install
  '--program-transform-name=s/\([ec]tags\)/\1.emacs/'
  'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions
  -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
  -fstack-clash-protection -fcf-protection'
  LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11
XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
   value of $LC_TIME: en_SE.UTF-8
   value of $LANG: en_US.UTF-8
   locale-coding-system: utf-8-unix

Major mode: C/*l

Minor modes in effect:
   rainbow-delimiters-mode: t
   global-git-gutter-mode: t
   global-git-commit-mode: t
   magit-auto-revert-mode: t
   counsel-mode: t
   ivy-mode: t
   global-whitespace-mode: t
   whitespace-mode: t
   global-dvorak-mode: t
   dvorak-minor-mode: t
   global-auto-revert-mode: t
   global-so-long-mode: t
   tooltip-mode: t
   global-eldoc-mode: t
   show-paren-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   minibuffer-regexp-mode: t
   column-number-mode: t
   line-number-mode: t
   transient-mark-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   abbrev-mode: t

Load-path shadows:
/home/platon/.emacs.d/elpa/lispy-20230314.1738/elpa hides /home/platon/.emacs.d/elpa/ivy-20231025.2311/elpa
/home/platon/.emacs.d/elpa/transient-20231216.1908/transient hides /usr/share/emacs/30.0.50/lisp/transient
/home/platon/.emacs.d/elpa/less-css-mode-20161001.453/less-css-mode hides /usr/share/emacs/30.0.50/lisp/textmodes/less-css-mode

Features:
(shadow sort mail-extr emacsbug smartparens-c cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
rainbow-delimiters ol-w3m ol-rmail ol-mhe ol-irc ol-info org-habit
org-agenda org-element org-persist org-id avl-tree org-refile ol-gnus
nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig
gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud
nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range
gnus-win ol-eww eww url-queue shr pixel-fill kinsoku url-file svg xml
dom mm-url gnus nnheader range ol-docview doc-view jka-compr image-mode
exif ol-bibtex bibtex ol-bbdb ucs-normalize dabbrev lispy lispy-inline
avy etags fileloop generator edebug debug backtrace help-fns radix-tree
lispy-tags mode-local zoutline tramp trampver tramp-integration files-x
tramp-message tramp-compat parse-time iso8601 tramp-loaddefs lpr
smartparens-rust rust-utils rust-mode rust-rustfmt rust-playpen
rust-compile rust-cargo flymake warnings lsp-pyright lsp lsp-mode
lsp-protocol tree-widget wid-edit spinner network-stream nsm
smartparens-markdown markdown-mode inline ht f s ewoc company-box
company-box-doc frame-local company-box-icons company git-gutter-fringe
fringe-helper git-gutter magit-submodule magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
which-func imenu magit-diff smerge-mode diff diff-mode git-commit
log-edit message sendmail yank-media puny rfc822 mml mml-sec epa derived
epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr
mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core
magit-autorevert magit-margin magit-transient magit-process with-editor
shell server magit-mode transient magit-git magit-base magit-section
cursor-sensor crm compat org-archive smartparens-org org ob ob-tangle
ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete
pcomplete org-list org-footnote org-faces org-entities time-date
noutline outline icons ob-emacs-lisp ob-core ob-eval org-cycle org-table
ol org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu
calendar cal-loaddefs org-version org-compat org-macs counsel xdg xref
project dired dired-loaddefs compile text-property-search comint
ansi-osc ansi-color swiper ivy delsel ivy-faces ivy-overlay colir color
cl-extra hydra ring lv rx format-spec edmacro kmacro smartparens-config
smartparens-text smartparens advice loadhist thingatpt dash disp-table
whitespace quail help-mode easy-mmode darcula-theme autorevert
filenotify so-long finder-inf company-box-autoloads company-autoloads
counsel-autoloads editorconfig-autoloads frame-local-autoloads
git-gutter-autoloads go-mode-autoloads haskell-mode-autoloads
helm-bibtex-autoloads helm-autoloads bibtex-completion-autoloads
biblio-autoloads biblio-core-autoloads helm-core-autoloads
async-autoloads ivy-hydra-autoloads lispy-autoloads hydra-autoloads
ace-window-autoloads avy-autoloads literate-calc-mode-autoloads
lorem-ipsum-autoloads lsp-pyright-autoloads lsp-mode-autoloads
ht-autoloads f-autoloads magit-autoloads pcase git-commit-autoloads
magit-section-autoloads markdown-mode-autoloads parsebib-autoloads
php-mode-autoloads popup-autoloads rust-mode-autoloads s-autoloads
scala-mode-autoloads smartparens-autoloads dash-autoloads
solidity-mode-autoloads swiper-autoloads ivy-autoloads
transient-autoloads typescript-mode-autoloads web-mode-autoloads
wfnames-autoloads wgrep-autoloads with-editor-autoloads info
compat-autoloads yaml-mode-autoloads package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen 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 nadvice seq simple cl-generic indonesian philippine
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 abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process emacs)

Memory information:
((conses 16 746092 348433) (symbols 48 49727 15) (strings 32 214140 26823) (string-bytes 1 6389877) (vectors 16 112049)
  (vector-slots 8 1195403 232516) (floats 8 483 1044) (intervals 56 766 228) (buffers 992 12))