From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 04 16:14:41 2021 Received: (at submit) by debbugs.gnu.org; 4 Jun 2021 20:14:41 +0000 Received: from localhost ([127.0.0.1]:47934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpGDI-0000A5-MG for submit@debbugs.gnu.org; Fri, 04 Jun 2021 16:14:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:40906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpGCi-000099-3I for submit@debbugs.gnu.org; Fri, 04 Jun 2021 16:14:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpGCh-0002Aj-Qr for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2021 16:14:03 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:46661) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpGCf-0006QQ-27 for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2021 16:14:03 -0400 Received: by mail-wm1-x32c.google.com with SMTP id h22-20020a05600c3516b02901a826f84095so1267301wmq.5 for ; Fri, 04 Jun 2021 13:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=reservoir-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=X76/PTNGu/BIp/C71o6L4vb3Y4k1xArAzFKcZs/JMyg=; b=u0VOBaf3VHydzWyGPpTxMr9cuAhG9qWxVeaZ423h2KR4jIEU9bO1KCuhsAzkn8IZ6d 9S4gXtJ8e105jHX4Q2OJBThjYrx0+a6j5ypBjyWWiWnudUYQ7IINkgi3hEmrZzmrwt98 M7s4MVmBLERpWK4VJEDFJppfsDFXpPRXg9cBUz0RUqbaMbYaHUK4u+YXYdDU5Pcf3oDx sK4A23gapFu5RFKrSKk7GyoMFx9U5pKeCYi3+0meXOyOUsRiD4rob4FKYMgzRYaauOfJ dU6cCFqVMspPj6Gjq/vqBNCdeQHTAo+MpDzVYHFE+zuK4HayAseiNyaaEtcSrGg3P+av nOIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=X76/PTNGu/BIp/C71o6L4vb3Y4k1xArAzFKcZs/JMyg=; b=tbQ+GrWyvEri5KIafCh/39YxKj974JlgCPX0tvS3nj3uJ9JxsuEsNUBry4RJLv7dtY JdmUqKKMlNYdQiyjNVfZqKSaq7p/fIACsn138ZHnZkVZWWUHsLP1O2Hpjck1SBgw8e5T qXRB9QflCBVnFyaNdabU76vzulcb7z232wP4G0RPjcc1w0yuNNzHUWTI92GtzX/VJFl7 g/U6cfC/ritI31MMJauYkNZfExMKAKU2XjfpRe7e3cWhjZalS90nUCf6lOB1xhIOvl5B EcL/mlGC+Wt+bLAkGlvsfEIl9kOtGK8tLtsdyIImrOqNbDGZHZ1H53ZIEpsNR1rYBi+V iNXg== X-Gm-Message-State: AOAM533dCPiVe9Y/ZJfHwzcULedcQzOUh8kOztKO/ZDidM1kubsROl2g BA2oEz0HI6U0GZhXSU1LpBah6ynSBKhUmXsGfRb7FGlyiF0bEg== X-Google-Smtp-Source: ABdhPJw3L3mLvO3xJf983rbW+YqePaiLIJ+Cl0tPVYpjK7FdBgoXgEecrwpTgCBW3fR3BeI+65Umm/KgJsktbmuLkmU= X-Received: by 2002:a1c:23d6:: with SMTP id j205mr5398360wmj.94.1622837637866; Fri, 04 Jun 2021 13:13:57 -0700 (PDT) MIME-Version: 1.0 From: "John C. Ruttenberg" Date: Fri, 4 Jun 2021 16:13:47 -0400 Message-ID: Subject: Interaction between completion-moide and cc-mode new in 27.2 To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000eef97405c3f6542c" Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=ruttenberg@reservoir.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 04 Jun 2021 16:14:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --000000000000eef97405c3f6542c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This bug occurs in 27.2 but not in 26.3 In a clean emacs "emacs -q --no-site-file": 1. Enable dynamic completion "(dynamic-completion-mode)" 2. Open a c++ source file 3. Text should be: foo() { std::cerr < int i =3D static_cast(z); } 4. Position the cursor directly after the "<" and type "< " (two characters "<" " " 5. I get this error message: "Scan error: containing expression ends prematurely, 22, 22" In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) of 2021-06-02 built on catb Windowing system distributor 'AT&T Laboratories Cambridge', version 11.0.3332 System Description: Ubuntu 20.04.2 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Loading completions from file /home/ruttenberg/.emacs.d/completions . . . Loading completions from file /home/ruttenberg/.emacs.d/completions . . . Done. You can run the command =C3=A2=E2=82=AC=CB=9Cdynamic-completion-mode=C3=A2= =E2=82=AC=E2=84=A2 with M-x dy-m RET Loading completions from file /home/ruttenberg/.emacs.d/completions . . . Done. Error in pre-command-hook (completion-before-command): (scan-error "Containing expression ends prematurely" 16 16) symbol-before-point: Scan error: "Containing expression ends prematurely", 17, 17 Configured using: 'configure --prefix=3D/opt/emacs-27.2' Configured features: XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: C++//l Minor modes in effect: dynamic-completion-mode: t tooltip-mode: t global-eldoc-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 transient-mark-mode: t abbrev-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib cus-start cus-load completion tooltip eldoc electric uniquify ediff-hook vc-hooks 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 tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu 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 charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 threads dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 76735 9686) (symbols 48 9655 1) (strings 32 23478 2066) (string-bytes 1 843632) (vectors 16 13035) (vector-slots 8 166467 11092) (floats 8 22 45) (intervals 56 208 3) (buffers 1000 14)) --000000000000eef97405c3f6542c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This bug occurs in 27.2 but not in 26.3

In a clean emacs "emacs -q --no-site-file":
1. Enable = dynamic completion "(dynamic-completion-mode)"
2. Open = a c++ source file
3. Text should be:
foo() {
=C2=A0 std:= :cerr <
=C2=A0 int i =3D static_cast<unsigned>(z);
=
}
=C2=A0 =C2=A04. Position the cursor directly = after the "<" and type "< " (two characters=C2=A0= "<" " "
=C2=A0 =C2=A05. I get this err= or message: "Scan error: containing expression ends prematurely, 22, 2= 2"



In GNU Emacs 27.2 (build 1, x86_64-pc-linux-g= nu, GTK+ Version 3.24.20)
=C2=A0of 2021-06-02 built on catb
Windowing= system distributor 'AT&T Laboratories Cambridge', version 11.0= .3332
System Description: Ubuntu 20.04.2 LTS

Recent messages:
= For information about GNU Emacs and the GNU system, type C-h C-a.
Loadin= g completions from file /home/ruttenberg/.emacs.d/completions . . .
Load= ing completions from file /home/ruttenberg/.emacs.d/completions . . . Done.=
You can run the command =C3=A2=E2=82=AC=CB=9Cdynamic-completion-mode=C3= =A2=E2=82=AC=E2=84=A2 with M-x dy-m RET
Loading completions from file /h= ome/ruttenberg/.emacs.d/completions . . . Done.
Error in pre-command-hoo= k (completion-before-command): (scan-error "Containing expression ends= prematurely" 16 16)
symbol-before-point: Scan error: "Contain= ing expression ends prematurely", 17, 17
Configured using:
=C2= =A0'configure --prefix=3D/opt/emacs-27.2'

Configured feature= s:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
LIB= SELINUX GNUTLS FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK3
X11 X= DBE XIM MODULES THREADS PDUMPER GMP

Important settings:
=C2=A0 va= lue of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix
Major mode: C++//l

Minor modes in effect:
=C2=A0 dynamic-complet= ion-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2= =A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-ba= r-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-encryptio= n-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t<= br>=C2=A0 transient-mark-mode: t
=C2=A0 abbrev-mode: t

Load-path = shadows:
None found.

Features:
(shadow sort mail-extr emacsbug= message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec pa= ssword-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs t= ext-property-search time-date subr-x seq
byte-opt gv bytecomp byte-compi= le cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm= -utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr= mail-utils cc-mode cc-fonts
easymenu cc-guess cc-menus cc-cmds cc-style= s cc-align cc-engine cc-vars
cc-defs cl-loaddefs cl-lib cus-start cus-lo= ad completion tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-f= loat-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fon= tset image regexp-opt fringe
tabulated-list replace newcomment text-mode= elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshad= ow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facem= enu font-core
term/tty-colors frame minibuffer cl-generic cham georgian = utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanes= e eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic = indian
cyrillic chinese composite charscript charprop case-table epa-hoo= k
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs=
button faces cus-face macroexp files text-properties overlay sha1 md5base64 format env code-pages mule custom widget hashtable-print-readable<= br>backquote threads dbusbind inotify dynamic-setting system-font-settingfont-render-setting move-toolbar gtk x-toolkit x multi-tty
make-networ= k-process emacs)

Memory information:
((conses 16 76735 9686)
= =C2=A0(symbols 48 9655 1)
=C2=A0(strings 32 23478 2066)
=C2=A0(string= -bytes 1 843632)
=C2=A0(vectors 16 13035)
=C2=A0(vector-slots 8 16646= 7 11092)
=C2=A0(floats 8 22 45)
=C2=A0(intervals 56 208 3)
=C2=A0(= buffers 1000 14))
--000000000000eef97405c3f6542c-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 20 14:43:43 2021 Received: (at 48837) by debbugs.gnu.org; 20 Jun 2021 18:43:43 +0000 Received: from localhost ([127.0.0.1]:34893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lv2Q2-0003jq-Ou for submit@debbugs.gnu.org; Sun, 20 Jun 2021 14:43:43 -0400 Received: from colin.muc.de ([193.149.48.1]:50301 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lv2Q0-0003jc-Ig for 48837@debbugs.gnu.org; Sun, 20 Jun 2021 14:43:41 -0400 Received: (qmail 44031 invoked by uid 3782); 20 Jun 2021 18:43:33 -0000 Received: from acm.muc.de (p2e5d544b.dip0.t-ipconnect.de [46.93.84.75]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 20 Jun 2021 20:43:33 +0200 Received: (qmail 7823 invoked by uid 1000); 20 Jun 2021 18:43:33 -0000 Date: Sun, 20 Jun 2021 18:43:33 +0000 To: "John C. Ruttenberg" Subject: Re: bug#48837: Interaction between completion-moide and cc-mode new in 27.2 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48837 Cc: acm@muc.de, 48837@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, John. Thanks for taking the trouble to report this bug, and thanks even more for cutting the test case down to an easy to work with minimum. On Fri, Jun 04, 2021 at 16:13:47 -0400, John C. Ruttenberg wrote: > This bug occurs in 27.2 but not in 26.3 > In a clean emacs "emacs -q --no-site-file": > 1. Enable dynamic completion "(dynamic-completion-mode)" > 2. Open a c++ source file > 3. Text should be: > foo() { > std::cerr < > int i = static_cast(z); > } > 4. Position the cursor directly after the "<" and type "< " (two > characters "<" " " > 5. I get this error message: "Scan error: containing expression ends > prematurely, 22, 22" The cause of this was that the "<" had wrongly been marked as an opening angle bracket. A backward `scan-sexps' Lisp instruction bumped into this barrier of an angle bracket and gave the error. The solution is to correct the reason for the spurious marking. That was that "static_cast" (along with three other newish ..._cast keywords) weren't being properly handled. This should be corrected in the supplied patch (which actually fixes a bit more). Would you please apply the following patch then byte-compile CC Mode in its entirety (as a Lisp macro has been changed). CC Mode is in ..../emacs/lisp/progmodes/cc-*.el Then please load the new CC Mode into your Emacs 27.2, test it on your real source code, and either confirm that the bug is fixed, or tell me where it is still going wrong. If you want any help with the patching or byte compiling, feel free to send me private email. Thanks! diff -r 92a4592886a1 cc-engine.el --- a/cc-engine.el Sun Apr 25 17:26:38 2021 +0000 +++ b/cc-engine.el Sun Jun 20 18:23:16 2021 +0000 @@ -6965,8 +6965,10 @@ (c-go-list-forward)) (when (equal (c-get-char-property (1- (point)) 'syntax-table) c->-as-paren-syntax) ; should always be true. - (c-unmark-<->-as-paren (1- (point)))) - (c-unmark-<->-as-paren pos)))) + (c-unmark-<->-as-paren (1- (point))) + (c-truncate-lit-pos-cache (1- (point)))) + (c-unmark-<->-as-paren pos) + (c-truncate-lit-pos-cache pos)))) (defun c-clear->-pair-props (&optional pos) ;; POS (default point) is at a > character. If it is marked with @@ -6982,8 +6984,10 @@ (c-go-up-list-backward)) (when (equal (c-get-char-property (point) 'syntax-table) c-<-as-paren-syntax) ; should always be true. - (c-unmark-<->-as-paren (point))) - (c-unmark-<->-as-paren pos)))) + (c-unmark-<->-as-paren (point)) + (c-truncate-lit-pos-cache (point))) + (c-unmark-<->-as-paren pos) + (c-truncate-lit-pos-cache pos)))) (defun c-clear-<>-pair-props (&optional pos) ;; POS (default point) is at a < or > character. If it has an @@ -7016,7 +7020,8 @@ (equal (c-get-char-property (1- (point)) 'syntax-table) c->-as-paren-syntax)) ; should always be true. (c-unmark-<->-as-paren (1- (point))) - (c-unmark-<->-as-paren pos)) + (c-unmark-<->-as-paren pos) + (c-truncate-lit-pos-cache pos)) t))) (defun c-clear->-pair-props-if-match-before (lim &optional pos) @@ -7037,6 +7042,7 @@ (equal (c-get-char-property (point) 'syntax-table) c-<-as-paren-syntax)) ; should always be true. (c-unmark-<->-as-paren (point)) + (c-truncate-lit-pos-cache (point)) (c-unmark-<->-as-paren pos)) t))) @@ -8078,13 +8084,14 @@ ;; bracket arglist. It's propagated through the return value ;; on successful completion. (c-record-found-types c-record-found-types) + (syntax-table-prop-on-< (c-get-char-property (point) 'syntax-table)) ;; List that collects the positions after the argument ;; separating ',' in the arglist. arg-start-pos) ;; If the '<' has paren open syntax then we've marked it as an angle ;; bracket arglist before, so skip to the end. (if (and (not c-parse-and-markup-<>-arglists) - (c-get-char-property (point) 'syntax-table)) + syntax-table-prop-on-<) (progn (forward-char) @@ -8167,8 +8174,20 @@ (c-put-c-type-property (1- (car arg-start-pos)) 'c-<>-arg-sep) (setq arg-start-pos (cdr arg-start-pos))) + (when (and (not syntax-table-prop-on-<) + (c-get-char-property (1- (point)) + 'syntax-table)) + ;; Clear the now spuriously matching < of its + ;; syntax-table property. This could happen on + ;; inserting "_cast" into "static <" with C-y. + (save-excursion + (and (c-go-list-backward) + (eq (char-after) ?<) + (c-truncate-lit-pos-cache (point)) + (c-unmark-<->-as-paren (point))))) (c-mark-<-as-paren start) - (c-mark->-as-paren (1- (point)))) + (c-mark->-as-paren (1- (point))) + (c-truncate-lit-pos-cache start)) (setq res t) nil)) ; Exit the loop. diff -r 92a4592886a1 cc-langs.el --- a/cc-langs.el Sun Apr 25 17:26:38 2021 +0000 +++ b/cc-langs.el Sun Jun 20 18:23:16 2021 +0000 @@ -2730,7 +2730,8 @@ `c-recognize-<>-arglists' for details. That language constant is assumed to be set if this isn't nil." t nil - c++ '("template") + c++ '("template" "const_cast" "dynamic_cast" "reinterpret_cast" + "static_cast") idl '("fixed" "string" "wstring")) (c-lang-defconst c-<>-sexp-kwds > In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) > of 2021-06-02 built on catb > Windowing system distributor 'AT&T Laboratories Cambridge', version > 11.0.3332 > System Description: Ubuntu 20.04.2 LTS [ .... ] -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 27 09:36:17 2021 Received: (at 48837-done) by debbugs.gnu.org; 27 Jun 2021 13:36:17 +0000 Received: from localhost ([127.0.0.1]:49102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxUxN-00008n-10 for submit@debbugs.gnu.org; Sun, 27 Jun 2021 09:36:17 -0400 Received: from colin.muc.de ([193.149.48.1]:21752 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lxUxG-00008V-R1 for 48837-done@debbugs.gnu.org; Sun, 27 Jun 2021 09:36:15 -0400 Received: (qmail 17567 invoked by uid 3782); 27 Jun 2021 13:36:04 -0000 Received: from acm.muc.de (p4fe15d07.dip0.t-ipconnect.de [79.225.93.7]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 27 Jun 2021 15:36:03 +0200 Received: (qmail 22196 invoked by uid 1000); 27 Jun 2021 13:36:03 -0000 Date: Sun, 27 Jun 2021 13:36:03 +0000 To: "John C. Ruttenberg" Subject: Re: bug#48837: Interaction between completion-moide and cc-mode new in 27.2 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48837-done Cc: 48837-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, John. On Sat, Jun 26, 2021 at 16:17:41 -0400, John C. Ruttenberg wrote: > Thanks. The patch succeeded and the bug seems to be fixed. Thanks! I've committed the patch to the emacs-27 branch at savannah, from where it should reach the master branch in a few days, and to stand alone CC Mode and XEmacs. I'm closing the bug with this post. > I just submitted another bug but it says it needs moderation. Did you > see it? By submitted, do you mean to bug-gnu-emacs@gnu.org? If so, the "needs moderation" sounds very strange indeed. I don't know why this has happened, and I didn't see your new bug last time I looked at the online list (this morning, European time). Can I suggest you try submitting it again? > Here is the text of the email, if not: > Here is my C++ file: > class __attribute__((packed)) y : z { > Typing a new line after the "{" indents to under the "z": > class __attribute__((packed)) y : z { > ^ here > I think it should indent the same as if "__attribute__((packed))" were not > present. This bug seems already to be fixed in the upcoming Emacs 28.1 and the head of the standalone CC Mode. The bug is present in Emacs 27.2. With a bit of bisection, I should be able to find the patch which fixed it. With any luck, I'll be able to send you a patch for Emacs 27.2. > This appears to be fragile in surprising ways. If I spell "__attribute__" > wrong (like __attribute), it does not reproduce. > It also does not reproduce if the source file is: > { > class __attribute__((packed)) y : z { > But if the source file is: > { > class __attribute__((packed)) y : z { > then it does reproduce. [ .... ] -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 27 09:58:59 2021 Received: (at 48837-done) by debbugs.gnu.org; 27 Jun 2021 13:58:59 +0000 Received: from localhost ([127.0.0.1]:50258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxVJL-0000xL-Bt for submit@debbugs.gnu.org; Sun, 27 Jun 2021 09:58:59 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:41530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lxVJH-0000x6-Sw for 48837-done@debbugs.gnu.org; Sun, 27 Jun 2021 09:58:57 -0400 Received: by mail-wr1-f46.google.com with SMTP id u8so3928441wrq.8 for <48837-done@debbugs.gnu.org>; Sun, 27 Jun 2021 06:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=reservoir-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e0kmfugZvEaHdcYNiGzk2iXXEGjKiMsqm/72sa6RkIk=; b=bM1K47UJMUNmIq5vANTnPmvd4Pz58lHrVgUkuxrWPWym3VZAFktHxFbmUQpSg2X6+r tglxMR6QRdoSvzCXLyV2HLpFHG9rAsqnBWZ4IENPo5PVA7J0nPh8h8WwWYE5+rof0XGP VUb3mF0BVbKYpnDNx1I69RRqs6Dlh7mr0b+DGkhk+pOjNFzOgBf//L+IEHmX9dLyXdpc JZQs0yaBgFSUUvbLOVly1JATpOqhl9S0Ep/MXNHRRGvFSwxxNWSnV3WnDjMHJBC88+xz l840Xi/gCEOCW3gnJ/Hs4mxtj+jvKA3rejpyixPbcOq6jIFidaiey4Vha6OZ+toNk4jk XUfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e0kmfugZvEaHdcYNiGzk2iXXEGjKiMsqm/72sa6RkIk=; b=M6anuri05Qxt0pbaV3CoZoW7R7Yx0ugPsh/Ifkfvonl2N3aq3aQu6RBiTdhYV3vFn0 Q+Q2YU7FVCvF73oxqakGA1upZYvZbbBNCMKFfiOG/+nygkqHP6jfS+4sLkezkz/PdJEF I25iuEQSRAi6a6FhQFWRb9JufbDCGaJHjQg3o/01abCPJtz39dtwOIbZcYJE1msdQQox sDTI32OJz8ScZx050WRXQN19/pNW9osTpzC2jm2gR212rDAr6Th8LwRfMiIJab7cCBUp /DTcCr7MEPY0rUcECF3SOpJvHeOikCePfnd/KFkQvT9wxIs0JvKqWcCMiXwe/u+tgqEW e2yw== X-Gm-Message-State: AOAM531pxV4Q90rkE1xvJpkNLfZfBr/tbpdFW9KeoFLeBRV72jXVrozX Kh2y0A+XUm9edWigkbfkJcdlyRVzBrE92hNix0+cDw== X-Google-Smtp-Source: ABdhPJy5UI1y0z/i5iFpEbmmYaQGp6g5YjSjXR2WYR1KUmq2Cm/H7H4d0AInpn9PtzRuzt0i7UFeh5ocmB4rz4ulxTo= X-Received: by 2002:a5d:4e52:: with SMTP id r18mr22287922wrt.372.1624802329786; Sun, 27 Jun 2021 06:58:49 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "John C. Ruttenberg" Date: Sun, 27 Jun 2021 09:58:38 -0400 Message-ID: Subject: Re: bug#48837: Interaction between completion-moide and cc-mode new in 27.2 To: Alan Mackenzie Content-Type: multipart/alternative; boundary="000000000000b28af305c5bfc505" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48837-done Cc: 48837-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000b28af305c5bfc505 Content-Type: text/plain; charset="UTF-8" My mistake on the "submission". I sent the email to sourceforge. But I am glad the bug has been fixed. On Sun, Jun 27, 2021 at 9:36 AM Alan Mackenzie wrote: > Hello, John. > > On Sat, Jun 26, 2021 at 16:17:41 -0400, John C. Ruttenberg wrote: > > Thanks. The patch succeeded and the bug seems to be fixed. > > Thanks! I've committed the patch to the emacs-27 branch at savannah, > from where it should reach the master branch in a few days, and to stand > alone CC Mode and XEmacs. I'm closing the bug with this post. > > > I just submitted another bug but it says it needs moderation. Did you > > see it? > > By submitted, do you mean to bug-gnu-emacs@gnu.org? If so, the "needs > moderation" sounds very strange indeed. I don't know why this has > happened, and I didn't see your new bug last time I looked at the online > list (this morning, European time). Can I suggest you try submitting it > again? > > > Here is the text of the email, if not: > > > Here is my C++ file: > > > class __attribute__((packed)) y : z { > > > Typing a new line after the "{" indents to under the "z": > > > class __attribute__((packed)) y : z { > > ^ here > > > I think it should indent the same as if "__attribute__((packed))" were > not > > present. > > This bug seems already to be fixed in the upcoming Emacs 28.1 and the > head of the standalone CC Mode. The bug is present in Emacs 27.2. With > a bit of bisection, I should be able to find the patch which fixed it. > With any luck, I'll be able to send you a patch for Emacs 27.2. > > > This appears to be fragile in surprising ways. If I spell > "__attribute__" > > wrong (like __attribute), it does not reproduce. > > > It also does not reproduce if the source file is: > > > { > > class __attribute__((packed)) y : z { > > > But if the source file is: > > > { > > class __attribute__((packed)) y : z { > > > then it does reproduce. > > [ .... ] > > -- > Alan Mackenzie (Nuremberg, Germany). > --000000000000b28af305c5bfc505 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
My mistake on the "submission".=C2=A0 I sent the= email to sourceforge.=C2=A0 But I am glad the bug has been fixed.
On Sun, J= un 27, 2021 at 9:36 AM Alan Mackenzie <acm= @muc.de> wrote:
Hello, John.

On Sat, Jun 26, 2021 at 16:17:41 -0400, John C. Ruttenberg wrote:
> Thanks.=C2=A0 The patch succeeded and the bug seems to be fixed.

Thanks!=C2=A0 I've committed the patch to the emacs-27 branch at savann= ah,
from where it should reach the master branch in a few days, and to stand alone CC Mode and XEmacs.=C2=A0 I'm closing the bug with this post.

> I just submitted another bug but it says it needs moderation.=C2=A0 Di= d you
> see it?

By submitted, do you mean to bug-gnu-emacs@gnu.org?=C2=A0 If so, the "needs
moderation" sounds very strange indeed.=C2=A0 I don't know why thi= s has
happened, and I didn't see your new bug last time I looked at the onlin= e
list (this morning, European time).=C2=A0 Can I suggest you try submitting = it
again?

> Here is the text of the email, if not:

> Here is my C++ file:

> class __attribute__((packed)) y : z {

> Typing a new line after the=C2=A0 "{" indents to under the &= quot;z":

> class __attribute__((packed)) y : z {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^ here

> I think it should indent the same as if "__attribute__((packed))&= quot; were not
> present.

This bug seems already to be fixed in the upcoming Emacs 28.1 and the
head of the standalone CC Mode.=C2=A0 The bug is present in Emacs 27.2.=C2= =A0 With
a bit of bisection, I should be able to find the patch which fixed it.
With any luck, I'll be able to send you a patch for Emacs 27.2.

> This appears to be fragile in surprising ways.=C2=A0 If I spell "= __attribute__"
> wrong (like __attribute), it does not reproduce.

> It also does not reproduce if the source file is:

> {
>=C2=A0 =C2=A0class __attribute__((packed)) y : z {

> But if the source file is:

> {
>=C2=A0 =C2=A0class __attribute__((packed)) y : z {

> then it does reproduce.

[ .... ]

--
Alan Mackenzie (Nuremberg, Germany).
--000000000000b28af305c5bfc505-- From unknown Sat Sep 06 00:11:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 26 Jul 2021 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator