From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 01:52:30 2015 Received: (at submit) by debbugs.gnu.org; 4 Sep 2015 05:52:30 +0000 Received: from localhost ([127.0.0.1]:48388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXjvJ-0001GC-2M for submit@debbugs.gnu.org; Fri, 04 Sep 2015 01:52:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49077) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXjtp-0001Cg-Mc for submit@debbugs.gnu.org; Fri, 04 Sep 2015 01:50:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXjtn-0008Jb-7V for submit@debbugs.gnu.org; Fri, 04 Sep 2015 01:50:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXjtn-0008JX-58 for submit@debbugs.gnu.org; Fri, 04 Sep 2015 01:50:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXjtl-0003HQ-Dq for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2015 01:50:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXjtj-0008IM-Af for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2015 01:50:53 -0400 Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]:34525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXjtj-0008IA-58 for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2015 01:50:51 -0400 Received: by qkfq186 with SMTP id q186so4796789qkf.1 for ; Thu, 03 Sep 2015 22:50:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=W8YEjxBL1yUsy0GPYtCXP8fo2cmqF6rhHZTpoNNsLKM=; b=g77yC8pGQtEaRTEgqtwfgK7W7CV7RrddUZ+W//cwI0l+GCTVjqnR7TwdqEL6rZO35K clBcBmnSdmVOBg8I8+eUD6MkUb0Oox7IO70CPrOZg9p/47UOrHhRrEN+sHQAGYifGoJF BWGeL6vOMjd34YY/KUffeOGn63+bRTfZaKrKbN5PLRzfg5fJ0BXMKPhhZd0D9VIKSdwO /dETTIRnt3XQP9rBDDTCDBPpkupxtW0vyHJN1pLTF9/IOcwD0pfNUjRC65/ssN77wap+ IxpcFzACI8U1MBYfzP+jfoRd5OsBxVcVCax6N1EXSlraXSnpSdhpJ9Jhj8u5suN6Czxh sZeg== MIME-Version: 1.0 X-Received: by 10.55.195.80 with SMTP id a77mr2612116qkj.2.1441345850571; Thu, 03 Sep 2015 22:50:50 -0700 (PDT) Received: by 10.140.19.1 with HTTP; Thu, 3 Sep 2015 22:50:50 -0700 (PDT) Date: Thu, 3 Sep 2015 22:50:50 -0700 Message-ID: Subject: 24.5; Wrong syntactic information for two line statement in an arglist From: Gulshan Singh To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=001a11479ce66c00d2051ee57bae X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 04 Sep 2015 01:52:28 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -3.8 (---) --001a11479ce66c00d2051ee57bae Content-Type: text/plain; charset=UTF-8 In c-mode (and all derivatives), the following code has the wrong syntactic information (at least, in my opinion): foo(bar .baz() .qux()); Putting point at `.baz()` and pressing C-c C-s shows it as an `arglist-cont-nonempty`, when I'd expect it to be a `statement-cont`. This causes the code to have the wrong indentation, as above I would like to have the continued statements to be indented one c-basic-offset, not aligned to the opening brace. In GNU Emacs 24.5.1 (x86_64-apple-darwin14.5.0, NS apple-appkit-1348.17) of 2015-08-24 on gulshan-mbp1 Windowing system distributor `Apple', version 10.3.1348 Configured using: `configure --prefix=/usr/local/Cellar/emacs/24.5 --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs/24.5/share/info/emacs --with-xml2 --without-dbus --without-gnutls --with-ns --disable-ns-self-contained' Important settings: locale-coding-system: utf-8-unix Major mode: C/l Minor modes in effect: yas-global-mode: t yas-minor-mode: t global-syntax-subword-mode: t syntax-subword-mode: t global-flycheck-mode: t flycheck-mode: t which-function-mode: t global-company-mode: t company-mode: t flx-ido-mode: t ido-ubiquitous-mode: t global-diff-hl-mode: t diff-auto-refine-mode: t winner-mode: t global-undo-tree-mode: t undo-tree-mode: t whitespace-mode: t global-anzu-mode: t anzu-mode: t projectile-global-mode: t projectile-mode: t shell-dirtrack-mode: t volatile-highlights-mode: t global-hl-line-mode: t recentf-mode: t savehist-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-mode: t global-auto-revert-mode: t delete-selection-mode: t prelude-global-mode: t prelude-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent messages: Quit Mark set [2 times] Syntactic analysis: ((arglist-cont-nonempty 72 75)) Quit use of undeclared identifier 'bar' Mark set Quit byte-code: Command attempted to use minibuffer while in minibuffer Quit Load-path shadows: None found. Features: (shadow sort eieio-opt emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils mail-extr cus-edit cus-start cus-load easy-kill misearch multi-isearch js2-imenu-extras tramp-cmds ffap url-parse url-vars cc-langs xhp-mode derived xhp-indent php-mode speedbar sb-image ezimage dframe flymake add-log tramp-cache tramp-sh company-anaconda anaconda-mode f s ucs-normalize json-rpc python-el-fgallina-expansions smartparens-python python rainbow-mode color rainbow-delimiters elisp-slime-nav yasnippet appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs syntax-subword superword subword prelude-xml nxml-mode-expansions html-mode-expansions sgml-mode rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok prelude-web web-mode-expansions smartparens-html web-mode disp-table prelude-shell sh-script smie executable prelude-python prelude-js js2-mode-expansions js2-mode js2-old-indent js-mode-expansions js json cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs prelude-emacs-lisp prelude-lisp prelude-c prelude-programming flycheck find-func help-mode rx subr-x which-func prelude-company company-files company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb company prelude-ido smex flx-ido flx ido-ubiquitous ido-completing-read+ prelude-osx exec-path-from-shell prelude-global-keybindings prelude-editor operate-on-number calc-bin calc-ext calc calc-loaddefs calc-macs diff-hl smartrep vc-dir ewoc vc vc-dispatcher diff-mode easy-mmode winner undo-tree diff esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups eshell esh-module esh-mode esh-util re-builder whitespace tabify browse-kill-ring midnight ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff dired-x dired anzu avy projectile compile ibuf-ext ibuffer bookmark pp expand-region text-mode-expansions er-basic-expansions expand-region-core expand-region-custom flyspell ispell tramp tramp-compat auth-source gnus-util mm-util mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete comint ansi-color format-spec etags ring volatile-highlights hl-line windmove recentf tree-widget wid-edit savehist saveplace diminish edmacro kmacro smartparens-config smartparens autorevert filenotify delsel prelude-mode prelude-core imenu epl ido pcase ov dash thingatpt prelude-ui smart-mode-line mule-util rich-minority zenburn-theme prelude-custom prelude-packages finder-inf eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core advice help-fns cl-macs info easymenu package epg-config cl gv cl-loaddefs cl-lib time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process cocoa ns multi-tty emacs) Memory information: ((conses 16 892477 436428) (symbols 48 54665 2) (miscs 40 1391 5733) (strings 32 135135 214576) (string-bytes 1 3737179) (vectors 16 155851) (vector-slots 8 4232856 614143) (floats 8 28966 6540) (intervals 56 3573 9245) (buffers 960 35)) --001a11479ce66c00d2051ee57bae Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
In c-mode (and all derivatives), the following code h= as the wrong
syntactic information (at least, in my opinion):

foo(bar
=C2=A0 =C2=A0 .baz()
=C2= =A0 =C2=A0 .qux());

Putting point at `.baz()` and = pressing C-c C-s shows it as an
`arglist-cont-nonempty`, when I&#= 39;d expect it to be a
`statement-cont`. This causes the code to = have the wrong indentation, as
above I would like to have the con= tinued statements to be indented one
c-basic-offset, not aligned = to the opening brace.



In GNU Emacs 24.5.1 (x86_64-apple-darwin14.5.0, NS apple-appkit-1348.17)<= /div>
=C2=A0of 2015-08-24 on gulshan-mbp1
Windowing system di= stributor `Apple', version 10.3.1348
Configured using:
<= div>=C2=A0`configure --prefix=3D/usr/local/Cellar/emacs/24.5
=C2= =A0--enable-locallisppath=3D/usr/local/share/emacs/site-lisp
=C2= =A0--infodir=3D/usr/local/Cellar/emacs/24.5/share/info/emacs --with-xml2
=C2=A0--without-dbus --without-gnutls --with-ns --disable-ns-self-c= ontained'

Important settings:
=C2=A0= locale-coding-system: utf-8-unix

Major mode: C/l<= /div>

Minor modes in effect:
=C2=A0 yas-global= -mode: t
=C2=A0 yas-minor-mode: t
=C2=A0 global-syntax-= subword-mode: t
=C2=A0 syntax-subword-mode: t
=C2=A0 gl= obal-flycheck-mode: t
=C2=A0 flycheck-mode: t
=C2=A0 wh= ich-function-mode: t
=C2=A0 global-company-mode: t
=C2= =A0 company-mode: t
=C2=A0 flx-ido-mode: t
=C2=A0 ido-u= biquitous-mode: t
=C2=A0 global-diff-hl-mode: t
=C2=A0 = diff-auto-refine-mode: t
=C2=A0 winner-mode: t
=C2=A0 g= lobal-undo-tree-mode: t
=C2=A0 undo-tree-mode: t
=C2=A0= whitespace-mode: t
=C2=A0 global-anzu-mode: t
=C2=A0 a= nzu-mode: t
=C2=A0 projectile-global-mode: t
=C2=A0 pro= jectile-mode: t
=C2=A0 shell-dirtrack-mode: t
=C2=A0 vo= latile-highlights-mode: t
=C2=A0 global-hl-line-mode: t
=C2=A0 recentf-mode: t
=C2=A0 savehist-mode: t
=C2=A0 = show-smartparens-global-mode: t
=C2=A0 show-smartparens-mode: t
=C2=A0 smartparens-mode: t
=C2=A0 global-auto-revert-mod= e: t
=C2=A0 delete-selection-mode: t
=C2=A0 prelude-glo= bal-mode: t
=C2=A0 prelude-mode: t
=C2=A0 tooltip-mode:= t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse-wheel-mo= de: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-m= ode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock= -mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-en= cryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0= size-indication-mode: t
=C2=A0 column-number-mode: t
= =C2=A0 line-number-mode: t
=C2=A0 transient-mark-mode: t
=C2=A0 abbrev-mode: t

Recent messages:
Quit
Mark set [2 times]
Syntactic analysis: ((arglist-= cont-nonempty 72 75))
Quit
use of undeclared identifier= 'bar'
Mark set
Quit
byte-code: Comma= nd attempted to use minibuffer while in minibuffer
Quit


Load-path shadows:
None found.

Features:
(shadow sort eieio-opt emacsbug m= essage rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-pars= e rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc204= 5 ietf-drums mail-utils mail-extr cus-edit
cus-start cus-load eas= y-kill misearch multi-isearch js2-imenu-extras
tramp-cmds ffap ur= l-parse url-vars cc-langs xhp-mode derived xhp-indent
php-mode sp= eedbar sb-image ezimage dframe flymake add-log tramp-cache
tramp-= sh company-anaconda anaconda-mode f s ucs-normalize json-rpc
pyth= on-el-fgallina-expansions smartparens-python python rainbow-mode
= color rainbow-delimiters elisp-slime-nav yasnippet appt diary-lib
diary-loaddefs cal-menu calendar cal-loaddefs syntax-subword superword
subword prelude-xml nxml-mode-expansions html-mode-expansions sgml-m= ode
rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-m= atch rng-dt
rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-= rap nxml-util
nxml-glyph nxml-enc xmltok prelude-web web-mode-exp= ansions
smartparens-html web-mode disp-table prelude-shell sh-scr= ipt smie
executable prelude-python prelude-js js2-mode-expansions= js2-mode
js2-old-indent js-mode-expansions js json cc-mode-expan= sions cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-ali= gn cc-engine cc-vars
cc-defs prelude-emacs-lisp prelude-lisp prel= ude-c prelude-programming
flycheck find-func help-mode rx subr-x = which-func prelude-company
company-files company-oddmuse company-= keywords company-etags
company-gtags company-dabbrev-code company= -dabbrev company-capf
company-cmake company-xcode company-clang c= ompany-semantic company-eclim
company-template company-css compan= y-nxml company-bbdb company
prelude-ido smex flx-ido flx ido-ubiq= uitous ido-completing-read+
prelude-osx exec-path-from-shell prel= ude-global-keybindings
prelude-editor operate-on-number calc-bin = calc-ext calc calc-loaddefs
calc-macs diff-hl smartrep vc-dir ewo= c vc vc-dispatcher diff-mode
easy-mmode winner undo-tree diff esh= -var esh-io esh-cmd esh-opt esh-ext
esh-proc esh-arg eldoc esh-gr= oups eshell esh-module esh-mode esh-util
re-builder whitespace ta= bify browse-kill-ring midnight ediff-merg
ediff-wind ediff-diff e= diff-mult ediff-help ediff-init ediff-util ediff
dired-x dired an= zu avy projectile compile ibuf-ext ibuffer bookmark pp
expand-reg= ion text-mode-expansions er-basic-expansions
expand-region-core e= xpand-region-custom flyspell ispell tramp
tramp-compat auth-sourc= e gnus-util mm-util mail-prsvr password-cache
tramp-loaddefs tram= pver shell pcomplete comint ansi-color format-spec
etags ring vol= atile-highlights hl-line windmove recentf tree-widget
wid-edit sa= vehist saveplace diminish edmacro kmacro smartparens-config
smart= parens autorevert filenotify delsel prelude-mode prelude-core imenu
epl ido pcase ov dash thingatpt prelude-ui smart-mode-line mule-util
rich-minority zenburn-theme prelude-custom prelude-packages finder-i= nf
eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core= advice
help-fns cl-macs info easymenu package epg-config cl gv c= l-loaddefs
cl-lib time-date tooltip electric uniquify ediff-hook = vc-hooks
lisp-float-type mwheel ns-win tool-bar dnd fontset image= regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode = register page
menu-bar rfn-eshadow timer select scroll-bar mouse = jit-lock font-lock
syntax facemenu font-core frame cham georgian = utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean = japanese hebrew greek
romanian slovak czech european ethiopic ind= ian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simpl= e abbrev minibuffer nadvice
loaddefs button faces cus-face macroe= xp files text-properties overlay
sha1 md5 base64 format env code-= pages mule custom widget
hashtable-print-readable backquote make-= network-process cocoa ns
multi-tty emacs)

Memory information:
((conses 16 892477 436428)
=C2=A0= (symbols 48 54665 2)
=C2=A0(miscs 40 1391 5733)
=C2=A0(= strings 32 135135 214576)
=C2=A0(string-bytes 1 3737179)
=C2=A0(vectors 16 155851)
=C2=A0(vector-slots 8 4232856 614143)=
=C2=A0(floats 8 28966 6540)
=C2=A0(intervals 56 3573 9= 245)
=C2=A0(buffers 960 35))

--001a11479ce66c00d2051ee57bae-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 03 06:07:30 2020 Received: (at 21409) by debbugs.gnu.org; 3 Dec 2020 11:07:30 +0000 Received: from localhost ([127.0.0.1]:38646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkmSP-0005mE-Vs for submit@debbugs.gnu.org; Thu, 03 Dec 2020 06:07:30 -0500 Received: from quimby.gnus.org ([95.216.78.240]:44918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkmSN-0005m0-UY for 21409@debbugs.gnu.org; Thu, 03 Dec 2020 06:07:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YHzVeXQsnkvQnDSZ15qG8dlskpSNK87qG+++wKVuzqM=; b=hE1nOvToN07bmVsXrlHiRW41+B +nHAf3Z4JRG2F7d9vkDvKQ92DXp4mo4/grIZ4LaAF45fNjK8ER4wt7RzJhYvexSJXsYYgm+7OJ51E VTgmb0v4JrHobGVgIagT9zz8Fg2+N7uwP7hNw5TudQ7zxJIVV1/Frq6/6O6xU6zejTgM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkmSF-0002e9-Bs; Thu, 03 Dec 2020 12:07:21 +0100 From: Lars Ingebrigtsen To: Gulshan Singh Subject: Re: bug#21409: 24.5; Wrong syntactic information for two line statement in an arglist References: X-Now-Playing: Old's _Formula_: "Last Look" Date: Thu, 03 Dec 2020 12:07:18 +0100 In-Reply-To: (Gulshan Singh's message of "Thu, 3 Sep 2015 22:50:50 -0700") Message-ID: <87eek7taft.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gulshan Singh writes: > In c-mode (and all derivatives), the following code has the wrong > syntactic information (at least, in my opinion): > > foo(bar > .baz() > .qux()); > > Putting point at `.baz()` and pressing C-c C- [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21409 Cc: Alan Mackenzie , 21409@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 (-) Gulshan Singh writes: > In c-mode (and all derivatives), the following code has the wrong > syntactic information (at least, in my opinion): > > foo(bar > .baz() > .qux()); > > Putting point at `.baz()` and pressing C-c C-s shows it as an > `arglist-cont-nonempty`, when I'd expect it to be a > `statement-cont`. This causes the code to have the wrong indentation, as > above I would like to have the continued statements to be indented one > c-basic-offset, not aligned to the opening brace. (This bug report unfortunately got no response at the time.) I'm not sure how that should be indented, really -- the current indentation looks reasonable to me, I think? Perhaps Alan (added to the Cc's) has an opinion here. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 11 20:52:56 2022 Received: (at 21409) by debbugs.gnu.org; 12 Mar 2022 01:52:57 +0000 Received: from localhost ([127.0.0.1]:38866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSqwC-0004Jp-Kp for submit@debbugs.gnu.org; Fri, 11 Mar 2022 20:52:56 -0500 Received: from mail-ed1-f51.google.com ([209.85.208.51]:37858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSqwB-0004Jb-Hk for 21409@debbugs.gnu.org; Fri, 11 Mar 2022 20:52:55 -0500 Received: by mail-ed1-f51.google.com with SMTP id b15so8852893edn.4 for <21409@debbugs.gnu.org>; Fri, 11 Mar 2022 17:52:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hY1wifJu16KYzvdbC3yQTXSH6kLFj0qauVvxVesZlXQ=; b=XuzWBynbzHpBY56Brl9/myOD/Z0jY0+UiP3rmrihCZ69z/8me7Tl7ODCh4PQgUD+Ax FbiRoeK6Q4JulW0Oes1N0MRIT+ax0HYQhUifmewJAfmaYCh19J9WpbDDPeNegwV9RCJx LZm5oWjQHcaV/Cv93t26An/K74qydXp5JWxV695qJYI7P4rbDsMLwGaRoYnJcrcc0GlN 9pRhSmRQAWm22pJRQ8CusqXngyJKMHXvUTBJk+NkQA0InNYxUCm1RXIat6yV6ntRlfbZ sExBEyGamOA+dKGp3yqop9jT7iqLCb0w9OVyCW4EHU/uu/uqls3ZfUy1XZs6yU5xww92 oHeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hY1wifJu16KYzvdbC3yQTXSH6kLFj0qauVvxVesZlXQ=; b=YK6rB4v7460lCYmAVFFvgxcn47wvwvi9NvQfW1Er5tCJOoisQQNn+lZWGCfav52zFw JWRx8abpKdKr1Kgt9kSNDxQUg09eG2bgcl/6sJEQSB19ZlsZh09U2rOhiFgrcabs0YAc hrfmWTVkwK046+rU8AxkO9H9CiG4WUcbV5p1UWuh/4A2LUvjsZE56zkO4jdzhPm6SK+x HBfja6vAbqFxtUnKxV+4TAnjKUd5RzWDo1JV3HvNFUh8wkjqPibgOdL3R1cDu+13vRXn SjC32L43/xkTahGqS0oHyt+Fu8ZVEvrt9jgOGLbDSDAneJs8DC8PcliHzgBOeFmRqhGN VPCA== X-Gm-Message-State: AOAM531P1y240v/XJ2XGeCoCguFUL3MhV1Kx04DRI0Cvqy+C4lsLyj+U NtQpwi5ADPHyrOkDnjFP3k4fqxj50VwumbpCoLs= X-Google-Smtp-Source: ABdhPJzRZHQat6+acxeDTMryZg50L8fvxzlFhT1Jcc2+dmrcpuRvbMFX4gW3hUnBxiAVmPTk+wUznT0zJhVVndLGf4g= X-Received: by 2002:a05:6402:3489:b0:416:9121:6936 with SMTP id v9-20020a056402348900b0041691216936mr11503923edc.249.1647049969512; Fri, 11 Mar 2022 17:52:49 -0800 (PST) MIME-Version: 1.0 References: <87eek7taft.fsf@gnus.org> In-Reply-To: <87eek7taft.fsf@gnus.org> From: Gulshan Singh Date: Fri, 11 Mar 2022 17:52:38 -0800 Message-ID: Subject: Re: bug#21409: 24.5; Wrong syntactic information for two line statement in an arglist To: Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="0000000000005c5caa05d9fbb446" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 21409 Cc: Alan Mackenzie , 21409@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: -0.8 (/) --0000000000005c5caa05d9fbb446 Content-Type: text/plain; charset="UTF-8" I know this is an old bug report, but I just realized it got a response, and it seems like the behavior hasn't changed. On Thu, Dec 3, 2020 at 3:07 AM Lars Ingebrigtsen wrote: > Gulshan Singh writes: > > > In c-mode (and all derivatives), the following code has the wrong > > syntactic information (at least, in my opinion): > > > > foo(bar > > .baz() > > .qux()); > > > > Putting point at `.baz()` and pressing C-c C-s shows it as an > > `arglist-cont-nonempty`, when I'd expect it to be a > > `statement-cont`. This causes the code to have the wrong indentation, as > > above I would like to have the continued statements to be indented one > > c-basic-offset, not aligned to the opening brace. > > (This bug report unfortunately got no response at the time.) > > I'm not sure how that should be indented, really -- the current > indentation looks reasonable to me, I think? > It's definitely reasonable, but it's not what I'd prefer, which would be this: foo(bar .baz() .qux()); `.baz()` and `.qux()` are indented two spaces (my value for `c-basic-offset`) from the start of `bar`, as opposed to aligned with `bar`. This matches what happens if the call to `foo` isn't there: bar .baz() .qux(); In any case, regardless of what indentation one would prefer for this case, the issue remains that `c-show-syntactic-information` should be showing `statement-cont` instead of `arglist-cont-nonempty` at `.baz()`. --0000000000005c5caa05d9fbb446 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I know this is an old bug report, but I j= ust realized it got a response, and it seems like the behavior hasn't c= hanged.

On Thu, Dec 3, 2020 at 3:07 AM Lars Ingebrigtsen <larsi@gnus.org> wrote:
Gulshan= Singh <gsingh= 2011@gmail.com> writes:

> In c-mode (and all derivatives), the following code has the wrong
> syntactic information (at least, in my opinion):
>
> foo(bar
>=C2=A0 =C2=A0 =C2=A0.baz()
>=C2=A0 =C2=A0 =C2=A0.qux());
>
> Putting point at `.baz()` and pressing C-c C-s shows it as an
> `arglist-cont-nonempty`, when I'd expect it to be a
> `statement-cont`. This causes the code to have the wrong indentation, = as
> above I would like to have the continued statements to be indented one=
> c-basic-offset, not aligned to the opening brace.

(This bug report unfortunately got no response at the time.)

I'm not sure how that should be indented, really -- the current
indentation looks reasonable to me, I think?

It's definitely reasonable, but it's not what I'd prefer,= which would be this:

foo(bar
=C2=A0 =C2=A0 =C2=A0 .baz()
=C2= =A0 =C2=A0 =C2=A0 .qux());

`.baz()` and=C2=A0`.qux()` are indented t= wo spaces (my value for `c-basic-offset`) from the start of `bar`, as oppos= ed to aligned with `bar`. This matches what happens if the call to `foo` is= n't there:

bar
=C2=A0 .baz()
=C2=A0 .qux();

In any = case, regardless of what indentation one would prefer for this case, the is= sue remains that `c-show-syntactic-information` should be showing `statemen= t-cont` instead of `arglist-cont-nonempty` at `.baz()`.
--0000000000005c5caa05d9fbb446-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 12 06:33:01 2022 Received: (at 21409) by debbugs.gnu.org; 12 Mar 2022 11:33:01 +0000 Received: from localhost ([127.0.0.1]:39322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSzzZ-0004iW-4s for submit@debbugs.gnu.org; Sat, 12 Mar 2022 06:33:01 -0500 Received: from colin.muc.de ([193.149.48.1]:34897 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1nSzzW-0004iH-GT for 21409@debbugs.gnu.org; Sat, 12 Mar 2022 06:32:59 -0500 Received: (qmail 82625 invoked by uid 3782); 12 Mar 2022 11:32:51 -0000 Received: from acm.muc.de (p2e5d5b32.dip0.t-ipconnect.de [46.93.91.50]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 12 Mar 2022 12:32:51 +0100 Received: (qmail 7457 invoked by uid 1000); 12 Mar 2022 11:32:50 -0000 Date: Sat, 12 Mar 2022 11:32:50 +0000 To: Gulshan Singh Subject: Re: bug#21409: 24.5; Wrong syntactic information for two line statement in an arglist Message-ID: References: <87eek7taft.fsf@gnus.org> 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: 21409 Cc: acm@muc.de, Lars Ingebrigtsen , 21409@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, Gulshan. Sorry I missed your bug report back in 2015. On Fri, Mar 11, 2022 at 17:52:38 -0800, Gulshan Singh wrote: > I know this is an old bug report, but I just realized it got a response, > and it seems like the behavior hasn't changed. Also, a big thank you for cutting the C fragment down to an easy to work with minimum. > On Thu, Dec 3, 2020 at 3:07 AM Lars Ingebrigtsen wrote: > > Gulshan Singh writes: > > > In c-mode (and all derivatives), the following code has the wrong > > > syntactic information (at least, in my opinion): > > > foo(bar > > > .baz() > > > .qux()); > > > Putting point at `.baz()` and pressing C-c C-s shows it as an > > > `arglist-cont-nonempty`, when I'd expect it to be a > > > `statement-cont`. I'm afraid I can't agree with you here. The bar.baz().qux() is an expression, not a statement, as it is lacking the terminating ; which would make it a statement. I think the arglist-cont-nonempty is correct. It is more specific than statement-cont, which could only have the start of foo as its anchor position. > > > This causes the code to have the wrong indentation, as above I > > > would like to have the continued statements to be indented one > > > c-basic-offset, not aligned to the opening brace. I think the best solution to the problem would be to write a new Line-Up function for this particular scenario, and to make it available to users to insert into the c-offsets-alist entry for arglist-cont-nonempty. The page "Customizing Indentation" in the CC Mode manual is pertinent here. But first, we need to firm up the specification. What, precisely, will trigger this new Line-Up function? What about the struct members not being functions: foo(bar .baz .qux); ? What about the . operator being at the end of the previous line: foo(bar. baz(). qux()); ? What is the primary construct which should trigger the new Line-Up function? Am I right in thinking it's the . operator combined with line breaks, and nothing else? What about, for example, the ? : operators: foo(bar ? baz() : qux()); ? This is getting kind of complicated. ;-) Sorry. > > (This bug report unfortunately got no response at the time.) > > I'm not sure how that should be indented, really -- the current > > indentation looks reasonable to me, I think? > It's definitely reasonable, but it's not what I'd prefer, which would be > this: > foo(bar > .baz() > .qux()); > `.baz()` and `.qux()` are indented two spaces (my value for > `c-basic-offset`) from the start of `bar`, as opposed to aligned with > `bar`. This matches what happens if the call to `foo` isn't there: > bar > .baz() > .qux(); > In any case, regardless of what indentation one would prefer for this case, > the issue remains that `c-show-syntactic-information` should be showing > `statement-cont` instead of `arglist-cont-nonempty` at `.baz()`. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 13 09:43:28 2022 Received: (at 21409) by debbugs.gnu.org; 13 Mar 2022 13:43:28 +0000 Received: from localhost ([127.0.0.1]:41836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTOVI-0002Zt-Mh for submit@debbugs.gnu.org; Sun, 13 Mar 2022 09:43:28 -0400 Received: from colin.muc.de ([193.149.48.1]:19929 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1nTOVC-0002Zb-QV for 21409@debbugs.gnu.org; Sun, 13 Mar 2022 09:43:23 -0400 Received: (qmail 45935 invoked by uid 3782); 13 Mar 2022 13:43:12 -0000 Received: from acm.muc.de (p4fe157ef.dip0.t-ipconnect.de [79.225.87.239]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 13 Mar 2022 14:43:11 +0100 Received: (qmail 7532 invoked by uid 1000); 13 Mar 2022 13:43:11 -0000 Date: Sun, 13 Mar 2022 13:43:11 +0000 To: Gulshan Singh Subject: Re: bug#21409: 24.5; Wrong syntactic information for two line statement in an arglist Message-ID: References: <87eek7taft.fsf@gnus.org> 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: 21409 Cc: acm@muc.de, Lars Ingebrigtsen , 21409@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 again, Gulshan. On Sat, Mar 12, 2022 at 11:32:50 +0000, Alan Mackenzie wrote: > Sorry I missed your bug report back in 2015. > On Fri, Mar 11, 2022 at 17:52:38 -0800, Gulshan Singh wrote: > > On Thu, Dec 3, 2020 at 3:07 AM Lars Ingebrigtsen wrote: > > > Gulshan Singh writes: > > > > In c-mode (and all derivatives), the following code has the wrong > > > > syntactic information (at least, in my opinion): > > > > foo(bar > > > > .baz() > > > > .qux()); [ .... ] > I think the best solution to the problem would be to write a new Line-Up > function for this particular scenario, and to make it available to users > to insert into the c-offsets-alist entry for arglist-cont-nonempty. The > page "Customizing Indentation" in the CC Mode manual is pertinent here. > But first, we need to firm up the specification. What, precisely, will > trigger this new Line-Up function? I've come up with an answer to that question. On _any_ argument continued onto the next line, we indent it c-basic-offset from the _first_ argument. This is easy to implement, since it's a minor variation on c-lineup-arglist. See the following patch for an example of what that does. [ .... ] > > It's definitely reasonable, but it's not what I'd prefer, which would be > > this: > > foo(bar > > .baz() > > .qux()); > > `.baz()` and `.qux()` are indented two spaces (my value for > > `c-basic-offset`) from the start of `bar`, as opposed to aligned with > > `bar`. This matches what happens if the call to `foo` isn't there: > > bar > > .baz() > > .qux(); I've hacked up the following patch, which introduces the new Line-Up function c-lineup-arglist-+. To use it (temporarily) do C-c C-o RET on the .baz() line, and change the setting for arglist-cont-nonempty from (c-lineup-gcc-asm-reg c-lineup-arglist) to (c-lineup-gcc-asm-reg c-lineup-arglist-+ c-lineup-arglist) .. Note that c-lineup-arglist-+ is a function which returns nil to mean "not appropriate here", so it must be in a list, not in the last position. This is all better explained in the CC Mode manual on page "c-offsets-alist". If this patch does what you want, you can then incorporate the new Line-Up function into your CC Mode style, or however else you set up your indentation. If you want any help with this, feel free to ask on this list, or on bug-cc-mode@gnu.org. Here's the patch. It should apply to either the latest version of stand-alone CC Mode, or the version in the Emacs master branch. Please apply the patch, byte compile the changed file (or all of CC Mode), and make the amendment to your indentation setup noted above. (If you want any help with any of this, feel free to send me private email). Then please let us know if this patch does the Right Thing. Thanks! diff -r 1a0681da2be1 cc-align.el --- a/cc-align.el Thu Feb 10 16:46:58 2022 +0000 +++ b/cc-align.el Sun Mar 13 13:35:56 2022 +0000 @@ -207,6 +207,58 @@ (vector (current-column))))))) ;; Contributed by Kevin Ryde . +(defun c-lineup-argcont-1 (elem) + ;; Move to the start of the current arg and return non-nil, otherwise + ;; return nil. + (beginning-of-line) + + (when (eq (car elem) 'arglist-cont-nonempty) + ;; Our argument list might not be the innermost one. If it + ;; isn't, go back to the last position in it. We do this by + ;; stepping back over open parens until we get to the open paren + ;; of our argument list. + (let ((open-paren (c-langelem-2nd-pos c-syntactic-element)) + (paren-state (c-parse-state))) + (while (not (eq (car paren-state) open-paren)) + (unless (consp (car paren-state)) ;; ignore matched braces + (goto-char (car paren-state))) + (setq paren-state (cdr paren-state))))) + + (let ((start (point)) c) + + (when (bolp) + ;; Previous line ending in a comma means we're the start of an + ;; argument. This should quickly catch most cases not for us. + ;; This case is only applicable if we're the innermost arglist. + (c-backward-syntactic-ws) + (setq c (char-before))) + + (unless (eq c ?,) + ;; In a gcc asm, ":" on the previous line means the start of an + ;; argument. And lines starting with ":" are not for us, don't + ;; want them to indent to the preceding operand. + (let ((gcc-asm (save-excursion + (goto-char start) + (c-in-gcc-asm-p)))) + (unless (and gcc-asm + (or (eq c ?:) + (save-excursion + (goto-char start) + (looking-at "[ \t]*:")))) + + (c-lineup-argcont-scan (if gcc-asm ?:)) + t))))) + +(defun c-lineup-argcont-scan (&optional other-match) + ;; Find the start of an argument, for `c-lineup-argcont'. + (when (zerop (c-backward-token-2 1 t)) + (let ((c (char-after))) + (if (or (eq c ?,) (eq c other-match)) + (progn + (forward-char) + (c-forward-syntactic-ws)) + (c-lineup-argcont-scan other-match))))) + (defun c-lineup-argcont (elem) "Line up a continued argument. @@ -221,56 +273,28 @@ for the operands. Works with: arglist-cont, arglist-cont-nonempty." - (save-excursion - (beginning-of-line) + (when (c-lineup-argcont-1 elem) + (vector (current-column))))) - (when (eq (car elem) 'arglist-cont-nonempty) - ;; Our argument list might not be the innermost one. If it - ;; isn't, go back to the last position in it. We do this by - ;; stepping back over open parens until we get to the open paren - ;; of our argument list. - (let ((open-paren (c-langelem-2nd-pos c-syntactic-element)) - (paren-state (c-parse-state))) - (while (not (eq (car paren-state) open-paren)) - (unless (consp (car paren-state)) ;; ignore matched braces - (goto-char (car paren-state))) - (setq paren-state (cdr paren-state))))) +(defun c-lineup-argcont-+ (langelem) + "Indent an argument continuation `c-basic-offset' in from the first argument. - (let ((start (point)) c) - - (when (bolp) - ;; Previous line ending in a comma means we're the start of an - ;; argument. This should quickly catch most cases not for us. - ;; This case is only applicable if we're the innermost arglist. - (c-backward-syntactic-ws) - (setq c (char-before))) +foo (xyz, uvw, aaa + bbb + ccc + + ddd + eee + fff); <- c-lineup-argcont-+ + <--> c-basic-offset - (unless (eq c ?,) - ;; In a gcc asm, ":" on the previous line means the start of an - ;; argument. And lines starting with ":" are not for us, don't - ;; want them to indent to the preceding operand. - (let ((gcc-asm (save-excursion - (goto-char start) - (c-in-gcc-asm-p)))) - (unless (and gcc-asm - (or (eq c ?:) - (save-excursion - (goto-char start) - (looking-at "[ \t]*:")))) +Only continuation lines like this are touhced, nil being returned +on lines which are the start of an argument. - (c-lineup-argcont-scan (if gcc-asm ?:)) - (vector (current-column)))))))) - -(defun c-lineup-argcont-scan (&optional other-match) - ;; Find the start of an argument, for `c-lineup-argcont'. - (when (zerop (c-backward-token-2 1 t)) - (let ((c (char-after))) - (if (or (eq c ?,) (eq c other-match)) - (progn - (forward-char) - (c-forward-syntactic-ws)) - (c-lineup-argcont-scan other-match))))) +Works with: arglist-cont, arglist-cont-nonempty." + (save-excursion + (when (c-lineup-argcont-1 langelem) ; Check we've got a continued argument... + ;; ... but ignore the position found. + (goto-char (c-langelem-2nd-pos c-syntactic-element)) + (forward-char) + (c-forward-syntactic-ws) + (vector (+ (current-column) c-basic-offset))))) (defun c-lineup-arglist-intro-after-paren (_langelem) "Line up a line to just after the open paren of the surrounding paren -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 09 17:43:52 2022 Received: (at 21409) by debbugs.gnu.org; 9 Apr 2022 21:43:52 +0000 Received: from localhost ([127.0.0.1]:38833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndIs3-0004nW-Of for submit@debbugs.gnu.org; Sat, 09 Apr 2022 17:43:51 -0400 Received: from mail-oa1-f51.google.com ([209.85.160.51]:36410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndIs1-0004nH-AN for 21409@debbugs.gnu.org; Sat, 09 Apr 2022 17:43:50 -0400 Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-df22f50e0cso13332864fac.3 for <21409@debbugs.gnu.org>; Sat, 09 Apr 2022 14:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xQR2fin+/trSEYfSMfJKoCcba0s8x3fFyew8bQSsgls=; b=jyBVHwrrwHpf7YsZI8YSGo0KRr7gIYQoOvOa2Da8QTHtoyXGf8boZh0uQq2J3JqDGz bGMwcDY7XcUY0vA+/LkDL7/XcbCk0Gss4vEJysXWIU/YAvgDSdRSbK0HysIG2D88I+zp P7mIuzq0Sx9vprYYpmGA+QCmGuZjkmV2iuR3nOenDNFjR4YD29lIJBZ+km63d8Yxa3wx F3F48TaOFcad0mj+sSRzCWFfRXVXqHgWaGp+fAmdxAehWAsGOqzrq9/CWWOuNzmeqIq3 DpFA1wWeYVKZn66Q2grqn2NvZehBJ+XndlpLR30jZj+z+MRtMKYObdfLti8QaSQ1KPBa 9ERA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xQR2fin+/trSEYfSMfJKoCcba0s8x3fFyew8bQSsgls=; b=RCKhxucQSwS4Das7lOpqwVL0QMkLw5HSZUSUaJmlQCywtZGen4z/NG8BL4wuCkZRZo r9Sk7fEjxOXwmj8o0gz2GEa1hwBRWYprpaLTnruv55q5PS9R56wf8xnVPe8CbJ31dK2D LRhd9Lrn98mSrlJ3qd9CLxO0EUEME2IKkdzZSgI+S4LLZkrh7rYypVIDhp4EKOsTOgn1 9lPXm6N2hKBZEyPqpDK3bKp90PiqkrGz6AnqTYXVGe9KwG1io9lWrnuZu65SuYeT5h+K KlB6/GB9USRLl4Vf/AnNVH6uc+CV+vEYfPzVDstaLE01fwc4cmZkFsd1WoysDfyZO5F8 VnXQ== X-Gm-Message-State: AOAM533lKmYwwXq6Em+oUQI5IJQqoQ1m/kIS1ylauhAqQ2NyiYsZuOM0 EUJmcj/QpHYzd6vVCGwEjNKJcNNDK84n27Wl3+U= X-Google-Smtp-Source: ABdhPJwfvdR3aDvXPbjCcywldBrHrbncRrrGyG8CxYhuij0myA7sf48itLvEntfIa9sKxswjA1qlAOSwgFcNLkAHjwY= X-Received: by 2002:a05:6870:6590:b0:e2:a532:6916 with SMTP id fp16-20020a056870659000b000e2a5326916mr2298826oab.261.1649540623486; Sat, 09 Apr 2022 14:43:43 -0700 (PDT) MIME-Version: 1.0 References: <87eek7taft.fsf@gnus.org> In-Reply-To: From: Gulshan Singh Date: Sat, 9 Apr 2022 14:43:32 -0700 Message-ID: Subject: Re: bug#21409: 24.5; Wrong syntactic information for two line statement in an arglist To: Alan Mackenzie Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 21409 Cc: Lars Ingebrigtsen , 21409@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: -0.8 (/) Hi Alan, thanks for the patch! I've been very busy, but I just got around to applying it and testing it out. > I've hacked up the following patch, which introduces the new Line-Up > function c-lineup-arglist-+. To use it (temporarily) do C-c C-o RET on > the .baz() line, and change the setting for arglist-cont-nonempty from > > (c-lineup-gcc-asm-reg c-lineup-arglist) > > to > > (c-lineup-gcc-asm-reg c-lineup-arglist-+ c-lineup-arglist) I think you meant `(c-lineup-gcc-asm-reg c-lineup-argcont-+ c-lineup-arglist)` (or you meant to define the function name as `c-lineup-arglist-+` instead of `c-lineup-argcont-+`, not sure). In any case, I tested it and it works great! Is this patch something that could be merged upstream? From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 10 08:09:45 2022 Received: (at control) by debbugs.gnu.org; 10 Apr 2022 12:09:46 +0000 Received: from localhost ([127.0.0.1]:39632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndWO1-0002dz-Pu for submit@debbugs.gnu.org; Sun, 10 Apr 2022 08:09:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndWNz-0002dm-Vr for control@debbugs.gnu.org; Sun, 10 Apr 2022 08:09:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XfIS2ufKEOzL3Pi5vhlFZmBXx3AdEvWp3vEcJGEr/dA=; b=MUe/8dbZv53LjDWG88yGQRLpxJ MRwiGpZJoCrdu0TUIDCxLrfe/1wXHDaey6yan2YKyDsDGbzJMj85cpAvxyQgUqwqnvkLqElOuhwXW xBc1irxEdpeZ7PIXOImYQGX2Z6jf7datwLWw5mmVKJlYUCHoJ/R0+IfBxxkEqssx8ZR8=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ndWNs-0006DV-5B for control@debbugs.gnu.org; Sun, 10 Apr 2022 14:09:38 +0200 Date: Sun, 10 Apr 2022 14:09:34 +0200 Message-Id: <87tub1qgw1.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #21409 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 21409 + patch quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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: -3.3 (---) tags 21409 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 23 10:24:05 2022 Received: (at 21409) by debbugs.gnu.org; 23 Apr 2022 14:24:05 +0000 Received: from localhost ([127.0.0.1]:56853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niGg9-0000Hf-3v for submit@debbugs.gnu.org; Sat, 23 Apr 2022 10:24:05 -0400 Received: from colin.muc.de ([193.149.48.1]:60377 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1niGg7-0000H8-Ho for 21409@debbugs.gnu.org; Sat, 23 Apr 2022 10:24:04 -0400 Received: (qmail 3909 invoked by uid 3782); 23 Apr 2022 14:23:56 -0000 Received: from acm.muc.de (p2e5d5134.dip0.t-ipconnect.de [46.93.81.52]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 23 Apr 2022 16:23:56 +0200 Received: (qmail 6245 invoked by uid 1000); 23 Apr 2022 14:23:55 -0000 Date: Sat, 23 Apr 2022 14:23:55 +0000 To: Gulshan Singh Subject: Re: bug#21409: 24.5; Wrong syntactic information for two line statement in an arglist Message-ID: References: <87eek7taft.fsf@gnus.org> 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: 21409 Cc: Lars Ingebrigtsen , 21409@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, Gulshan. Sorry I've been a bit busy the last two weeks, even if mainly on other Emacs things. On Sat, Apr 09, 2022 at 14:43:32 -0700, Gulshan Singh wrote: > Hi Alan, thanks for the patch! I've been very busy, but I just got > around to applying it and testing it out. > > I've hacked up the following patch, which introduces the new Line-Up > > function c-lineup-arglist-+. To use it (temporarily) do C-c C-o RET on > > the .baz() line, and change the setting for arglist-cont-nonempty from > > (c-lineup-gcc-asm-reg c-lineup-arglist) > > to > > (c-lineup-gcc-asm-reg c-lineup-arglist-+ c-lineup-arglist) > I think you meant `(c-lineup-gcc-asm-reg c-lineup-argcont-+ > c-lineup-arglist)` (or you meant to define the function name as > `c-lineup-arglist-+` instead of `c-lineup-argcont-+`, not sure). I think you're right, here! > In any case, I tested it and it works great! Is this patch something > that could be merged upstream? Thanks! I'm part way through more thorough testing, and I'm hoping to commit it this weekend (after having updated the documentation). It will most definitely appear in the next major Emacs version, Emacs 29.1, when it appears (in around 1 - 2 years time). -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 23 16:10:14 2022 Received: (at 21409-done) by debbugs.gnu.org; 23 Apr 2022 20:10:14 +0000 Received: from localhost ([127.0.0.1]:57315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niM58-0003IE-69 for submit@debbugs.gnu.org; Sat, 23 Apr 2022 16:10:14 -0400 Received: from colin.muc.de ([193.149.48.1]:23767 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1niM55-0003Hs-Fq for 21409-done@debbugs.gnu.org; Sat, 23 Apr 2022 16:10:12 -0400 Received: (qmail 42042 invoked by uid 3782); 23 Apr 2022 20:10:04 -0000 Received: from acm.muc.de (p2e5d5134.dip0.t-ipconnect.de [46.93.81.52]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 23 Apr 2022 22:10:04 +0200 Received: (qmail 9916 invoked by uid 1000); 23 Apr 2022 20:10:02 -0000 Date: Sat, 23 Apr 2022 20:10:02 +0000 To: Gulshan Singh Subject: Re: bug#21409: 24.5; Wrong syntactic information for two line statement in an arglist Message-ID: References: <87eek7taft.fsf@gnus.org> 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: 21409-done Cc: 21409-done@debbugs.gnu.org, Lars Ingebrigtsen 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 again Gulshan. On Sat, Apr 09, 2022 at 14:43:32 -0700, Gulshan Singh wrote: > Hi Alan, thanks for the patch! I've been very busy, but I just got > around to applying it and testing it out. > > I've hacked up the following patch, .... [ .... ] > In any case, I tested it and it works great! Is this patch something > that could be merged upstream? Thanks once again for the testing. I've committed the patch (together with an update to the CC Mode manual) to both standalone CC Mode and the Emacs repository master branch. I'm closing the bug with this post. -- Alan Mackenzie (Nuremberg, Germany). From unknown Wed Jun 25 00:24:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 22 May 2022 11:24:04 +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