emacs-devel
[Top][All Lists]
Advanced

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

Re: questions about correct reveal-mode usage to hide passwords


From: Stefan Monnier
Subject: Re: questions about correct reveal-mode usage to hide passwords
Date: Thu, 11 Jun 2020 13:49:00 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>>> One[1] uses font-lock mode to adapt to
>>>> change dynamically, which works well for live editing, but you can't see
>>>> the password when you're editing it.
>>> font-lock is the perfect way to implement this, and it should be easy to
>> 
>> I'd recommend using jit-lock rather than font-lock.
>> It might be a case of bikeshedding, but I think it will be both easier
>> to implement and more robust.
>
> Hmm.  I meant font-lock-keywords and text properties (which will benefit
> from jit-lock, of course), rather than hooking up directly into jit-lock and
> using overlays.  Is there something wrong with the text-properties approach?

It's just that using `font-lock-keywords` is fiddly, and then you also
have to set `font-lock-extra-managed-props`, ...
And next thing you know a user wants to use your thing but doesn't want
font-lock coloring, ...


        Stefan




reply via email to

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