* bug#7580: [PATCH] cc-mode bitfield fontification bug
@ 2010-12-07 12:34 Daniel Colascione
2011-01-22 3:06 ` Chong Yidong
[not found] ` <87fwslbpsd.fsf@stupidchicken.com>
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Colascione @ 2010-12-07 12:34 UTC (permalink / raw)
To: 7580
[-- Attachment #1: Type: text/plain, Size: 688 bytes --]
struct test
{
/* Both should be fontified as bitfields; currently, only the former
is */
int bf1:5;
unsigned bf2:5;
};
@@ -5575,7 +5656,9 @@
;; a valid label. Otherwise the last one probably is the
;; declared identifier and we should back up to the previous
;; type, providing it isn't a cast.
- (if (eq (char-after) ?:)
+ (if (and (eq (char-after) ?:)
+ (not (and (eq backup-at-type 'prefix)
+ (eq at-type 'maybe))))
;; If we've found a specifier keyword then it's a
;; declaration regardless.
(throw 'at-decl-or-cast (eq at-decl-or-cast t))
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#7580: [PATCH] cc-mode bitfield fontification bug
2010-12-07 12:34 bug#7580: [PATCH] cc-mode bitfield fontification bug Daniel Colascione
@ 2011-01-22 3:06 ` Chong Yidong
[not found] ` <87fwslbpsd.fsf@stupidchicken.com>
1 sibling, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2011-01-22 3:06 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: Daniel Colascione, 7580
Hi Alan,
Could you please review this patch? Thanks!
Daniel Colascione <dan.colascione@gmail.com> writes:
> struct test
> {
> /* Both should be fontified as bitfields; currently, only the former
> is */
> int bf1:5;
> unsigned bf2:5;
> };
>
>
> @@ -5575,7 +5656,9 @@
> ;; a valid label. Otherwise the last one probably is the
> ;; declared identifier and we should back up to the previous
> ;; type, providing it isn't a cast.
> - (if (eq (char-after) ?:)
> + (if (and (eq (char-after) ?:)
> + (not (and (eq backup-at-type 'prefix)
> + (eq at-type 'maybe))))
> ;; If we've found a specifier keyword then it's a
> ;; declaration regardless.
> (throw 'at-decl-or-cast (eq at-decl-or-cast t))
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <87fwslbpsd.fsf@stupidchicken.com>]
end of thread, other threads:[~2011-10-03 20:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-07 12:34 bug#7580: [PATCH] cc-mode bitfield fontification bug Daniel Colascione
2011-01-22 3:06 ` Chong Yidong
[not found] ` <87fwslbpsd.fsf@stupidchicken.com>
2011-10-03 20:35 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).