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

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

Re: Adding functionality to a minor mode


From: goncholden
Subject: Re: Adding functionality to a minor mode
Date: Tue, 08 Feb 2022 22:47:38 +0000

------- Original Message -------
On Tuesday, February 8th, 2022 at 5:05 PM, goncholden 
<goncholden@protonmail.com> wrote:
> Sent with ProtonMail Secure Email.
> ------- Original Message -------
> On Tuesday, February 8th, 2022 at 1:27 PM, Stefan Monnier via Users list for 
> the GNU Emacs text editor help-gnu-emacs@gnu.org wrote:

> > Is there a way that I can remember the :weight used initially,
> > "(set-face-attribute 'default nil :height 160 :weight 'ultra-bold)"
> > so I can set comments to ultra-bold again when the minor-mode is disabled.

> Rather than `set-face-attribute` you want to go through Customize's
> face settings.

> E.g. you can get the above behavior using a "Custom theme", which you
> can then enable&disable at will.

> Custom themes are conceptually very similar to (global) minor modes.

Stefan, my setup involved using modus-vivendi to which I add a bold font
for everything.  But I want a special customisation for comments.  
Customisations
include having a normal weight, and having a keybinding that changes the 
contrast
ratio between the comment colour and the background.

My first thought has been to define a minor mode.  But from the comments from 
this
mailing list, I has been put forward to mo that what I am doing could be a very
non-standard customisation.  What would be the most appropriate way to customise
comments as described.  I would be grateful for examples on how I should 
approach
the task.

Cholden





reply via email to

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