From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#29959: cc-mode: wrong indentation in absence of semicolon Date: Sat, 13 Jan 2018 14:11:31 +0300 Message-ID: <8a042ba1-301c-8943-1381-537cba8a2334@yandex.ru> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1515841822 16722 195.159.176.226 (13 Jan 2018 11:10:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 13 Jan 2018 11:10:22 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 To: 29959@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 13 12:10:17 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eaJhS-0003hS-TR for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Jan 2018 12:10:11 +0100 Original-Received: from localhost ([::1]:58236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eaJjS-0007nP-Kn for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Jan 2018 06:12:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eaJjL-0007nB-D1 for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2018 06:12:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eaJjK-0004Fu-6t for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2018 06:12:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46483) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eaJjG-0004Al-GX; Sat, 13 Jan 2018 06:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eaJjG-0008Du-8c; Sat, 13 Jan 2018 06:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 13 Jan 2018 11:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29959 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.151584190931592 (code B ref -1); Sat, 13 Jan 2018 11:12:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Jan 2018 11:11:49 +0000 Original-Received: from localhost ([127.0.0.1]:54380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eaJj3-0008DT-Aj for submit@debbugs.gnu.org; Sat, 13 Jan 2018 06:11:49 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eaJj1-0008DE-UT for submit@debbugs.gnu.org; Sat, 13 Jan 2018 06:11:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eaJiv-0003kM-G1 for submit@debbugs.gnu.org; Sat, 13 Jan 2018 06:11:42 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:39127) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eaJiv-0003kF-C3 for submit@debbugs.gnu.org; Sat, 13 Jan 2018 06:11:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eaJit-0007hr-Pd for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2018 06:11:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eaJiq-0003gw-HY for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2018 06:11:39 -0500 Original-Received: from forward100o.mail.yandex.net ([37.140.190.180]:34455) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eaJiq-0003f6-12 for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2018 06:11:36 -0500 Original-Received: from mxback18j.mail.yandex.net (mxback18j.mail.yandex.net [IPv6:2a02:6b8:0:1619::94]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 8BA7A2A21534 for ; Sat, 13 Jan 2018 14:11:32 +0300 (MSK) Original-Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback18j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id yVB2RGvC8l-BWPGBCKk; Sat, 13 Jan 2018 14:11:32 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1515841892; bh=763SKLw8Jcgg+/lkwfijDG+2YLVT1JVIcjrQjSRpehQ=; h=Subject:From:To:References:Message-ID:Date:In-Reply-To; b=Xg3plhHVasB2atD6BWX8kc/7ezWGN+BGV3oT/mVfkd+sVeZ88m/p9GQLBON1FUreE kmYaQcs4HDSOaC8boI1k1gys5vaaXYGsmNz2o+H52I5AQAZQPOAYD3Dl1bMOSnJ443 xqtgAl0IARRM0nj4tel9/yhkRUznFhWdBgnlqxtc= Original-Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id QQPpP2Z6Zw-BVx8ZF3k; Sat, 13 Jan 2018 14:11:31 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1515841891; bh=763SKLw8Jcgg+/lkwfijDG+2YLVT1JVIcjrQjSRpehQ=; h=Subject:From:To:References:Message-ID:Date:In-Reply-To; b=APDZlNKrJ+FPvAurIAqEjXd4cL7Znz2823jwpmO8tEMWEVyYwUoMtSwVzbkWNc/U6 hSDOc05PVdB9Ap+jriKHsyWznh8oI8P6ayFOEgx2DcZErajuwCWKKKQCEYh45kVA6I AZUhZqA3WEH/WQ8mXmVeH2MFNjHa9wS3Mjx7STG0= Authentication-Results: smtp3o.mail.yandex.net; dkim=pass header.i=@yandex.ru In-Reply-To: Content-Language: ru-RU X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142118 Archived-At: Just tested with current git, the problem is still present. I am almost sure this is a regression, I don't remember having that=20 problem before. The real-world consequences are just too annoying for it=20 to go unnoticed =E2=80=94 basically, every time I'm typing variables inde= ntation=20 just doesn't work. And I also seem to remember a few irrelevant=20 situations where I was typing conditions with the like results. On 03.01.2018 09:02, Konstantin Kharlamov wrote: > # Steps to reproduce: > 1. Open emacs -Q test.c > 2. Write the following: >=20 > int main() { > =C2=A0=C2=A0=C2=A0 int a, > } >=20 > 3. put the caret after the comma symbol, and press enter, e.g. to > continue writing variables on the new line. >=20 > # Expected: > the new line alignment stands out with regard to the prev. line. >=20 > # Actual: > the new line aligned to the beginning of the prev. line. >=20 > # Workarounds: > Typing the following text: >=20 > int main() { > =C2=A0=C2=A0=C2=A0 int a,; > } >=20 > =E2=80=A6then pressing enter right after the comma works as expected. >=20 > ------------ >=20 > In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.2= 6) > =C2=A0of 2017-12-15 built on constantine-N61Ja > Repository revision: 6c301afa70f6eac32ad1ce92412ea3cf6fcdeeca > Windowing system distributor 'The X.Org Foundation', version 11.0.11906= 000 > System Description: Arch Linux >=20 > Recent messages: > For information about GNU Emacs and the GNU system, type C-h C-a. >=20 > Configured using: > =C2=A0'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/u= sr/lib > =C2=A0--localstatedir=3D/var --mandir=3D/usr/share/man --with-gameuser= =3D:games > =C2=A0--with-sound=3Dalsa --with-xft --with-modules --with-x-toolkit=3D= gtk3 > =C2=A0--without-gconf --without-gsettings --without-gpm --without-m17n= -flt > =C2=A0--without-imagemagick 'CFLAGS=3D-flto=3D2 -march=3Dnative -O3 -p= ipe > =C2=A0-fno-stack-protector -fweb -fno-semantic-interposition > =C2=A0-fmerge-all-constants' 'LDFLAGS=3D-flto=3D2 -O3 -march=3Dnative = -fweb > =C2=A0-fno-semantic-interposition -fmerge-all-constants -floop-nest-op= timize > =C2=A0-Wl,--sort-common,-z,relro -fuse-ld=3Dgold'' >=20 > Configured features: > XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 FREETYP= E > LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES LIBSYSTEMD JSON > LCMS2 >=20 > Important settings: > =C2=A0 value of $LC_CTYPE: ru_RU.UTF-8 > =C2=A0 value of $LC_TIME: ru_RU.UTF-8 > =C2=A0 value of $LANG: en_US.UTF-8 > =C2=A0 value of $XMODIFIERS: @im=3Dnone > =C2=A0 locale-coding-system: utf-8-unix >=20 > Major mode: Lisp Interaction >=20 > Minor modes in effect: > =C2=A0 tooltip-mode: t > =C2=A0 global-eldoc-mode: t > =C2=A0 eldoc-mode: t > =C2=A0 electric-indent-mode: t > =C2=A0 mouse-wheel-mode: t > =C2=A0 tool-bar-mode: t > =C2=A0 menu-bar-mode: t > =C2=A0 file-name-shadow-mode: t > =C2=A0 global-font-lock-mode: t > =C2=A0 font-lock-mode: t > =C2=A0 blink-cursor-mode: t > =C2=A0 auto-composition-mode: t > =C2=A0 auto-encryption-mode: t > =C2=A0 auto-compression-mode: t > =C2=A0 line-number-mode: t > =C2=A0 transient-mark-mode: t >=20 > Load-path shadows: > None found. >=20 > Features: > (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv > bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs > format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg > epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode > mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 > rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date > mule-util cyril-util tooltip eldoc electric uniquify ediff-hook vc-hook= s > lisp-float-type 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 elisp-mode lisp-mode prog-mode register page menu-bar > rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock > syntax facemenu font-core term/tty-colors frame cl-generic cham georgia= n > 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 charscript charprop > case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer > cl-preloaded nadvice loaddefs button faces cus-face macroexp files > text-properties overlay sha1 md5 base64 format env code-pages mule > custom widget hashtable-print-readable backquote dbusbind inotify lcms2 > dynamic-setting font-render-setting move-toolbar gtk x-toolkit x > multi-tty make-network-process emacs) >=20 > Memory information: > ((conses 16 95121 11339) > =C2=A0(symbols 48 20190 1) > =C2=A0(miscs 40 48 119) > =C2=A0(strings 32 28421 1060) > =C2=A0(string-bytes 1 750170) > =C2=A0(vectors 16 14089) > =C2=A0(vector-slots 8 494084 10026) > =C2=A0(floats 8 49 212) > =C2=A0(intervals 56 239 0) > =C2=A0(buffers 992 11))