Received: (at 25608) by debbugs.gnu.org; 2 Feb 2017 22:03:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 02 17:03:41 2017 Received: from localhost ([127.0.0.1]:54289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1cZPTg-0007zA-QW for submit <at> debbugs.gnu.org; Thu, 02 Feb 2017 17:03:41 -0500 Received: from ocolin.muc.de ([193.149.48.4]:34295 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1cZPTe-0007z1-Gv for 25608 <at> debbugs.gnu.org; Thu, 02 Feb 2017 17:03:39 -0500 Received: (qmail 93967 invoked by uid 3782); 2 Feb 2017 22:03:37 -0000 Received: from acm.muc.de (p548C71DF.dip0.t-ipconnect.de [84.140.113.223]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 02 Feb 2017 23:03:36 +0100 Received: (qmail 19662 invoked by uid 1000); 2 Feb 2017 22:03:19 -0000 Date: Thu, 2 Feb 2017 22:03:19 +0000 To: Chris Wagner <chris.wagner@HIDDEN> Subject: Re: bug#25608: CC Mode 5.33 (C/l); Incorrect syntactic information and indentation after multi-line comment with parenthesis or keywords Message-ID: <20170202220319.GA3435@acm> References: <OFB454BB33.FED6E2EC-ON802580BB.00480520-802580BB.004B923F@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <OFB454BB33.FED6E2EC-ON802580BB.00480520-802580BB.004B923F@HIDDEN> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie <acm@HIDDEN> X-Primary-Address: acm@HIDDEN X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25608 Cc: 25608 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) Hello, Chris. On Thu, Feb 02, 2017 at 13:45:36 +0000, Chris Wagner wrote: > Hello, > With the following c code: > /*----------------------------------------------------------------------------- > (c) Copyright notice containing open parentheses > -----------------------------------------------------------------------------*/ > /*---------------------------------------------------------------------------*/ > the last line is indented incorrectly, as the identified syntactic > information is ((topmost-intro-cont 1) (comment-intro)). I think it > should be ((topmost-intro 1) (comment-intro)), which the following code > correctly identifies: > /*----------------------------------------------------------------------------- > Non parenthesis language > -----------------------------------------------------------------------------*/ > /*---------------------------------------------------------------------------*/ > Similarly, if there is a keyword in the comment, the next comment is > incorrectly identified and indented: > /*----------------------------------------------------------------------------- > (c) Copyright notice containing open parentheses > Line containing keyword for > -----------------------------------------------------------------------------*/ > /*---------------------------------------------------------------------------*/ > Note that indenting the comment region removes the problem: > /*----------------------------------------------------------------------------- > (c) Copyright notice containing open parentheses > Line containing keyword for > -----------------------------------------------------------------------------*/ > /*---------------------------------------------------------------------------*/ > indents correctly. > Best regards, > Chris The problem in all these cases which fail is the open parenthesis at column zero inside the comment. This (currently) causes mis-analysis of the code around it, as detailed in the Emacs manual on page "Left Margin Paren". However, I would be the first to agree with you that this is a fault in Emacs rather than anything wrong with your source code, which is perfectly normal C. There is a fix for this problem, and I have some hope that this fix will be incorporated into Emacs 26. [ CC Mode configuration dump snipped, but appreciated. ] > Dr Chris Wagner > Senior Consultant, Medical Technology > Cambridge Consultants > Science Park, Milton Road > Cambridge, CB4 0DW, England > Switchboard: +44 (0)1223 420024 > Direct dial: +44 (0)1223 392497 > Fax: +44 (0)1223 423373 > chris.wagner@HIDDEN > www.CambridgeConsultants.com -- Alan Mackenzie (Nuremberg, Germany).
bug-cc-mode@HIDDEN
:bug#25608
; Package cc-mode
.
Full text available.Received: (at 25608) by debbugs.gnu.org; 2 Feb 2017 18:34:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 02 13:34:46 2017 Received: from localhost ([127.0.0.1]:54249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1cZMDW-00036R-6v for submit <at> debbugs.gnu.org; Thu, 02 Feb 2017 13:34:46 -0500 Received: from eggs.gnu.org ([208.118.235.92]:47049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <rgm@HIDDEN>) id 1cZMDU-00036D-3I for 25608 <at> debbugs.gnu.org; Thu, 02 Feb 2017 13:34:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1cZMDN-00048k-50 for 25608 <at> debbugs.gnu.org; Thu, 02 Feb 2017 13:34:38 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1cZMDN-00048Z-1Z; Thu, 02 Feb 2017 13:34:37 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from <rgm@HIDDEN>) id 1cZMDM-00067Y-Ij; Thu, 02 Feb 2017 13:34:36 -0500 From: Glenn Morris <rgm@HIDDEN> To: 25608 <at> debbugs.gnu.org Subject: Re: bug#25608: CC Mode 5.33 (C/l); Incorrect syntactic information and indentation after multi-line comment with parenthesis or keywords References: <OFB454BB33.FED6E2EC-ON802580BB.00480520-802580BB.004B923F@HIDDEN> Mail-Followup-To: 25608 <at> debbugs.gnu.org, chris.wagner@HIDDEN X-Spook: Mahmoud Ahmadinejad ASO Chemical burn Uzi MS13 Toxic Law X-Ran: Lo\UX|It`&#U^qZwiUIr8P<g_ya/:fB*.vbQY3/9uj#A&)b1p\*-9ZQR>[jKbFxA\o1&?1 X-Hue: cyan X-Attribution: GM Date: Thu, 02 Feb 2017 13:34:36 -0500 In-Reply-To: <OFB454BB33.FED6E2EC-ON802580BB.00480520-802580BB.004B923F@HIDDEN> (Chris Wagner's message of "Thu, 2 Feb 2017 13:45:36 +0000") Message-ID: <4gd1f0qw5f.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25608 Cc: Chris Wagner <chris.wagner@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Reply-To: 25608 <at> debbugs.gnu.org, chris.wagner@HIDDEN Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) I've reassigned this report to the right package in debbugs.gnu.org, and am sending this reply so it appears on the right mailing list. (It is of course impossible to comply with the meaningless legal disclaimer at the end of the mssage.) Chris Wagner wrote: > Hello, > > With the following c code: > > /*-----------------------------------------------------------------------= ------ > (c) Copyright notice containing open parentheses > -------------------------------------------------------------------------= ----*/ > >=20=20 > /*-----------------------------------------------------------------------= ----*/ > > > the last line is indented incorrectly, as the identified syntactic > information is ((topmost-intro-cont 1) (comment-intro)). I think it > should be ((topmost-intro 1) (comment-intro)), which the following code > correctly identifies: > > /*-----------------------------------------------------------------------= ------ > Non parenthesis language > -------------------------------------------------------------------------= ----*/ > > /*-----------------------------------------------------------------------= ----*/ > > > Similarly, if there is a keyword in the comment, the next comment is > incorrectly identified and indented: > > /*-----------------------------------------------------------------------= ------ > (c) Copyright notice containing open parentheses > Line containing keyword for > -------------------------------------------------------------------------= ----*/ > >=20=20 > /*-----------------------------------------------------------------------= ----*/ > > Note that indenting the comment region removes the problem: > > /*-----------------------------------------------------------------------= ------ > (c) Copyright notice containing open parentheses > Line containing keyword for > -------------------------------------------------------------------------= ----*/ > > /*-----------------------------------------------------------------------= ----*/ > > indents correctly. > > Best regards, > Chris > > > Emacs : GNU Emacs 25.1.1 (x86_64-w64-mingw32) > of 2016-09-17 > Package: CC Mode 5.33 (C/l) > Buffer Style: bsd > c-emacs-features: (pps-extended-state col-0-paren posix-char-classes=20 > gen-string-delim gen-comment-delim syntax-properties 1-bit) > > current state: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > (setq > c-basic-offset 4 > c-comment-only-line-offset 0 > c-indent-comment-alist '((anchored-comment column . 0) (end-block space = .=20 > 1) (cpp-end-block space . 2)) > c-indent-comments-syntactically-p nil > c-block-comment-prefix "* " > c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+")= =20 > (other . "//+\\|\\**")) > c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc) (c-mod= e=20 > . gtkdoc)) > c-cleanup-list '(scope-operator) > c-hanging-braces-alist '((brace-list-open) (brace-entry-open)=20 > (statement-cont) (substatement-open after) > (block-close . c-snug-do-while)=20 > (extern-lang-open after) (namespace-open after) > (module-open after) (composition-open after)=20 > (inexpr-class-open after) > (inexpr-class-close before)=20 > (arglist-cont-nonempty)) > c-hanging-colons-alist nil > c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist) > c-backslash-column 48 > c-backslash-max-column 72 > c-special-indent-hook nil > c-label-minimum-indentation 1 > c-offsets-alist '((inexpr-statement . +) > (lambda-intro-cont . +) > (inlambda . c-lineup-inexpr-block) > (template-args-cont c-lineup-template-args +) > (incomposition . +) > (inmodule . +) > (innamespace . +) > (inextern-lang . +) > (composition-close . 0) > (module-close . 0) > (namespace-close . 0) > (extern-lang-close . 0) > (composition-open . 0) > (module-open . 0) > (namespace-open . 0) > (extern-lang-open . 0) > (objc-method-call-cont c-lineup-ObjC-method-call-colon= s=20 > c-lineup-ObjC-method-call +) > (objc-method-args-cont . c-lineup-ObjC-method-args) > (objc-method-intro . [0]) > (friend . 0) > (cpp-define-intro c-lineup-cpp-define +) > (cpp-macro-cont . +) > (cpp-macro . [0]) > (inclass . +) > (stream-op . c-lineup-streamop) > (arglist-close . +) > (arglist-cont-nonempty c-lineup-gcc-asm-reg=20 > c-lineup-arglist) > (arglist-cont c-lineup-gcc-asm-reg 0) > (arglist-intro . +) > (comment-intro c-lineup-knr-region-comment=20 > c-lineup-comment) > (catch-clause . 0) > (else-clause . 0) > (do-while-closure . 0) > (access-label . -) > (case-label . 0) > (substatement . +) > (statement-case-open . 0) > (statement-case-intro . +) > (statement . 0) > (brace-entry-open . 0) > (brace-list-entry . 0) > (brace-list-intro . +) > (brace-list-close . 0) > (brace-list-open . 0) > (block-close . 0) > (block-open . 0) > (inher-cont . c-lineup-multi-inher) > (inher-intro . +) > (member-init-cont . c-lineup-multi-inher) > (member-init-intro . +) > (annotation-var-cont . +) > (annotation-top-cont . 0) > (topmost-intro-cont . c-lineup-topmost-intro-cont) > (topmost-intro . 0) > (knr-argdecl . 0) > (func-decl-cont . +) > (inline-close . 0) > (class-close . 0) > (class-open . 0) > (defun-block-intro . +) > (defun-close . 0) > (defun-open . 0) > (c . c-lineup-C-comments) > (string . c-lineup-dont-change) > (inexpr-class . 0) > (inline-open . 0) > (statement-cont . +) > (label . 0) > (substatement-label . 0) > (substatement-open . 0) > (knr-argdecl-intro . +) > (statement-block-intro . +) > ) > c-buffer-is-cc-mode 'c-mode > c-tab-always-indent t > c-syntactic-indentation t > c-syntactic-indentation-in-macros t > c-ignore-auto-fill '(string cpp code) > c-auto-align-backslashes t > c-backspace-function 'backward-delete-char-untabify > c-delete-function 'delete-char > c-electric-pound-behavior nil > c-default-style "bsd" > c-enable-xemacs-performance-kludge-p nil > c-old-style-variable-behavior nil > defun-prompt-regexp nil > tab-width 4 > comment-column 32 > parse-sexp-ignore-comments t > parse-sexp-lookup-properties t > auto-fill-function nil > comment-multi-line t > comment-start-skip "\\(//+\\|/\\*+\\)\\s *" > fill-prefix nil > fill-column 70 > paragraph-start "[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f" > adaptive-fill-mode t > adaptive-fill-regexp "[ ]*\\(//+\\|\\**\\)[ ]*\\([=20 > ]*\\([-?!|#%;>*=C2=B7????]+[ ]*\\)*\\)" > ) > > > > Dr Chris Wagner > Senior Consultant, Medical Technology=20 > Cambridge Consultants > Science Park, Milton Road=20 > Cambridge, CB4 0DW, England > Switchboard: +44 (0)1223 420024 > Direct dial: +44 (0)1223 392497 > Fax: +44 (0)1223 423373 > chris.wagner@HIDDEN > www.CambridgeConsultants.com >=20=20 > > > > > > This email is from Cambridge Consultants Limited, Science Park, Milton=20 > Road, Cambridge CB4 0DW with registered number 1036298 England. It may=20 > contain confidential information. It is intended for the addressee only=20 > and may not be copied or disclosed to any third party without our=20 > permission. If you are not the intended recipient please contact the=20 > sender as soon as possible and delete the material from any computer. If= =20 > this email has been sent as a personal message to the addressee, the=20 > sender is not acting in his/her capacity as an employee or officer of=20 > Cambridge Consultants Limited and no liability is accepted for the conten= t=20 > of any such email. Outgoing email may be monitored for the purpose of=20 > ensuring compliance with our email policy and relevant laws.
bug-cc-mode@HIDDEN
:bug#25608
; Package cc-mode
.
Full text available.Received: (at submit) by debbugs.gnu.org; 2 Feb 2017 16:34:04 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 02 11:34:04 2017 Received: from localhost ([127.0.0.1]:54191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1cZKKh-0000Jg-Kb for submit <at> debbugs.gnu.org; Thu, 02 Feb 2017 11:34:04 -0500 Received: from cambridgeuk-g01.cambridgeconsultants.com ([193.35.222.39]:60960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <chris.wagner@HIDDEN>) id 1cZHha-0004s1-B6 for submit <at> debbugs.gnu.org; Thu, 02 Feb 2017 08:45:33 -0500 X-Disclaimed: 58006 To: submit <at> debbugs.gnu.org MIME-Version: 1.0 Subject: CC Mode 5.33 (C/l); Incorrect syntactic information and indentation after multi-line comment with parenthesis or keywords X-KeepSent: B454BB33:FED6E2EC-802580BB:00480520; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP6 April 21, 2016 Message-ID: <OFB454BB33.FED6E2EC-ON802580BB.00480520-802580BB.004B923F@HIDDEN> From: Chris Wagner <chris.wagner@HIDDEN> Date: Thu, 2 Feb 2017 13:45:36 +0000 X-MIMETrack: S/MIME Sign by NLNOTES.EXE on Chris Wagner/HO/CCL(Release 9.0.1FP6|April 21, 2016) at 02/02/2017 13:45:26, Serialize by NLNOTES.EXE on Chris Wagner/HO/CCL(Release 9.0.1FP6|April 21, 2016) at 02/02/2017 13:45:26, Serialize complete at 02/02/2017 13:45:26, S/MIME Sign failed at 02/02/2017 13:45:26: The cryptographic key was not found, Serialize by Router on CambridgeUK-G01/SVR/CCL(Release 9.0.1FP7|August 17, 2016) at 02/02/2017 13:45:31, Serialize complete at 02/02/2017 13:45:31 Content-Type: multipart/alternative; boundary="=_alternative 004B923E802580BB_=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 02 Feb 2017 11:34:02 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.0 (/) This is a multipart message in MIME format. --=_alternative 004B923E802580BB_= Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Hello, With the following c code: /*-------------------------------------------------------------------------= ---- (c) Copyright notice containing open parentheses ---------------------------------------------------------------------------= --*/ =20 /*-------------------------------------------------------------------------= --*/ the last line is indented incorrectly, as the identified syntactic information is ((topmost-intro-cont 1) (comment-intro)). I think it should be ((topmost-intro 1) (comment-intro)), which the following code correctly identifies: /*-------------------------------------------------------------------------= ---- Non parenthesis language ---------------------------------------------------------------------------= --*/ /*-------------------------------------------------------------------------= --*/ Similarly, if there is a keyword in the comment, the next comment is incorrectly identified and indented: /*-------------------------------------------------------------------------= ---- (c) Copyright notice containing open parentheses Line containing keyword for ---------------------------------------------------------------------------= --*/ =20 /*-------------------------------------------------------------------------= --*/ Note that indenting the comment region removes the problem: /*-------------------------------------------------------------------------= ---- (c) Copyright notice containing open parentheses Line containing keyword for ---------------------------------------------------------------------------= --*/ /*-------------------------------------------------------------------------= --*/ indents correctly. Best regards, Chris Emacs : GNU Emacs 25.1.1 (x86=5F64-w64-mingw32) of 2016-09-17 Package: CC Mode 5.33 (C/l) Buffer Style: bsd c-emacs-features: (pps-extended-state col-0-paren posix-char-classes=20 gen-string-delim gen-comment-delim syntax-properties 1-bit) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq c-basic-offset 4 c-comment-only-line-offset 0 c-indent-comment-alist '((anchored-comment column . 0) (end-block space . = 1) (cpp-end-block space . 2)) c-indent-comments-syntactically-p nil c-block-comment-prefix "* " c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+")=20 (other . "//+\\|\\**")) c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc) (c-mode = . gtkdoc)) c-cleanup-list '(scope-operator) c-hanging-braces-alist '((brace-list-open) (brace-entry-open)=20 (statement-cont) (substatement-open after) (block-close . c-snug-do-while)=20 (extern-lang-open after) (namespace-open after) (module-open after) (composition-open after)=20 (inexpr-class-open after) (inexpr-class-close before)=20 (arglist-cont-nonempty)) c-hanging-colons-alist nil c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist) c-backslash-column 48 c-backslash-max-column 72 c-special-indent-hook nil c-label-minimum-indentation 1 c-offsets-alist '((inexpr-statement . +) (lambda-intro-cont . +) (inlambda . c-lineup-inexpr-block) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons = c-lineup-ObjC-method-call +) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-close . +) (arglist-cont-nonempty c-lineup-gcc-asm-reg=20 c-lineup-arglist) (arglist-cont c-lineup-gcc-asm-reg 0) (arglist-intro . +) (comment-intro c-lineup-knr-region-comment=20 c-lineup-comment) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . 0) (substatement . +) (statement-case-open . 0) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-intro . +) (brace-list-close . 0) (brace-list-open . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (topmost-intro-cont . c-lineup-topmost-intro-cont) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (inexpr-class . 0) (inline-open . 0) (statement-cont . +) (label . 0) (substatement-label . 0) (substatement-open . 0) (knr-argdecl-intro . +) (statement-block-intro . +) ) c-buffer-is-cc-mode 'c-mode c-tab-always-indent t c-syntactic-indentation t c-syntactic-indentation-in-macros t c-ignore-auto-fill '(string cpp code) c-auto-align-backslashes t c-backspace-function 'backward-delete-char-untabify c-delete-function 'delete-char c-electric-pound-behavior nil c-default-style "bsd" c-enable-xemacs-performance-kludge-p nil c-old-style-variable-behavior nil defun-prompt-regexp nil tab-width 4 comment-column 32 parse-sexp-ignore-comments t parse-sexp-lookup-properties t auto-fill-function nil comment-multi-line t comment-start-skip "\\(//+\\|/\\*+\\)\\s *" fill-prefix nil fill-column 70 paragraph-start "[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f" adaptive-fill-mode t adaptive-fill-regexp "[ ]*\\(//+\\|\\**\\)[ ]*\\([=20 ]*\\([-?!|#%;>*=B7????]+[ ]*\\)*\\)" ) Dr Chris Wagner Senior Consultant, Medical Technology=20 Cambridge Consultants Science Park, Milton Road=20 Cambridge, CB4 0DW, England Switchboard: +44 (0)1223 420024 Direct dial: +44 (0)1223 392497 Fax: +44 (0)1223 423373 chris.wagner@HIDDEN www.CambridgeConsultants.com =20 This email is from Cambridge Consultants Limited, Science Park, Milton=20 Road, Cambridge CB4 0DW with registered number 1036298 England. It may=20 contain confidential information. It is intended for the addressee only=20 and may not be copied or disclosed to any third party without our=20 permission. If you are not the intended recipient please contact the=20 sender as soon as possible and delete the material from any computer. If=20 this email has been sent as a personal message to the addressee, the=20 sender is not acting in his/her capacity as an employee or officer of=20 Cambridge Consultants Limited and no liability is accepted for the content = of any such email. Outgoing email may be monitored for the purpose of=20 ensuring compliance with our email policy and relevant laws. --=_alternative 004B923E802580BB_= Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable <font size=3D2 face=3D"sans-serif">Hello,</font> <br> <br><font size=3D2 face=3D"sans-serif">With the following c code:</font> <br> <br><font size=3D2 face=3D"sans-serif">/*----------------------------------= -------------------------------------------</font> <br><font size=3D2 face=3D"sans-serif">(c) Copyright notice containing open parentheses</font> <br><font size=3D2 face=3D"sans-serif">------------------------------------= -----------------------------------------*/</font> <br> <br><font size=3D2 face=3D"sans-serif"> /*----------------------------= -----------------------------------------------*/</font> <br> <br> <br><font size=3D2 face=3D"sans-serif">the last line is indented incorrectl= y, as the identified syntactic</font> <br><font size=3D2 face=3D"sans-serif">information is ((topmost-intro-cont 1) (comment-intro)). I think it</font> <br><font size=3D2 face=3D"sans-serif">should be ((topmost-intro 1) (commen= t-intro)), which the following code</font> <br><font size=3D2 face=3D"sans-serif">correctly identifies:</font> <br> <br><font size=3D2 face=3D"sans-serif">/*----------------------------------= -------------------------------------------</font> <br><font size=3D2 face=3D"sans-serif">Non parenthesis language</font> <br><font size=3D2 face=3D"sans-serif">------------------------------------= -----------------------------------------*/</font> <br> <br><font size=3D2 face=3D"sans-serif">/*----------------------------------= -----------------------------------------*/</font> <br> <br> <br><font size=3D2 face=3D"sans-serif">Similarly, if there is a keyword in the comment, the next comment is</font> <br><font size=3D2 face=3D"sans-serif">incorrectly identified and indented:= </font> <br> <br><font size=3D2 face=3D"sans-serif">/*----------------------------------= -------------------------------------------</font> <br><font size=3D2 face=3D"sans-serif">(c) Copyright notice containing open parentheses</font> <br><font size=3D2 face=3D"sans-serif">Line containing keyword for</font> <br><font size=3D2 face=3D"sans-serif">------------------------------------= -----------------------------------------*/</font> <br> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; /*-------------------------------= --------------------------------------------*/</font> <br> <br><font size=3D2 face=3D"sans-serif">Note that indenting the comment regi= on removes the problem:</font> <br> <br><font size=3D2 face=3D"sans-serif">/*----------------------------------= -------------------------------------------</font> <br><font size=3D2 face=3D"sans-serif"> (c) Copyright notice containi= ng open parentheses</font> <br><font size=3D2 face=3D"sans-serif"> Line containing keyword for</= font> <br><font size=3D2 face=3D"sans-serif">------------------------------------= -----------------------------------------*/</font> <br> <br><font size=3D2 face=3D"sans-serif">/*----------------------------------= -----------------------------------------*/</font> <br> <br><font size=3D2 face=3D"sans-serif">indents correctly.</font> <br> <br><font size=3D2 face=3D"sans-serif">Best regards,</font> <br><font size=3D2 face=3D"sans-serif">Chris</font> <br> <br> <br><font size=3D2 face=3D"sans-serif">Emacs : GNU Emacs 25.1.1 (x86= =5F64-w64-mingw32)</font> <br><font size=3D2 face=3D"sans-serif"> of 2016-09-17</font> <br><font size=3D2 face=3D"sans-serif">Package: CC Mode 5.33 (C/l)</font> <br><font size=3D2 face=3D"sans-serif">Buffer Style: bsd</font> <br><font size=3D2 face=3D"sans-serif">c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-pr= operties 1-bit)</font> <br> <br><font size=3D2 face=3D"sans-serif">current state:</font> <br><font size=3D2 face=3D"sans-serif">=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D</font> <br><font size=3D2 face=3D"sans-serif">(setq</font> <br><font size=3D2 face=3D"sans-serif"> c-basic-offset 4</font> <br><font size=3D2 face=3D"sans-serif"> c-comment-only-line-offset 0</= font> <br><font size=3D2 face=3D"sans-serif"> c-indent-comment-alist '((anch= ored-comment column . 0) (end-block space . 1) (cpp-end-block space . 2))</font> <br><font size=3D2 face=3D"sans-serif"> c-indent-comments-syntacticall= y-p nil</font> <br><font size=3D2 face=3D"sans-serif"> c-block-comment-prefix "* "</font> <br><font size=3D2 face=3D"sans-serif"> c-comment-prefix-regexp '((pik= e-mode . "//+!?\\|\\**") (awk-mode . "#+") (other . "//+\= \|\\**"))</font> <br><font size=3D2 face=3D"sans-serif"> c-doc-comment-style '((java-mo= de . javadoc) (pike-mode . autodoc) (c-mode . gtkdoc))</font> <br><font size=3D2 face=3D"sans-serif"> c-cleanup-list '(scope-operato= r)</font> <br><font size=3D2 face=3D"sans-serif"> c-hanging-braces-alist '((brac= e-list-open) (brace-entry-open) (statement-cont) (substatement-open after)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (block-close . c-snug-do-w= hile) (extern-lang-open after) (namespace-open after)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (module-open after) (compo= sition-open after) (inexpr-class-open after)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (inexpr-class-close before) (arglist-cont-nonempty))</font> <br><font size=3D2 face=3D"sans-serif"> c-hanging-colons-alist nil</fo= nt> <br><font size=3D2 face=3D"sans-serif"> c-hanging-semi&comma-crite= ria '(c-semi&comma-inside-parenlist)</font> <br><font size=3D2 face=3D"sans-serif"> c-backslash-column 48</font> <br><font size=3D2 face=3D"sans-serif"> c-backslash-max-column 72</fon= t> <br><font size=3D2 face=3D"sans-serif"> c-special-indent-hook nil</fon= t> <br><font size=3D2 face=3D"sans-serif"> c-label-minimum-indentation 1<= /font> <br><font size=3D2 face=3D"sans-serif"> c-offsets-alist '((inexpr-stat= ement . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (lambda-intro-cont . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (inlambda . c-lineup-inexpr-block)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (template-args-cont c-lineup-template-args +)</f= ont> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (incomposition . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (inmodule . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (innamespace . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (inextern-lang . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (composition-close . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (module-close . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (namespace-close . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (extern-lang-close . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (composition-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (module-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (namespace-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (extern-lang-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (objc-method-call-cont c-lineup-ObjC-method-call= -colons c-lineup-ObjC-method-call +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (objc-method-args-cont . c-lineup-ObjC-method-ar= gs)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (objc-method-intro . [0])</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (friend . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (cpp-define-intro c-lineup-cpp-define +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (cpp-macro-cont . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (cpp-macro . [0])</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (inclass . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (stream-op . c-lineup-streamop)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (arglist-close . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (arglist-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (arglist-cont c-lineup-gcc-asm-reg 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (arglist-intro . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (comment-intro c-lineup-knr-region-comment c-lin= eup-comment)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (catch-clause . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (else-clause . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (do-while-closure . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (access-label . -)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (case-label . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (substatement . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (statement-case-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (statement-case-intro . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (statement . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (brace-entry-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (brace-list-entry . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (brace-list-intro . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (brace-list-close . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (brace-list-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (block-close . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (block-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (inher-cont . c-lineup-multi-inher)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (inher-intro . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (member-init-cont . c-lineup-multi-inher)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (member-init-intro . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (annotation-var-cont . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (annotation-top-cont . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (topmost-intro-cont . c-lineup-topmost-intro-con= t)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (topmost-intro . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (knr-argdecl . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (func-decl-cont . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (inline-close . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (class-close . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (class-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (defun-block-intro . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (defun-close . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (defun-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (c . c-lineup-C-comments)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (string . c-lineup-dont-change)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (inexpr-class . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (inline-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (statement-cont . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (label . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (substatement-label . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (substatement-open . 0)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (knr-argdecl-intro . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; (statement-block-intro . +)</font> <br><font size=3D2 face=3D"sans-serif"> &= nbsp; )</font> <br><font size=3D2 face=3D"sans-serif"> c-buffer-is-cc-mode 'c-mode</f= ont> <br><font size=3D2 face=3D"sans-serif"> c-tab-always-indent t</font> <br><font size=3D2 face=3D"sans-serif"> c-syntactic-indentation t</fon= t> <br><font size=3D2 face=3D"sans-serif"> c-syntactic-indentation-in-mac= ros t</font> <br><font size=3D2 face=3D"sans-serif"> c-ignore-auto-fill '(string cpp code)</font> <br><font size=3D2 face=3D"sans-serif"> c-auto-align-backslashes t</fo= nt> <br><font size=3D2 face=3D"sans-serif"> c-backspace-function 'backward= -delete-char-untabify</font> <br><font size=3D2 face=3D"sans-serif"> c-delete-function 'delete-char= </font> <br><font size=3D2 face=3D"sans-serif"> c-electric-pound-behavior nil<= /font> <br><font size=3D2 face=3D"sans-serif"> c-default-style "bsd"= ;</font> <br><font size=3D2 face=3D"sans-serif"> c-enable-xemacs-performance-kl= udge-p nil</font> <br><font size=3D2 face=3D"sans-serif"> c-old-style-variable-behavior nil</font> <br><font size=3D2 face=3D"sans-serif"> defun-prompt-regexp nil</font> <br><font size=3D2 face=3D"sans-serif"> tab-width 4</font> <br><font size=3D2 face=3D"sans-serif"> comment-column 32</font> <br><font size=3D2 face=3D"sans-serif"> parse-sexp-ignore-comments t</= font> <br><font size=3D2 face=3D"sans-serif"> parse-sexp-lookup-properties t= </font> <br><font size=3D2 face=3D"sans-serif"> auto-fill-function nil</font> <br><font size=3D2 face=3D"sans-serif"> comment-multi-line t</font> <br><font size=3D2 face=3D"sans-serif"> comment-start-skip "\\(//= +\\|/\\*+\\)\\s *"</font> <br><font size=3D2 face=3D"sans-serif"> fill-prefix nil</font> <br><font size=3D2 face=3D"sans-serif"> fill-column 70</font> <br><font size=3D2 face=3D"sans-serif"> paragraph-start "[ ]*\\(//+\\|\\**\\)[ ]*$\\|^\f"</font> <br><font size=3D2 face=3D"sans-serif"> adaptive-fill-mode t</font> <br><font size=3D2 face=3D"sans-serif"> adaptive-fill-regexp "[ &= nbsp; ]*\\(//+\\|\\**\\)[ ]*\\([ ]*\\([-–!|#%;>*=B7•‣= ;⁃◦]+[ ]*\\)*\\)"</font> <br><font size=3D2 face=3D"sans-serif"> )<br> </font> <br> <table width=3D400 style=3D"border-collapse:collapse;"> <tr height=3D8> <td width=3D400 style=3D"border-style:none none none none;border-color:#000= 000;border-width:0px 0px 0px 0px;padding:0px 0px;"> <hr noshade> <p><font size=3D1 face=3D"Arial">Dr Chris Wagner<br> Senior Consultant, Medical Technology </font> <p><font size=3D1 color=3D#4181c0 face=3D"Arial"><b>Cambridge Consultants</= b></font><font size=3D1 face=3D"Arial"><br> Science Park, Milton Road <br> Cambridge, CB4 0DW, England<br> Switchboard: +44 (0)1223 420024<br> Direct dial: +44 (0)1223 392497<br> Fax: +44 (0)1223 423373</font><font size=3D1 color=3Dblue face=3D"Arial"><b= r> </font><a href=3Dmailto:chris.wagner@HIDDEN><font size=3D= 1 color=3D#4181c0 face=3D"Arial">chris.wagner@HIDDEN</fon= t></a><font size=3D1 color=3Dblue face=3D"Arial"><br> </font><a href=3Dhttp://www.cambridgeconsultants.com/><font size=3D1 color= =3D#4181c0 face=3D"Arial">www.CambridgeConsultants.com</font></a><font size= =3D1 face=3D"Arial"><br> </font></table> <br><font size=3D2 face=3D"sans-serif"><br> </font> <br><font size=3D2 face=3D"sans-serif"><br> </font> <hr><font size=3D1 face=3D"Arial"><br> <br> This email is from Cambridge Consultants Limited, Science Park, Milton Road, Cambridge CB4 0DW with registered number 1036298 England. It may contain confidential information. It is intended for the addressee only and may not be copied or disclosed to any third party without our permissio= n. If you are not the intended recipient please contact the sender as soon as possible and delete the material from any computer. If this email has been sent as a personal message to the addressee, the sender is not acting in his/her capacity as an employee or officer of Cambridge Consultants Limited and no liability is accepted for the content of any such email. Outgoing email may be monitored for the purpose of ensuring compliance with our email policy and relevant laws.</font><font size=3D2 face=3D"sans-= serif"><br> </font> <br> <br> --=_alternative 004B923E802580BB_=--
Chris Wagner <chris.wagner@HIDDEN>
:help-debbugs@HIDDEN
.
Full text available.help-debbugs@HIDDEN
:bug#25608
; Package debbugs.gnu.org
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.