bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15207: 24.2; C Highlight colors around CV-modifiers


From: Alan Mackenzie
Subject: bug#15207: 24.2; C Highlight colors around CV-modifiers
Date: Sun, 1 Sep 2013 09:10:27 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, Gauthier.

Gauthier ?stervall <gauthier@ostervall.se> wrote:
> C highlighting is not consistent depending on the placement of
> CV-modifiers in variable declarations.

> Example:

> const type1 var1;
> type2 const var2;

> Both declarations are equivalent but the color of "type?" differs.
> Issue verified in version 24.3 as well.

Bug #15211 seems to be a duplicate of this bug.  It's amazing how a bug
like this can remain undetected for over a decade, then suddenly two
people report it within a few hours of eachother.

Would you please try out the patch from #15211, and let me know whether
it fixes the bug, doesn't quite fix it, or there are unwanted side
effects.  Here it is again:


diff -r 45df171f9859 cc-engine.el
--- a/cc-engine.el      Sat Aug 31 11:09:30 2013 +0000
+++ b/cc-engine.el      Sat Aug 31 20:32:22 2013 +0000
@@ -7440,7 +7440,8 @@
        ;; interactive refontification.
        (c-put-c-type-property (point) 'c-decl-arg-start))
 
-      (when (and c-record-type-identifiers at-type (not (eq at-type t)))
+      (when (and c-record-type-identifiers at-type ;; (not (eq at-type t))
+                )
        (let ((c-promote-possible-types t))
          (save-excursion
            (goto-char type-start)


I'll just repeat what I said in #15211: the code in CC Mode took trouble
to _exclude_ "type2" from being fontified, and I don't understand why.
There may be side effects from this patch.

Thanks for reporting this bug, and thanks for making it a high quality
bug report.

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]