From unknown Mon Jun 23 11:28:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58795: CC Mode 5.35.1 (ObjC//l); Incorrect fontification of structs and enums Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-cc-mode@gnu.org Resent-Date: Wed, 26 Oct 2022 12:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58795 X-GNU-PR-Package: cc-mode X-GNU-PR-Keywords: To: 58795@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166678873531598 (code B ref -1); Wed, 26 Oct 2022 12:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Oct 2022 12:52:15 +0000 Received: from localhost ([127.0.0.1]:53575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onftG-0008DZ-Q3 for submit@debbugs.gnu.org; Wed, 26 Oct 2022 08:52:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:36608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onftA-0008DL-B8 for submit@debbugs.gnu.org; Wed, 26 Oct 2022 08:52:12 -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 1onft8-00086n-RG for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 08:52:08 -0400 Received: from sonic307-56.consmr.mail.ne1.yahoo.com ([66.163.190.31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onft6-0008P2-0A for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 08:52:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666788720; bh=lJWavIlB3Dg+y7ZIH/JjMzg2t7bre0doQLMoWjKSzEc=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=KN+m9VX3LZbMz5eljbNqxhqLv2y9oIy23TGkbEJ3Gv/OBGo2QNJkYNwrvrNmXjMauSK59+oCAIjFMvX1nBMV2mKNaIpBUykp8qpujSuF7qwIafjjeRj1V0PdzVSeTUcEQPSVvTzBlpZsu5do8hLtjRNiiFNBKMuIGlfnCnndyKsHjitspAXzuW0ZcS+Ahsbzwcm5AFc3gNN5emJD0WNKxY+Bmj7KRec/VQ9UxF/R47h+Iy6gI7LnwFhmlzcfEgQGN2HVC0mRy1WLvCmDaWnqnVObYVKniJJ737Z6H6tusHwB8mza5S5YVBitWXZf34JbkGYHMspLNkSnhMQZFCQCFg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666788720; bh=HPmxh3wGmWYsu/znZhtXn5MK8QjYBYHTWpjogFOJhpa=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=iKFptlpdHBTO34k71fYJ7lQI5+jOeRyFxAy6OZisG1yjn6nIkqdiw77m8SL56OyJasO96JUCzVhirtBUxJYjCPABqRUFGHtIwiQkZJhcJ0UqZkWeqtzJfRKgTMPMm1l9oFL38gMegE0EsjbX0ajrXM++MQE/5esOlOpQlWNdr7P6XpugkRI5MO35nKDqyMvSSJmqJsJqkmJANorIOrXI2D8eMQgdXbbAXl4Gk6JlVfgsvQoQ2fqiJVe48JIrE7eNK5FsizPg4NZZosaY4UV8rIFIVNMkOgpqkSX4mgHKdaisi5v1Xglmfn12XS8Z8yNpYiHRqjgSvzoE0ObK+BIcpg== X-YMail-OSG: JT7bj5oVM1lprfRfK9ugnYAL8X38xKO.jp69yvb_IZPCGe3L7av_jkG9xZwV_WN ldEu.nNWXjStAP9I9eGks.MABllk3xXI5898U3mQWb2TZ_paURIlAZWCgJWlP8XzXGZMRjK5aGsj sOpVPFsvaKMicQjebGiQRcoUFe6ir8Mu_MkoA6Kx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-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Wed, 26 Oct 2022 12:52:00 +0000 Received: by hermes--production-sg3-74fb94585-9kz9b (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 74741aa62ce7230bb3e366c3ceaa42c4; Wed, 26 Oct 2022 12:51:54 +0000 (UTC) From: Po Lu Date: Wed, 26 Oct 2022 20:51:48 +0800 Message-ID: <87mt9i928r.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable References: <87mt9i928r.fsf.ref@yahoo.com> X-Mailer: WebService/1.1.20783 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 9124 Received-SPF: pass client-ip=66.163.190.31; envelope-from=luangruo@yahoo.com; helo=sonic307-56.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: -1.3 (-) 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/nsfont.m in the master branch of Emacs's source repository. Notice every "enum gs_font_xxx" and "struct gs_font_data" identifier is fontified as a type. Here are some examples: struct gs_font_data { int specified; enum gs_font_slant slant; enum gs_font_weight weight; enum gs_font_width width; bool monospace_p; char *family_name; }; here, slant, weight and width are fontified as types. static void ns_done_font_data (struct gs_font_data *data) { if (data->specified & GS_SPECIFIED_FAMILY) xfree (data->family_name); } here, data is fontified as a type. static void ns_get_font_data (NSFontDescriptor *desc, struct gs_font_data *dat) { NSNumber *tem; NSFontSymbolicTraits traits =3D [desc symbolicTraits]; NSDictionary *dict =3D [desc objectForKey: NSFontTraitsAttribute]; NSString *family =3D [desc objectForKey: NSFontFamilyAttribute]; dat->specified =3D 0; if (family !=3D nil) { dat->specified |=3D GS_SPECIFIED_FAMILY; dat->family_name =3D xstrdup ([family cStringUsingEncoding: NSUTF8Str= ingEncoding]); } tem =3D [desc objectForKey: NSFontFixedAdvanceAttribute]; if ((tem !=3D nil && [tem boolValue] !=3D NO) || (traits & NSFontMonoSpaceTrait)) { dat->specified |=3D GS_SPECIFIED_SPACING; dat->monospace_p =3D true; } else if (tem !=3D nil && [tem boolValue] =3D=3D NO) { dat->specified |=3D GS_SPECIFIED_SPACING; dat->monospace_p =3D false; } if (traits & NSFontBoldTrait) { dat->specified |=3D GS_SPECIFIED_WEIGHT; dat->weight =3D GS_FONT_WEIGHT_BOLD; } if (traits & NSFontItalicTrait) { dat->specified |=3D GS_SPECIFIED_SLANT; dat->slant =3D GS_FONT_SLANT_ITALIC; } if (traits & NSFontCondensedTrait) { dat->specified |=3D GS_SPECIFIED_WIDTH; dat->width =3D GS_FONT_WIDTH_CONDENSED; } else if (traits & NSFontExpandedTrait) { dat->specified |=3D GS_SPECIFIED_WIDTH; dat->width =3D GS_FONT_WIDTH_EXPANDED; } if (dict !=3D nil) { tem =3D [dict objectForKey: NSFontSlantTrait]; if (tem !=3D nil) { dat->specified |=3D GS_SPECIFIED_SLANT; dat->slant =3D [tem floatValue] > 0 ? GS_FONT_SLANT_ITALIC : ([tem floatValue] < 0 ? GS_FONT_SLANT_REVERSE_ITALIC : GS_FONT_SLANT_NORMAL); } tem =3D [dict objectForKey: NSFontWeightTrait]; if (tem !=3D nil) { dat->specified |=3D GS_SPECIFIED_WEIGHT; dat->weight =3D [tem floatValue] > 0 ? GS_FONT_WEIGHT_BOLD : ([tem floatValue] < -0.4f ? GS_FONT_WEIGHT_LIGHT : GS_FONT_WEIGHT_NORMAL); } tem =3D [dict objectForKey: NSFontWidthTrait]; if (tem !=3D nil) { dat->specified |=3D GS_SPECIFIED_WIDTH; dat->width =3D [tem floatValue] > 0 ? GS_FONT_WIDTH_EXPANDED : ([tem floatValue] < 0 ? GS_FONT_WIDTH_NORMAL : GS_FONT_WIDTH_CONDENSED); } } } here, "dat" is fontified as a type. static bool ns_font_descs_match_p (NSFontDescriptor *desc, NSFontDescriptor *target) { struct gs_font_data dat; struct gs_font_data t; ns_get_font_data (desc, &dat); ns_get_font_data (target, &t); if (!(t.specified & GS_SPECIFIED_WIDTH)) t.width =3D GS_FONT_WIDTH_NORMAL; if (!(t.specified & GS_SPECIFIED_WEIGHT)) t.weight =3D GS_FONT_WEIGHT_NORMAL; if (!(t.specified & GS_SPECIFIED_SPACING)) t.monospace_p =3D false; if (!(t.specified & GS_SPECIFIED_SLANT)) t.slant =3D GS_FONT_SLANT_NORMAL; if (!(t.specified & GS_SPECIFIED_FAMILY)) emacs_abort (); bool match_p =3D true; if (dat.specified & GS_SPECIFIED_WIDTH && dat.width !=3D t.width) { match_p =3D false; goto gout; } if (dat.specified & GS_SPECIFIED_WEIGHT && dat.weight !=3D t.weight) { match_p =3D false; goto gout; } if (dat.specified & GS_SPECIFIED_SPACING && dat.monospace_p !=3D t.monospace_p) { match_p =3D false; goto gout; } if (dat.specified & GS_SPECIFIED_SLANT && dat.monospace_p !=3D t.monospace_p) { if (NSFONT_TRACE) printf ("Matching monospace for %s: %d %d\n", t.family_name, dat.monospace_p, t.monospace_p); match_p =3D false; goto gout; } if (dat.specified & GS_SPECIFIED_FAMILY && strcmp (dat.family_name, t.family_name)) match_p =3D false; gout: ns_done_font_data (&dat); ns_done_font_data (&t); return match_p; } here, "dat" and "t" are fontified as types. However, if part of this function definition is not visible and is later scrolled into the window, "dat" and "t" will not be fontified as types in that newly visible part. Emacs : GNU Emacs 29.0.50 (build 7, x86_64-pc-linux-gnu, NS gnustep-gui-0.= 29.0) of 2022-10-26 Package: CC Mode 5.35.1 (ObjC//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 'objc-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 07:42:48 2022 Received: (at control) by debbugs.gnu.org; 28 Oct 2022 11:42:48 +0000 Received: from localhost ([127.0.0.1]:60528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooNlA-0002a4-F8 for submit@debbugs.gnu.org; Fri, 28 Oct 2022 07:42:48 -0400 Received: from mx3.muc.de ([193.149.48.5]:36042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooNl8-0002Zl-Hl for control@debbugs.gnu.org; Fri, 28 Oct 2022 07:42:47 -0400 Received: (qmail 22306 invoked by uid 3782); 28 Oct 2022 13:42:39 +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 13:42:39 +0200 Received: (qmail 6067 invoked by uid 1000); 28 Oct 2022 11:42:38 -0000 Date: Fri, 28 Oct 2022 11:42:38 +0000 To: control@debbugs.gnu.org Subject: Merge bug#58795 and bug#58796. Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: 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: -1.0 (-) merge 58795 58796 quit -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Jun 23 11:28:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58795: CC Mode 5.35.1 (ObjC//l); Incorrect fontification of structs and enums Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-cc-mode@gnu.org Resent-Date: Fri, 28 Oct 2022 12:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58795 X-GNU-PR-Package: cc-mode X-GNU-PR-Keywords: To: Po Lu Cc: 58795@debbugs.gnu.org Received: via spool by 58795-submit@debbugs.gnu.org id=B58795.166696010022803 (code B ref 58795); Fri, 28 Oct 2022 12:29:02 +0000 Received: (at 58795) by debbugs.gnu.org; 28 Oct 2022 12:28:20 +0000 Received: from localhost ([127.0.0.1]:60566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooOTE-0005vj-C1 for submit@debbugs.gnu.org; Fri, 28 Oct 2022 08:28:20 -0400 Received: from mx3.muc.de ([193.149.48.5]:37353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooOT9-0005vS-Qb for 58795@debbugs.gnu.org; Fri, 28 Oct 2022 08:28:19 -0400 Received: (qmail 12202 invoked by uid 3782); 28 Oct 2022 14:28: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 14:28:08 +0200 Received: (qmail 21309 invoked by uid 1000); 28 Oct 2022 12:28:07 -0000 Date: Fri, 28 Oct 2022 12:28:07 +0000 Message-ID: References: <87mt9i928r.fsf.ref@yahoo.com> <87mt9i928r.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mt9i928r.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-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. Thanks indeed for the bug report. On Wed, Oct 26, 2022 at 20:51:48 +0800, Po Lu via CC-Mode-help wrote: > Package: cc-mode > Go to src/nsfont.m in the master branch of Emacs's source repository. > Notice every "enum gs_font_xxx" and "struct gs_font_data" identifier is > fontified as a type. Here are some examples: > struct gs_font_data > { > int specified; > enum gs_font_slant slant; > enum gs_font_weight weight; > enum gs_font_width width; > bool monospace_p; > char *family_name; > }; > here, slant, weight and width are fontified as types. > static void > ns_done_font_data (struct gs_font_data *data) > { > if (data->specified & GS_SPECIFIED_FAMILY) > xfree (data->family_name); > } > here, data is fontified as a type. [ .... ] The problem was a missing entry for objc-mode in one of the keyword tables in CC Mode. This was easy to find and correct. :-) The fix also seems to have fixed bug #58796, so I've merged the two bugs. I've committed the fix to the master branch, so could you please update your Emacs 29 and check that everything in these bugs is fixed, then let me know. Then I can close the two bugs. Thanks! The amazing thing is that this bug could have lain undiscovered for so long. > here, "dat" and "t" are fontified as types. However, if part of this > function definition is not visible and is later scrolled into the > window, "dat" and "t" will not be fontified as types in that newly > visible part. > Emacs : GNU Emacs 29.0.50 (build 7, x86_64-pc-linux-gnu, NS gnustep-gui-0.29.0) > of 2022-10-26 > Package: CC Mode 5.35.1 (ObjC//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). From unknown Mon Jun 23 11:28:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#58795: CC Mode 5.35.1 (ObjC//l); Incorrect fontification of structs and enums Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-cc-mode@gnu.org Resent-Date: Fri, 28 Oct 2022 13:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58795 X-GNU-PR-Package: cc-mode X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 58795@debbugs.gnu.org Received: via spool by 58795-submit@debbugs.gnu.org id=B58795.16669645906036 (code B ref 58795); Fri, 28 Oct 2022 13:44:01 +0000 Received: (at 58795) by debbugs.gnu.org; 28 Oct 2022 13:43:10 +0000 Received: from localhost ([127.0.0.1]:60704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooPda-0001ZE-T6 for submit@debbugs.gnu.org; Fri, 28 Oct 2022 09:43:10 -0400 Received: from sonic304-21.consmr.mail.ne1.yahoo.com ([66.163.191.147]:42744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooPdT-0001Ye-QR for 58795@debbugs.gnu.org; Fri, 28 Oct 2022 09:43:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666964571; bh=8ZKmptB85N4FaFdUt0882o1gkF6slAaNiwqJASiVSC4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=r7VdRGqnS5WUh59OmzQgMyJoVOU3MhijNgNCgglwSG1lFTTFjrMr8LKsadVh869iQYCSO4f67FQPVPm2IVvbZk+5krJ7LKK5ppMOJMVJYO37GNyE+OWyY2ckB7KhQehg4TlbY+A0lAyPoyfz7vCYCmq5+5/3N+t/M8Ic7hxEjMm7fpo1tpvRB/zLBp/eqbEaTRPtyEOtMdL9HMsLAUOxyfyIqf1isZqvpJfX13u5qE/6yW63k7/w7Cl146MytXBVn7qx88aLdtF/93F/RfabMSFfijShXAZg00kEk+PyL7zwjdBND+2VR1tXSUbE0i0IiQO/MwevvfcZYcQHyuAFAw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666964571; bh=g+btEfGqVstiDf8/d1szjPkDSIyDXCoHXqPq9FUBe1x=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Y8OsbJTkpWMyC3lbckEPGO/PMCe2I5hRDj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1zf3knRwzb1QsNeh6RtufrBvCGRurKgM11kL.eaxWCuMunDp3u8D4JLMQtX_RSxG_PD ks2bIffwZ2w1LKAhq1Xg8I.8zDd5Te3xhe5XVulUB_NNYwbn39Bp9rZWOeKkEF_D7NXJpgTupNw. 51X7d2lt5X5y98a5eXSbcb9QhwCI_liUbUN9pAWuzwEq.Ia8mP6KlR2hUrrDIyv9AO05mzkpxc_F _Yfv58CezASpiehbRinOIGTnEMjsfSIpB6s8UBSylDF7B9OX1wcKNvVoX5jXyE4n8cnZZ5g4Qaf4 vKWVNsnJ60r6UcHmuvEbEuZdcoNBviE3qq2wkNp5mndsYvO1kidEZeqy6q1SnzAkWS8uwcm06mLP DwCm0l19BHqMsLBUn1jBjduZx4SNmzxxWIbXpVn4pe7.oV7D1P1lp_JXSVNSclU86sZpW9uMugWj _EreCowPFN5wjLzBHQOxbS0DrRxrkYIbuYRY_ww8GSOO764_sLP.lwgMzeH3JV8KkYLI- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Fri, 28 Oct 2022 13:42:51 +0000 Received: by hermes--production-sg3-74fb94585-btmps (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e5f961e309fdf4aee518ab314d143f57; Fri, 28 Oct 2022 13:42:47 +0000 (UTC) From: Po Lu In-Reply-To: (Alan Mackenzie's message of "Fri, 28 Oct 2022 12:28:07 +0000") References: <87mt9i928r.fsf.ref@yahoo.com> <87mt9i928r.fsf@yahoo.com> Date: Fri, 28 Oct 2022 21:42:39 +0800 Message-ID: <87r0ys3vzk.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: 602 X-Spam-Score: 0.7 (/) 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: > The problem was a missing entry for objc-mode in one of the keyword > tables in CC Mode. This was easy to find and correct. :-) > > The fix also seems to have fixed bug #58796, so I've merged the two bugs. > > I've committed the fix to the master branch, so could you please update > your Emacs 29 and check that everything in these bugs is fixed, then let > me know. Then I can close the two bugs. Thanks! > > The amazing thing is that this bug could have lain undiscovered for so > long. Seems to work here, so please go ahead and close the bugs. Thanks. From unknown Mon Jun 23 11:28:21 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Po Lu Subject: bug#58795: closed (Re: bug#58795: CC Mode 5.35.1 (ObjC//l); Incorrect fontification of structs and enums) Message-ID: References: <87mt9i928r.fsf@yahoo.com> X-Gnu-PR-Message: they-closed 58795 X-Gnu-PR-Package: cc-mode Reply-To: 58795@debbugs.gnu.org Date: Fri, 28 Oct 2022 14:28:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1666967281-11618-1" This is a multi-part message in MIME format... ------------=_1666967281-11618-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #58795: CC Mode 5.35.1 (ObjC//l); Incorrect fontification of structs and en= ums which was filed against the cc-mode package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 58795@debbugs.gnu.org. --=20 58795: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D58795 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1666967281-11618-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 58795-done) by debbugs.gnu.org; 28 Oct 2022 14:27:57 +0000 Received: from localhost ([127.0.0.1]:34032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooQKz-000317-DT for submit@debbugs.gnu.org; Fri, 28 Oct 2022 10:27:57 -0400 Received: from mx3.muc.de ([193.149.48.5]:40759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooQKu-00030q-T6 for 58795-done@debbugs.gnu.org; Fri, 28 Oct 2022 10:27:55 -0400 Received: (qmail 3732 invoked by uid 3782); 28 Oct 2022 16:27:44 +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 16:27:44 +0200 Received: (qmail 21906 invoked by uid 1000); 28 Oct 2022 14:27:43 -0000 Date: Fri, 28 Oct 2022 14:27:43 +0000 To: Po Lu Subject: Re: bug#58795: CC Mode 5.35.1 (ObjC//l); Incorrect fontification of structs and enums Message-ID: References: <87mt9i928r.fsf.ref@yahoo.com> <87mt9i928r.fsf@yahoo.com> <87r0ys3vzk.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r0ys3vzk.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: 58795-done Cc: 58795-done@debbugs.gnu.org, acm@muc.de 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 Fri, Oct 28, 2022 at 21:42:39 +0800, Po Lu wrote: > Alan Mackenzie writes: > > The problem was a missing entry for objc-mode in one of the keyword > > tables in CC Mode. This was easy to find and correct. :-) > > The fix also seems to have fixed bug #58796, so I've merged the two bugs. > > I've committed the fix to the master branch, so could you please update > > your Emacs 29 and check that everything in these bugs is fixed, then let > > me know. Then I can close the two bugs. Thanks! > > The amazing thing is that this bug could have lain undiscovered for so > > long. > Seems to work here, so please go ahead and close the bugs. Thanks. OK, thanks! I'm closing them with this post. -- Alan Mackenzie (Nuremberg, Germany). ------------=_1666967281-11618-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 26 Oct 2022 12:52:15 +0000 Received: from localhost ([127.0.0.1]:53575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onftG-0008DZ-Q3 for submit@debbugs.gnu.org; Wed, 26 Oct 2022 08:52:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:36608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onftA-0008DL-B8 for submit@debbugs.gnu.org; Wed, 26 Oct 2022 08:52:12 -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 1onft8-00086n-RG for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 08:52:08 -0400 Received: from sonic307-56.consmr.mail.ne1.yahoo.com ([66.163.190.31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onft6-0008P2-0A for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 08:52:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666788720; bh=lJWavIlB3Dg+y7ZIH/JjMzg2t7bre0doQLMoWjKSzEc=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=KN+m9VX3LZbMz5eljbNqxhqLv2y9oIy23TGkbEJ3Gv/OBGo2QNJkYNwrvrNmXjMauSK59+oCAIjFMvX1nBMV2mKNaIpBUykp8qpujSuF7qwIafjjeRj1V0PdzVSeTUcEQPSVvTzBlpZsu5do8hLtjRNiiFNBKMuIGlfnCnndyKsHjitspAXzuW0ZcS+Ahsbzwcm5AFc3gNN5emJD0WNKxY+Bmj7KRec/VQ9UxF/R47h+Iy6gI7LnwFhmlzcfEgQGN2HVC0mRy1WLvCmDaWnqnVObYVKniJJ737Z6H6tusHwB8mza5S5YVBitWXZf34JbkGYHMspLNkSnhMQZFCQCFg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666788720; bh=HPmxh3wGmWYsu/znZhtXn5MK8QjYBYHTWpjogFOJhpa=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=iKFptlpdHBTO34k71fYJ7lQI5+jOeRyFxAy6OZisG1yjn6nIkqdiw77m8SL56OyJasO96JUCzVhirtBUxJYjCPABqRUFGHtIwiQkZJhcJ0UqZkWeqtzJfRKgTMPMm1l9oFL38gMegE0EsjbX0ajrXM++MQE/5esOlOpQlWNdr7P6XpugkRI5MO35nKDqyMvSSJmqJsJqkmJANorIOrXI2D8eMQgdXbbAXl4Gk6JlVfgsvQoQ2fqiJVe48JIrE7eNK5FsizPg4NZZosaY4UV8rIFIVNMkOgpqkSX4mgHKdaisi5v1Xglmfn12XS8Z8yNpYiHRqjgSvzoE0ObK+BIcpg== X-YMail-OSG: JT7bj5oVM1lprfRfK9ugnYAL8X38xKO.jp69yvb_IZPCGe3L7av_jkG9xZwV_WN ldEu.nNWXjStAP9I9eGks.MABllk3xXI5898U3mQWb2TZ_paURIlAZWCgJWlP8XzXGZMRjK5aGsj sOpVPFsvaKMicQjebGiQRcoUFe6ir8Mu_MkoA6KxWWedcUnGttKEA4LgM1Il0a_RwAyreu.RV3yf nvZcWYkEoEAM2sfxIbB8rNJNvrrB5xgraQY3WRKNpQqRKeguyxYoVDDQewgDZGws.xPF3e9c2zas NHkjSKxnluJQPLJZ2DBaxe94VGktiQvVXJOtedjUKsfHwosZ9lRI9E39r.3AyCFj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7N2Cz.wd cI.r2IPHJMYgmsFTsMjIoDbO8Ig.hrWvt4xrPkSLQUT_IEeWrij.K7Tp_PojZXMtUGic56PFwDlB BaaodnThk1W3gj.zEP53OX78DfGsrT4_XCAQmAagxn0GjekGFd5IYUf_lZxQzTEEiBin2A6R1tls 3RyH6yY.Bf7nuzyjeB_k.JRmr69_IteFHpd1hf7lhy3HyKMWYFmb6iJdGCFL.jc3Addfa0GJE7oj QS3DD6Of7GGcQdvFe6.JxwnIoNuhcGRa7g.AbiQYBhGcIDdOQCYvFpd3L7FWCaLVrxVEveyMFe_X Ev2TjBdP2y43S8t_0fy5s3WylhAMI4L_n6ZgBiJUHawwuZcn3oHNa0MnrJjtYIbSqHBBNOu4SzCh U2MUhxQlFBLOzb6S5b0nCkR7vPIuikCGBagujE3GveMMSyrsODep7gEFwt7CWqulOyzq0.sT5r5y 1GIoYUPrScHgL5.T8OyLEbhKp1DyCJqkXV9LXPC9gIemE9ZoS1T3MQhHfbyIg1hkh9JNdllh4bNh iHURfUyz5ndy0XgAofBNt9w_Ca6_PyATgR7HWNNzxaF5OhQWiU_rlpV55DD78GvNCWpJmLomH2wX d83pKWuM1mWT91O1iQhBB1vFIyBNKhHg6MGUF8sAPTiSDLzE6iqm7A90LsOHDOhXvRvbauuySMv1 97uGEesz4Ovr.gWEF332NAmSmPaLQbz9zdd6FMlFWzUim7DR6krtAbxr5Xa7jc9HQAtDrzhc.KVR i7R5iztH9inNe6fBB5F9S802cDuUQQ3PNwlBrM5_BI5v4V19h6kWaL9UNg8G5x2YSx._PysS3Qjx uQPbRFDApevVUS.Djuk9eXz5h7TQWHFwYBubtznZnWBzon2y8lSnW X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Wed, 26 Oct 2022 12:52:00 +0000 Received: by hermes--production-sg3-74fb94585-9kz9b (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 74741aa62ce7230bb3e366c3ceaa42c4; Wed, 26 Oct 2022 12:51:54 +0000 (UTC) From: Po Lu To: bug-gnu-emacs@gnu.org Subject: CC Mode 5.35.1 (ObjC//l); Incorrect fontification of structs and enums X-Debbugs-Package: cc-mode Date: Wed, 26 Oct 2022 20:51:48 +0800 Message-ID: <87mt9i928r.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable References: <87mt9i928r.fsf.ref@yahoo.com> X-Mailer: WebService/1.1.20783 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 9124 Received-SPF: pass client-ip=66.163.190.31; envelope-from=luangruo@yahoo.com; helo=sonic307-56.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: -1.3 (-) 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/nsfont.m in the master branch of Emacs's source repository. Notice every "enum gs_font_xxx" and "struct gs_font_data" identifier is fontified as a type. Here are some examples: struct gs_font_data { int specified; enum gs_font_slant slant; enum gs_font_weight weight; enum gs_font_width width; bool monospace_p; char *family_name; }; here, slant, weight and width are fontified as types. static void ns_done_font_data (struct gs_font_data *data) { if (data->specified & GS_SPECIFIED_FAMILY) xfree (data->family_name); } here, data is fontified as a type. static void ns_get_font_data (NSFontDescriptor *desc, struct gs_font_data *dat) { NSNumber *tem; NSFontSymbolicTraits traits =3D [desc symbolicTraits]; NSDictionary *dict =3D [desc objectForKey: NSFontTraitsAttribute]; NSString *family =3D [desc objectForKey: NSFontFamilyAttribute]; dat->specified =3D 0; if (family !=3D nil) { dat->specified |=3D GS_SPECIFIED_FAMILY; dat->family_name =3D xstrdup ([family cStringUsingEncoding: NSUTF8Str= ingEncoding]); } tem =3D [desc objectForKey: NSFontFixedAdvanceAttribute]; if ((tem !=3D nil && [tem boolValue] !=3D NO) || (traits & NSFontMonoSpaceTrait)) { dat->specified |=3D GS_SPECIFIED_SPACING; dat->monospace_p =3D true; } else if (tem !=3D nil && [tem boolValue] =3D=3D NO) { dat->specified |=3D GS_SPECIFIED_SPACING; dat->monospace_p =3D false; } if (traits & NSFontBoldTrait) { dat->specified |=3D GS_SPECIFIED_WEIGHT; dat->weight =3D GS_FONT_WEIGHT_BOLD; } if (traits & NSFontItalicTrait) { dat->specified |=3D GS_SPECIFIED_SLANT; dat->slant =3D GS_FONT_SLANT_ITALIC; } if (traits & NSFontCondensedTrait) { dat->specified |=3D GS_SPECIFIED_WIDTH; dat->width =3D GS_FONT_WIDTH_CONDENSED; } else if (traits & NSFontExpandedTrait) { dat->specified |=3D GS_SPECIFIED_WIDTH; dat->width =3D GS_FONT_WIDTH_EXPANDED; } if (dict !=3D nil) { tem =3D [dict objectForKey: NSFontSlantTrait]; if (tem !=3D nil) { dat->specified |=3D GS_SPECIFIED_SLANT; dat->slant =3D [tem floatValue] > 0 ? GS_FONT_SLANT_ITALIC : ([tem floatValue] < 0 ? GS_FONT_SLANT_REVERSE_ITALIC : GS_FONT_SLANT_NORMAL); } tem =3D [dict objectForKey: NSFontWeightTrait]; if (tem !=3D nil) { dat->specified |=3D GS_SPECIFIED_WEIGHT; dat->weight =3D [tem floatValue] > 0 ? GS_FONT_WEIGHT_BOLD : ([tem floatValue] < -0.4f ? GS_FONT_WEIGHT_LIGHT : GS_FONT_WEIGHT_NORMAL); } tem =3D [dict objectForKey: NSFontWidthTrait]; if (tem !=3D nil) { dat->specified |=3D GS_SPECIFIED_WIDTH; dat->width =3D [tem floatValue] > 0 ? GS_FONT_WIDTH_EXPANDED : ([tem floatValue] < 0 ? GS_FONT_WIDTH_NORMAL : GS_FONT_WIDTH_CONDENSED); } } } here, "dat" is fontified as a type. static bool ns_font_descs_match_p (NSFontDescriptor *desc, NSFontDescriptor *target) { struct gs_font_data dat; struct gs_font_data t; ns_get_font_data (desc, &dat); ns_get_font_data (target, &t); if (!(t.specified & GS_SPECIFIED_WIDTH)) t.width =3D GS_FONT_WIDTH_NORMAL; if (!(t.specified & GS_SPECIFIED_WEIGHT)) t.weight =3D GS_FONT_WEIGHT_NORMAL; if (!(t.specified & GS_SPECIFIED_SPACING)) t.monospace_p =3D false; if (!(t.specified & GS_SPECIFIED_SLANT)) t.slant =3D GS_FONT_SLANT_NORMAL; if (!(t.specified & GS_SPECIFIED_FAMILY)) emacs_abort (); bool match_p =3D true; if (dat.specified & GS_SPECIFIED_WIDTH && dat.width !=3D t.width) { match_p =3D false; goto gout; } if (dat.specified & GS_SPECIFIED_WEIGHT && dat.weight !=3D t.weight) { match_p =3D false; goto gout; } if (dat.specified & GS_SPECIFIED_SPACING && dat.monospace_p !=3D t.monospace_p) { match_p =3D false; goto gout; } if (dat.specified & GS_SPECIFIED_SLANT && dat.monospace_p !=3D t.monospace_p) { if (NSFONT_TRACE) printf ("Matching monospace for %s: %d %d\n", t.family_name, dat.monospace_p, t.monospace_p); match_p =3D false; goto gout; } if (dat.specified & GS_SPECIFIED_FAMILY && strcmp (dat.family_name, t.family_name)) match_p =3D false; gout: ns_done_font_data (&dat); ns_done_font_data (&t); return match_p; } here, "dat" and "t" are fontified as types. However, if part of this function definition is not visible and is later scrolled into the window, "dat" and "t" will not be fontified as types in that newly visible part. Emacs : GNU Emacs 29.0.50 (build 7, x86_64-pc-linux-gnu, NS gnustep-gui-0.= 29.0) of 2022-10-26 Package: CC Mode 5.35.1 (ObjC//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 'objc-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]+[ ]*\\)*\\)" ) ------------=_1666967281-11618-1-- From unknown Mon Jun 23 11:28:21 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Po Lu Subject: bug#58796: closed (Re: bug#58795: CC Mode 5.35.1 (ObjC//l); Incorrect fontification of structs and enums) Message-ID: References: <87ilk6923y.fsf@yahoo.com> X-Gnu-PR-Message: they-closed 58796 X-Gnu-PR-Package: cc-mode Reply-To: 58796@debbugs.gnu.org Date: Fri, 28 Oct 2022 14:28:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1666967282-11618-3" This is a multi-part message in MIME format... ------------=_1666967282-11618-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #58795: CC Mode 5.35.1 (ObjC//l); Bad ObjC fontification which was filed against the cc-mode package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 58796@debbugs.gnu.org. --=20 58795: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D58795 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1666967282-11618-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 58795-done) by debbugs.gnu.org; 28 Oct 2022 14:27:57 +0000 Received: from localhost ([127.0.0.1]:34032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooQKz-000317-DT for submit@debbugs.gnu.org; Fri, 28 Oct 2022 10:27:57 -0400 Received: from mx3.muc.de ([193.149.48.5]:40759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooQKu-00030q-T6 for 58795-done@debbugs.gnu.org; Fri, 28 Oct 2022 10:27:55 -0400 Received: (qmail 3732 invoked by uid 3782); 28 Oct 2022 16:27:44 +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 16:27:44 +0200 Received: (qmail 21906 invoked by uid 1000); 28 Oct 2022 14:27:43 -0000 Date: Fri, 28 Oct 2022 14:27:43 +0000 To: Po Lu Subject: Re: bug#58795: CC Mode 5.35.1 (ObjC//l); Incorrect fontification of structs and enums Message-ID: References: <87mt9i928r.fsf.ref@yahoo.com> <87mt9i928r.fsf@yahoo.com> <87r0ys3vzk.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r0ys3vzk.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: 58795-done Cc: 58795-done@debbugs.gnu.org, acm@muc.de 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 Fri, Oct 28, 2022 at 21:42:39 +0800, Po Lu wrote: > Alan Mackenzie writes: > > The problem was a missing entry for objc-mode in one of the keyword > > tables in CC Mode. This was easy to find and correct. :-) > > The fix also seems to have fixed bug #58796, so I've merged the two bugs. > > I've committed the fix to the master branch, so could you please update > > your Emacs 29 and check that everything in these bugs is fixed, then let > > me know. Then I can close the two bugs. Thanks! > > The amazing thing is that this bug could have lain undiscovered for so > > long. > Seems to work here, so please go ahead and close the bugs. Thanks. OK, thanks! I'm closing them with this post. -- Alan Mackenzie (Nuremberg, Germany). ------------=_1666967282-11618-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 26 Oct 2022 12:55:04 +0000 Received: from localhost ([127.0.0.1]:53586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onfvz-0008I8-KT for submit@debbugs.gnu.org; Wed, 26 Oct 2022 08:55:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:39032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onfvw-0008Hj-9j for submit@debbugs.gnu.org; Wed, 26 Oct 2022 08:55:02 -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 1onfvs-0000cl-9H for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 08:54:57 -0400 Received: from sonic306-20.consmr.mail.ne1.yahoo.com ([66.163.189.82]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onfvp-0000XX-PW for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 08:54:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666788891; bh=g9ZUjW4eqQMkmQdClRw1qUHYQdEc01N9DUzJ1rmO2dc=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=oL6xjXB2LpflVz5JMl0x8oThtVDPIy2IPCfPWNlPtahIDxPOJuFEJEvo0cds1JRt9MT5oP98RNJXHj5x8NdEQstZgfF1i3h60vaeE8aEMkTC5MBIO3p+v1+8Fv5cd+xYMWvbtRW7FaHWqptChpCzpbFjN1IWDm/jgUKSnpamyj8gUgL/CX4EAVfEEaCW7l16xBoLZbaig30RifP5mDZDEvj+PgAMEpehtqNjckJKacAVftrf8TVb/A6ta4EhwB4tsFGFFkDkZ33mw/KlzymgUa0Tg2JQLaGfFKF/TAglPz+5LSiLx42L+qCZtLzvV6wES0VXbw5GiJHU4v5XSRkKiA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1666788891; bh=jIaWZ4w7Mbpj4x/pCfhogiDyLtytmHuWohIHLDcc+3E=; h=X-Sonic-MF:From:To:Subject:Date:From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Hyei.GRd3ocpvmou964K Q9As3dVSrdFB42WWseT7.IID8RWWsbDimUGP13_AerHd1WfUvOoxOqp3RLSIJgDXVQj7flObHyui bX7ckxGGGU2x3NYFunhljzqtHam.f6Q7yoOGA2xhHMhO8Ccn_N53mn3OCStFKfdHxurDY3jWU9tC 1ydBaDSnFmdh9ruAjS1MtBp7VQY4OkDMCiFCAVCCpNKdh4QG0lG4hmbPRW6UVrRBeQt85qSFTlJZ k_M0hTBHONCmEFr97lDzRkSBEjKrJrt2L2Gnjee8nBUvoyIaBAsc6B9Ui3T7IkqanLWZ8QEQfNx4 Up2hDu8U_zoXjwc.Vf9mLwevwWBfsA3Pv7.MG0jVa02_WA78xIJkfu1arNryugZNZwFGEroyr8bH xdOdeDErnDH2RhAgFHPRqn9ir_sgQ_Pl0twPoYmhcUS5MydwzCNzTu52mDfpn12b9hHQE_AhMop8 N9ExqyleywzfeLRGYywCT.XhfbIan9NKITmKtK6RoN1Zou38OpFU3 X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Wed, 26 Oct 2022 12:54:51 +0000 Received: by hermes--production-sg3-74fb94585-7j6k2 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4ef54270a9f689c8ff34d14a5478a1f7; Wed, 26 Oct 2022 12:54:46 +0000 (UTC) From: Po Lu To: bug-gnu-emacs@gnu.org Subject: CC Mode 5.35.1 (ObjC//l); Bad ObjC fontification X-Debbugs-Package: cc-mode Date: Wed, 26 Oct 2022 20:54:41 +0800 Message-ID: <87ilk6923y.fsf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable References: <87ilk6923y.fsf.ref@yahoo.com> X-Mailer: WebService/1.1.20783 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 5053 Received-SPF: pass client-ip=66.163.189.82; envelope-from=luangruo@yahoo.com; helo=sonic306-20.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 line 9756 of src/nsterm.m. Around that location, there should be the following function definition: - (NSDragOperation) beginDrag: (NSDragOperation) op forPasteboard: (NSPasteboard *) pasteboard withMode: (enum ns_return_frame_mode) mode returnFrameTo: (struct frame **) frame_return prohibitSame: (BOOL) prohibit_same_frame followTooltip: (BOOL) follow_tooltip Within, "enum return_frame_mode" and "struct frame **", "return_frame_mode" and "frame" will not be fontified as types. Then, look below; "mode" and "prohibit_same_frame" will be fontified as types, despite actually being parameters! Emacs : GNU Emacs 29.0.50 (build 7, x86_64-pc-linux-gnu, NS gnustep-gui-0.= 29.0) of 2022-10-26 Package: CC Mode 5.35.1 (ObjC//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 'objc-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]+[ ]*\\)*\\)" ) ------------=_1666967282-11618-3--