From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 25 06:37:28 2022 Received: (at submit) by debbugs.gnu.org; 25 Oct 2022 10:37:28 +0000 Received: from localhost ([127.0.0.1]:50515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onHJH-0000gk-Mu for submit@debbugs.gnu.org; Tue, 25 Oct 2022 06:37:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:40038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onHJF-0000gc-Dy for submit@debbugs.gnu.org; Tue, 25 Oct 2022 06:37:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onHJF-0002ow-7S for bug-gnu-emacs@gnu.org; Tue, 25 Oct 2022 06:37:25 -0400 Received: from sonic317-34.consmr.mail.ne1.yahoo.com ([66.163.184.45]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onHJB-0002P1-Jq for bug-gnu-emacs@gnu.org; Tue, 25 Oct 2022 06:37:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666694238; bh=asloYY+ybSgCcr940vKXUHKC6D81kRli8/d0kuxlSsU=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=dqjvatKPFumYOwg0dTYnI8XDam4NZM3DOw+Kc58/l/r3YjnJbkaBcvtd/EI+mslN4Z9bfy/G4IgZL1W5xlCv7CM1X2k0tyN3aHLVF5VBpaaU5YQkN/uWtKvK13RJiAVhj6YgrragXYy3j0Cz8sEWsc1lkUVfxH1o+//vrZRkD3FsPLZndnSjmdLzdE0y7SFUDfhT7YIAPdMYy2Y4qWSwaJxJxOUKn7wK4DKaq4k5lOiW9GEUEEEMr82J/hfnDTbQ3Pskhs4SrBnKqRvu5/5/b8qsgkAeNFjwOST0K7PoZYr/LdFBBVVb4NmYMoHcEUGSCS/C3+XdjxrPHACq+/WtQA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666694238; bh=MNqagCjtXbsgy5iOh5A+P1b3LeVmhGtQhozEAOxsYNs=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=sxBAVDMOijLtxdobCmYwGXx+XS6G7k22kbxzFOCfhPsLuw/4kuygHT80IMqnHQxj8yiDgt/nK9PPdYHzSBAjTkhmDSt5MMweHzMluDCJFxZJsxEpLqlJJSGqcjUhE4uPWj70Q2DySVVA+yQIDQQ/Nyhzg2Q2m7xk0q46gI0C1xy6Hw3jVrSqR0/GLGkJx6AKoSVKh3F4foC3S8zudzu1CGuy/MGolFPfH1xyFS9upu+agzk5qySeuMClh/LNqMgXmnyAWzU7n8cV7q0UVAlDuVyTUX7uxGld6bgODbV7dp4I+BWkFiqYmXppmG6zIRp9yDUJrQYer7pU9nu9yVDLSA== X-YMail-OSG: 2u5KDXIVM1kwB3pjdoG9ISQ9oOzLuW.ncjGgd9SljMX083SATc3QI8a5C3jcNiY _0XWC41obuhamkhMFY.XJx8WsHK0oujGJ7sS8DhPOw_FDaZUzndkBQ7YRTxI5hCKp_7IpqWlq_vE 25.yb1en_DHB1JPi0YaYfCtzA83xaCcqH6pHmC2IxuvikXyJKcBGX34Au9tcXpgNAGYnnmH5nBCs qij_oeKGk6OK9r5zeUdCVZgEGgOH6_jSQEX9gSnp5dcQ5Kf254dUj.XhORybuD4k3KpaN4JkbfGB STzATiPDNYjFeX9hIMk_Q0qDIIVJz0LRgF.nJJ0pKylaw1ruURpwbkvWvelbhslPymgojVEHikzP Ky7.5J5_Zawy0smhnTcgHk4oui9Iwjke8BUcI.sVxVEh.NL0GQEVJbCPN.J9vQAC4dbVKihpTvzA gyNar4.9NTHLgFoBTRKCq4s17QBpvoucfjiEITkqFboJeV5iG2d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kp40rVf21VtWCoOHt8zo 73IKLZ54xF4XdjGP2pn4F_K4mh_zlT2k1tBpyd5Hhjh2_iUzdYeGXwlHlrl.HfJQw2dSfKc.LMHw M5c0j_CWk0V9fjxB2s4o57VNT37WY6g17dFAQgH8hX4MleE3SB24Kg2GprKkuE3BG6K5qnP6LJXy W87yHwyVYrxaskTYZgOb7Rt..YmpWyS3v5gcz4jr6RQwf48Ht2m7WjWy5619GMcjSz8ws3FPrUcr Wl2P.6TZY5YoDT2DpWYFRZjCU1QpjqohrzUMf2.sg6pFDES4hUZeLS14rOHcOdWmnhjTsKCrtGRT zSabaTNkQaC7ZFnb9EUC3Wp.yxvYcI_2X7uai0F8Pt2Hs4Pox8fl4C0AEPyV5MY9dXmcYyynla7g 0RAIhSm2enVQCwiLtoq2N2WD7q1FCMEXj4V.W2OJL_8_FuT3WQGVnPt7V5Mqqgx6nAkBNNzYpbVF DHtBvVn2gRFyn3njfVJZ0N4qjjI_2_RuuprapqN18SSdasn2OIvnJrUe5.GvYK6Juv.LW4BYcCUi EjxyUWjkq6Bap0ccPDQJYbc2doACXPnnTlWuyk.EZ1u9Tzr1ahKYUjfdSyBeoZkMG3Wp5D1uMer1 zF7UntrU0J4uDK_srNhnalIIFt6bD.lGdg.JYGF0EECjs7xZNyUoUhyZssz3X934J1KTxkWfM_0G ga31PppVrx7zLabyf1bGpveKRH_piG.1A8Ht89AOEQkHQ87m4uQ-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Tue, 25 Oct 2022 10:37:18 +0000 Received: by hermes--production-sg3-74fb94585-6k8mp (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 32c552e415d85aaa872d53bc032bbc4d; Tue, 25 Oct 2022 10:37:14 +0000 (UTC) From: Po Lu To: bug-gnu-emacs@gnu.org Subject: CC Mode 5.35.1 (C/*l); CC Mode fails to fontify source_y in Fx_translate_coordinates X-Debbugs-Package: cc-mode Date: Tue, 25 Oct 2022 18:37:10 +0800 Message-ID: <877d0o2nqh.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable References: <877d0o2nqh.fsf.ref@yahoo.com> X-Mailer: WebService/1.1.20754 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 5674 Received-SPF: pass client-ip=66.163.184.45; envelope-from=luangruo@yahoo.com; helo=sonic317-34.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: submit 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.6 (-) Package: cc-mode Go to src/xfns.c in the Emacs 29 source code. Somewhere around line 7935, there will be the following function definition: DEFUN ("x-translate-coordinates", Fx_translate_coordinates, Sx_translate_coordinates, 1, 5, 0, doc: /* Translate coordinates from FRAME. Translate the given coordinates SOURCE-X and SOURCE-Y from SOURCE-WINDOW's coordinate space to that of DEST-WINDOW, on FRAME. If SOURCE-X and SOURCE-Y are nil, use 0 instead. FRAME can either be a terminal or a frame. If nil, it defaults to the selected frame. SOURCE-WINDOW must be an X window ID, 0 (which means to use the root window), or nil, which means to use FRAME's inner window. DEST-WINDOW must be another X window ID, or nil (which means to use the root window). Return a list of (X Y CHILD) if the given coordinates are on the same screen, or nil otherwise, where X and Y are the coordinates in DEST-WINDOW's coordinate space, and CHILD is the window ID of any mapped child in DEST-WINDOW at those coordinates, or nil if there is no such window. */) (Lisp_Object frame, Lisp_Object source_window, Lisp_Object dest_window, Lisp_Object source_x, Lisp_Object source_y) { In that function definition, "Lisp_Object source_y" is not fontified. This did not happen in Emacs 28. Emacs : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu) of 2022-10-17 Package: CC Mode 5.35.1 (C/*l) Buffer Style: GNU c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-st= ring-delim gen-comment-delim syntax-properties category-properties 1-bit) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq c-basic-offset 2 c-comment-only-line-offset '(0 . 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 . "#+") (= other . "//+\\|\\**")) c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc) (c-mode = . gtkdoc) (c++-mode . gtkdoc)) c-cleanup-list '(scope-operator) c-hanging-braces-alist '((substatement-open before after) (arglist-cont-no= nempty)) 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 '(t c-gnu-impose-minimum) c-label-minimum-indentation 1 c-offsets-alist '((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . 0) (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-cont-nonempty c-lineup-gcc-asm-reg c-lineup-arglist) (arglist-cont c-lineup-gcc-asm-reg 0) (comment-intro c-lineup-knr-region-comment c-lineup-comment) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . 0) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-close . 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 . 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) (topmost-intro-cont first c-lineup-topmost-intro-cont c-lineup-gnu-DEF= UN-intro-cont) (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-c= lass-decl-init-+ +) (brace-list-open . +) (inline-open . 0) (arglist-close . c-lineup-arglist) (arglist-intro . c-lineup-arglist-intro-after-paren) (statement-cont . +) (statement-case-open . +) (label . 0) (substatement-label . 0) (substatement-open . +) (knr-argdecl-intro . 5) (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 '((java-mode . "java") (awk-mode . "awk") (other . "gnu")) c-enable-xemacs-performance-kludge-p nil c-old-style-variable-behavior nil defun-prompt-regexp nil tab-width 8 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 "[ ]*\\(//+\\|\\**\\)[ ]*\\([ ]*\\([-=E2=80=93!|#%= ;>*=C2=B7=E2=80=A2=E2=80=A3=E2=81=83=E2=97=A6]+[ ]*\\)*\\)" ) From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 28 15:54:21 2022 Received: (at 58772) by debbugs.gnu.org; 28 Oct 2022 19:54:21 +0000 Received: from localhost ([127.0.0.1]:34342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooVQq-0002p5-97 for submit@debbugs.gnu.org; Fri, 28 Oct 2022 15:54:20 -0400 Received: from mx3.muc.de ([193.149.48.5]:50132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooVQn-0002op-8i for 58772@debbugs.gnu.org; Fri, 28 Oct 2022 15:54:18 -0400 Received: (qmail 5898 invoked by uid 3782); 28 Oct 2022 21:54:08 +0200 Received: from acm.muc.de (p4fe15a67.dip0.t-ipconnect.de [79.225.90.103]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 28 Oct 2022 21:54:08 +0200 Received: (qmail 18968 invoked by uid 1000); 28 Oct 2022 19:54:08 -0000 Date: Fri, 28 Oct 2022 19:54:08 +0000 To: Po Lu Subject: Re: bug#58772: CC Mode 5.35.1 (C/*l); CC Mode fails to fontify source_y in Fx_translate_coordinates Message-ID: References: <877d0o2nqh.fsf.ref@yahoo.com> <877d0o2nqh.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3MAId7v+MY5cu/+f" Content-Disposition: inline In-Reply-To: <877d0o2nqh.fsf@yahoo.com> 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: 58772 Cc: 58772@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 (-) --3MAId7v+MY5cu/+f Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello again, Po. On Tue, Oct 25, 2022 at 18:37:10 +0800, Po Lu via CC-Mode-help wrote: > Package: cc-mode > Go to src/xfns.c in the Emacs 29 source code. Somewhere around line > 7935, there will be the following function definition: > DEFUN ("x-translate-coordinates", Fx_translate_coordinates, > Sx_translate_coordinates, > 1, 5, 0, doc: /* Translate coordinates from FRAME. > Translate the given coordinates SOURCE-X and SOURCE-Y from > SOURCE-WINDOW's coordinate space to that of DEST-WINDOW, on FRAME. > If SOURCE-X and SOURCE-Y are nil, use 0 instead. > FRAME can either be a terminal or a frame. If nil, it defaults to the > selected frame. SOURCE-WINDOW must be an X window ID, 0 (which means > to use the root window), or nil, which means to use FRAME's inner > window. DEST-WINDOW must be another X window ID, or nil (which means > to use the root window). > Return a list of (X Y CHILD) if the given coordinates are on the same > screen, or nil otherwise, where X and Y are the coordinates in > DEST-WINDOW's coordinate space, and CHILD is the window ID of any > mapped child in DEST-WINDOW at those coordinates, or nil if there is > no such window. */) > (Lisp_Object frame, Lisp_Object source_window, > Lisp_Object dest_window, Lisp_Object source_x, > Lisp_Object source_y) > { > In that function definition, "Lisp_Object source_y" is not fontified. > This did not happen in Emacs 28. This was an unintended consequence of some recent changes. Sorry. I can't explain in any reasonable way what was wrong, but I think the attached patch should fix it. Would you please do the usual with the patch, and let me know whether or not the bug really is fixed, and whether anything else untoward is caused by it. Thanks! > Emacs : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu) > of 2022-10-17 > Package: CC Mode 5.35.1 (C/*l) > Buffer Style: GNU > c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties category-properties 1-bit) [ .... ] -- Alan Mackenzie (Nuremberg, Germany). --3MAId7v+MY5cu/+f Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="diff.20221028.diff" diff -r ebb9daec71c9 cc-fonts.el --- a/cc-fonts.el Fri Oct 28 17:11:41 2022 +0000 +++ b/cc-fonts.el Fri Oct 28 19:49:21 2022 +0000 @@ -1221,134 +1221,145 @@ (c-backward-syntactic-ws) (eq (char-before) ?\())))) (c-get-fontification-context (point) not-front-decl toplev)) - ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?< ?{))) - (cons (and toplev 'top) nil)) - ;; A control flow expression or a decltype - ((and (eq (char-before match-pos) ?\() - (save-excursion - (goto-char match-pos) - (backward-char) - (c-backward-token-2) - (cond - ((looking-at c-paren-stmt-key) - ;; Allow comma separated <> arglists in for statements. - (cons nil nil)) - ((or (looking-at c-block-stmt-2-key) - (looking-at c-block-stmt-1-2-key) - (looking-at c-typeof-key)) - (cons nil t)) - (t nil))))) - ;; Near BOB. - ((<= match-pos (point-min)) - (cons 'arglist t)) - ;; Got a cached hit in a declaration arglist. - ((eq type 'c-decl-arg-start) - (cons 'decl nil)) - ;; We're inside (probably) a brace list. - ((eq type 'c-not-decl) - (cons 'not-decl nil)) - ;; Inside a C++11 lambda function arglist. - ((and (c-major-mode-is 'c++-mode) - (eq (char-before match-pos) ?\() - (save-excursion - (goto-char match-pos) - (c-backward-token-2) - (and - (c-safe (goto-char (scan-sexps (point) -1))) - (c-looking-at-c++-lambda-capture-list)))) - (c-put-char-property (1- match-pos) 'c-type - 'c-decl-arg-start) - (cons 'decl nil)) - ;; We're inside a brace list. - ((and (eq (char-before match-pos) ?{) - (c-inside-bracelist-p (1- match-pos) - (cdr (c-parse-state)) - nil)) - (c-put-char-property (1- match-pos) 'c-type - 'c-not-decl) - (cons 'not-decl nil)) - ;; We're inside an "ordinary" open brace. - ((eq (char-before match-pos) ?{) - (cons (and toplev 'top) nil)) - ;; Inside an angle bracket arglist. - ((or (eq type 'c-<>-arg-sep) - (eq (char-before match-pos) ?<)) - (cons '<> nil)) - ;; Got a cached hit in some other type of arglist. - (type - (cons 'arglist t)) - ;; We're at a C++ uniform initialization. - ((and (c-major-mode-is 'c++-mode) - (eq (char-before match-pos) ?\() - (save-excursion - (goto-char match-pos) - (and - (zerop (c-backward-token-2 2)) - (looking-at c-identifier-start) - (c-got-face-at (point) - '(font-lock-variable-name-face))))) - (cons 'not-decl nil)) - ((and not-front-decl + ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?< ?{))) + (cons (and toplev 'top) nil)) + ;; A control flow expression or a decltype + ((and (eq (char-before match-pos) ?\() + (save-excursion + (goto-char match-pos) + (backward-char) + (c-backward-token-2) + (cond + ((looking-at c-paren-stmt-key) + ;; Allow comma separated <> arglists in for statements. + (cons nil nil)) + ((or (looking-at c-block-stmt-2-key) + (looking-at c-block-stmt-1-2-key) + (looking-at c-typeof-key)) + (cons nil t)) + (t nil))))) + ;; Near BOB. + ((<= match-pos (point-min)) + (cons 'arglist t)) + ;; Got a cached hit in a declaration arglist. + ((eq type 'c-decl-arg-start) + (cons 'decl nil)) + ;; We're inside (probably) a brace list. + ((eq type 'c-not-decl) + (cons 'not-decl nil)) + ;; Inside a C++11 lambda function arglist. + ((and (c-major-mode-is 'c++-mode) + (eq (char-before match-pos) ?\() + (save-excursion + (goto-char match-pos) + (c-backward-token-2) + (and + (c-safe (goto-char (scan-sexps (point) -1))) + (c-looking-at-c++-lambda-capture-list)))) + (c-put-char-property (1- match-pos) 'c-type + 'c-decl-arg-start) + (cons 'decl nil)) + ;; We're inside a brace list. + ((and (eq (char-before match-pos) ?{) + (c-inside-bracelist-p (1- match-pos) + (cdr (c-parse-state)) + nil)) + (c-put-char-property (1- match-pos) 'c-type + 'c-not-decl) + (cons 'not-decl nil)) + ;; We're inside an "ordinary" open brace. + ((eq (char-before match-pos) ?{) + (cons (and toplev 'top) nil)) + ;; Inside an angle bracket arglist. + ((or (eq type 'c-<>-arg-sep) + (eq (char-before match-pos) ?<)) + (cons '<> nil)) + ;; Got a cached hit in some other type of arglist. + (type + (cons 'arglist t)) + ;; We're at a C++ uniform initialization. + ((and (c-major-mode-is 'c++-mode) + (eq (char-before match-pos) ?\() + (save-excursion + (goto-char match-pos) + (and + (zerop (c-backward-token-2 2)) + (looking-at c-identifier-start) + (c-got-face-at (point) + '(font-lock-variable-name-face))))) + (cons 'not-decl nil)) + ((and not-front-decl ;; The point is within the range of a previously ;; encountered type decl expression, so the arglist ;; is probably one that contains declarations. ;; However, if `c-recognize-paren-inits' is set it ;; might also be an initializer arglist. - (or (not c-recognize-paren-inits) - (save-excursion - (goto-char match-pos) - (not (c-back-over-member-initializers))))) - ;; The result of this check is cached with a char - ;; property on the match token, so that we can look - ;; it up again when refontifying single lines in a - ;; multiline declaration. - (c-put-char-property (1- match-pos) - 'c-type 'c-decl-arg-start) - (cons 'decl nil)) - ;; Got (an) open paren(s) preceded by an arith operator. - ((and (eq (char-before match-pos) ?\() - (save-excursion - (goto-char match-pos) - (while - (and (zerop (c-backward-token-2)) - (eq (char-after) ?\())) - (looking-at c-arithmetic-op-regexp))) - (cons nil nil)) - ;; In a C++ member initialization list. - ((and (eq (char-before match-pos) ?,) - (c-major-mode-is 'c++-mode) - (save-excursion - (goto-char match-pos) - (c-back-over-member-initializers))) - (c-put-char-property (1- match-pos) 'c-type 'c-not-decl) - (cons 'not-decl nil)) - ;; At start of a declaration inside a declaration paren. - ((save-excursion + (or (not c-recognize-paren-inits) + (save-excursion + (goto-char match-pos) + (not (c-back-over-member-initializers))))) + ;; The result of this check is cached with a char + ;; property on the match token, so that we can look + ;; it up again when refontifying single lines in a + ;; multiline declaration. + (c-put-char-property (1- match-pos) + 'c-type 'c-decl-arg-start) + (cons 'decl nil)) + ;; Got (an) open paren(s) preceded by an arith operator. + ((and (eq (char-before match-pos) ?\() + (save-excursion + (goto-char match-pos) + (while + (and (zerop (c-backward-token-2)) + (eq (char-after) ?\())) + (looking-at c-arithmetic-op-regexp))) + (cons nil nil)) + ;; In a C++ member initialization list. + ((and (eq (char-before match-pos) ?,) + (c-major-mode-is 'c++-mode) + (save-excursion (goto-char match-pos) - (and (memq (char-before match-pos) '(?\( ?\,)) - (c-go-up-list-backward match-pos - ; c-determine-limit is too slow, here. - (max (- (point) 2000) (point-min))) - (eq (char-after) ?\() - (let ((type (c-get-char-property (point) 'c-type))) - (or (memq type '(c-decl-arg-start c-decl-type-start)) - (and - (progn (c-backward-syntactic-ws) t) - (or - (and - (c-back-over-compound-identifier) - (progn - (c-backward-syntactic-ws) - (or (bobp) - (progn - (setq type (c-get-char-property (1- (point)) - 'c-type)) - (memq type '(c-decl-arg-start - c-decl-type-start)))))) - (and (zerop (c-backward-token-2)) - (looking-at c-fun-name-substitute-key)))))))) - (cons 'decl nil)) - (t (cons 'arglist t))))) + (c-back-over-member-initializers))) + (c-put-char-property (1- match-pos) 'c-type 'c-not-decl) + (cons 'not-decl nil)) + ;; At start of a declaration inside a declaration paren. + ((save-excursion + (goto-char match-pos) + (and (memq (char-before match-pos) '(?\( ?\,)) + (c-go-up-list-backward match-pos + ; c-determine-limit is too slow, here. + (max (- (point) 2000) (point-min))) + (eq (char-after) ?\() + (let ((type (c-get-char-property (point) 'c-type))) + (or (memq type '(c-decl-arg-start c-decl-type-start)) + (progn + (c-backward-syntactic-ws) + (cond + ((and toplev + (eq (char-before) ?\))) + (save-excursion + (and (c-go-list-backward nil (max (- (point) 2000) + (point-min))) + (eq (char-after) ?\() + (progn (c-backward-syntactic-ws) + (c-back-over-compound-identifier))))) + ((save-excursion + (and + (c-back-over-compound-identifier) + (progn + (c-backward-syntactic-ws) + (or (bobp) + (progn + (setq type (c-get-char-property (1- (point)) + 'c-type)) + (memq type '(c-decl-arg-start + c-decl-type-start)))))))) + ((and (zerop (c-backward-token-2)) + (looking-at c-fun-name-substitute-key))))))))) + ;; Cache the result of this test for next time around. + (c-put-char-property (1- match-pos) 'c-type 'c-decl-arg-start) + (cons 'decl nil)) + (t (cons 'arglist t))))) (defun c-font-lock-single-decl (limit decl-or-cast match-pos context toplev) ;; Try to fontify a single declaration, together with all its declarators. --3MAId7v+MY5cu/+f-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 28 20:36:42 2022 Received: (at 58772) by debbugs.gnu.org; 29 Oct 2022 00:36:42 +0000 Received: from localhost ([127.0.0.1]:34531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooZq6-00081z-8y for submit@debbugs.gnu.org; Fri, 28 Oct 2022 20:36:42 -0400 Received: from sonic303-22.consmr.mail.ne1.yahoo.com ([66.163.188.148]:34000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooZq2-00081k-Id for 58772@debbugs.gnu.org; Fri, 28 Oct 2022 20:36:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1667003791; bh=9rmFHkoNoxBpoQIwffVoVv93BeVX4PDuIcOtbvTzcEU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=ci4d5G7P4qoPC5A7RpDYQ0ifyz5xyhuM8f4ajLjyI5jjqO8q3gdKyafdSO59RAscZSv/6zcSPJXSMbhL1Wc8IivmUn1HHIc001AAtUb5RenMw7vW6KeUUqX9ur1Q3kbV4fBkF+xKib8EHZsSOStF0FG5QTnYo3xHYY02jVN1kgcQHj69ln2yz9M2OMR+AQ70B+azcPlGSFPoLfuDaAvIfcJEBDegl0Tb/4kSa6mDoxy12les4lD0RcQaKMqhaedafUFWuqRfnSSRclRtoi6Lbgq4br8s/UdSARdZgyFLSFsg/4I0SoLqOm/AnlRX2wZKNGBFxCHiutknNTvUbEb01A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1667003791; bh=IJMM6Z28s3SUk4lG1or0e6iEkIFnDOU2YwoZ5kWpJb3=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=TvHdEUFGrz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I3.s7EaeHi2qxFembA2sgvHg3JylUU8K94BPtc1B.trtjeNiJr9ke_OCza3gqEUoLkZ6TJgoA dexHbpf4Jw_47LDY5Bavp_rMgJKtTgLL4aiV1ESTOAs085hfTgja1M4HP6KXqoc6mMp9if64iEJp l5zmncFDhMnNpQjeH6Vl8KY39GOj_Zqz0RbQ._BvihcV3txDNxR3I7ugHJbGmm4OQZISsBBhCziG 0oCmHKhrqPfbEM.3amwCLQGxjeirmE1e3uqHAMdiEkdpNGDOTPkayRd9yiqz2KQ_yu2kQapLd1Ox 1f3pWhFGS034NY9IlnbPRlYtofdo9F2mCSDALM3gKLMqtI1QfizjDr9ycqaNCs7apE1lZzh5WxM5 p5THywE84mQViOawmh.WALk4N.UjsNRbw2xvCfzUDAqANdl.Ase4sybivyeTnG7pgmNoa8tZ8Iny _Rc5U5JVuC196nycA0KW9sk7PghheryOOpn7pxcc7O82ZOBqrhuJRmM65y7VmRUz4Rkvq X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Sat, 29 Oct 2022 00:36:31 +0000 Received: by hermes--production-sg3-74fb94585-65f2n (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 755d6f985c2fb3ba95420b1d1087f783; Sat, 29 Oct 2022 00:36:24 +0000 (UTC) From: Po Lu To: Alan Mackenzie Subject: Re: bug#58772: CC Mode 5.35.1 (C/*l); CC Mode fails to fontify source_y in Fx_translate_coordinates In-Reply-To: (Alan Mackenzie's message of "Fri, 28 Oct 2022 19:54:08 +0000") References: <877d0o2nqh.fsf.ref@yahoo.com> <877d0o2nqh.fsf@yahoo.com> Date: Sat, 29 Oct 2022 08:36:18 +0800 Message-ID: <87edur4gal.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20783 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 495 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58772 Cc: 58772@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 (-) Alan Mackenzie writes: > This was an unintended consequence of some recent changes. Sorry. > > I can't explain in any reasonable way what was wrong, but I think the > attached patch should fix it. Would you please do the usual with the > patch, and let me know whether or not the bug really is fixed, and > whether anything else untoward is caused by it. Thanks! Should be fixed, but I haven't used it enough to say whether or not it causes any regressions elsewhere. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 06:18:34 2022 Received: (at 58772-done) by debbugs.gnu.org; 29 Oct 2022 10:18:34 +0000 Received: from localhost ([127.0.0.1]:34999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooivC-000248-7x for submit@debbugs.gnu.org; Sat, 29 Oct 2022 06:18:34 -0400 Received: from mx3.muc.de ([193.149.48.5]:35539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooiv6-00023q-65 for 58772-done@debbugs.gnu.org; Sat, 29 Oct 2022 06:18:33 -0400 Received: (qmail 68656 invoked by uid 3782); 29 Oct 2022 12:18:21 +0200 Received: from acm.muc.de (p4fe15996.dip0.t-ipconnect.de [79.225.89.150]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 29 Oct 2022 12:18:20 +0200 Received: (qmail 7416 invoked by uid 1000); 29 Oct 2022 10:18:17 -0000 Date: Sat, 29 Oct 2022 10:18:17 +0000 To: Po Lu Subject: Re: bug#58772: CC Mode 5.35.1 (C/*l); CC Mode fails to fontify source_y in Fx_translate_coordinates Message-ID: References: <877d0o2nqh.fsf.ref@yahoo.com> <877d0o2nqh.fsf@yahoo.com> <87edur4gal.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87edur4gal.fsf@yahoo.com> 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: 58772-done Cc: 58772-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Po. On Sat, Oct 29, 2022 at 08:36:18 +0800, Po Lu wrote: > Alan Mackenzie writes: > > This was an unintended consequence of some recent changes. Sorry. > > I can't explain in any reasonable way what was wrong, but I think the > > attached patch should fix it. Would you please do the usual with the > > patch, and let me know whether or not the bug really is fixed, and > > whether anything else untoward is caused by it. Thanks! > Should be fixed, but I haven't used it enough to say whether or not it > causes any regressions elsewhere. Thanks for trying it out! Despite the uncertainty, I'm closing this bug with this post anyway. If there are any regressions, we can always open it again, or open a new bug. > Thanks. -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Aug 11 18:16:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 26 Nov 2022 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator