[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Regarding adding additional default font-lock faces
From: |
Nathan Moreau |
Subject: |
Re: Regarding adding additional default font-lock faces |
Date: |
Fri, 3 Aug 2018 09:46:51 +0200 |
Hello,
> Ah, right, thanks. I never use languages where this is used, but now
> that I see it, I do remember having heard of it.
>
>
Another examples:
- Recent versions of ocaml has something similar:
http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#s%3Aattributes
- c++ as well : https://en.cppreference.com/w/cpp/language/attributes
- One can maybe argue that python decorators could be fontified as
function attributes?
Nathan
On 2 August 2018 at 13:53, Stefan Monnier <address@hidden> wrote:
>> Which is fine. But can't we have a defface for this whose default
>> value is nil?
>> That way major-modes have one standard variable to use, and users have
>> one standard variable to customize. I think that's a whole lot easier
>> for everyone.
>> Not to mention this puts the user in control of their own experience,
>> like Emacs should.
>
> Of course.
>
> I think the current design is strongly influenced by efficiency
> considerations rather than by someone deciding that those constructs
> shouldn't have their specific highlighting.
>
>>>> * attributes/annotations for functions, classes,
>>> I don't know what this refers to. Which languages have those?
>> To be clear I meant annotations/attributes *applied to* function-
>> parameters, not function parameters itself.
>> In C# it can look like this:
>>
>>> [DataContract]
>>> public class QueryInfo
>>> {
>>> [DataMember(Order = 0)]
>>> public int ContactId { get; set; }
>>>
>>> [DataMember(Order = 1)]
>>> public int PersonId { get; set; }
>>>
>>> [DataMember(Order = 2)]
>>> public int ProjectId { get; set; }
>>>
>>> [DataMember(Order = 3)]
>>> public int SaleId { get; set; }
>>> }
>
> Ah, right, thanks. I never use languages where this is used, but now
> that I see it, I do remember having heard of it.
>
>
> Stefan
>