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: Stefan Monnier
Subject: Re: Adding functionality to a minor mode
Date: Tue, 08 Feb 2022 08:27:43 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> 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




reply via email to

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