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

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

Re: checking for light or dark background


From: Yuri Khan
Subject: Re: checking for light or dark background
Date: Wed, 2 Feb 2022 21:48:51 +0700

On Wed, 2 Feb 2022 at 21:05, goncholden <goncholden@protonmail.com> wrote:

> The problem I was having was that for Emacs 27.2, the command 
> (frame--current-backround-mode nil)
> was not available.  What is the recommendation for Emacs>=28.

You should not rely on (frame--current-background-mode) even if it is
available. The double dash in its name tells you it is a semi-private
implementation detail, subject to change at any time. You can access
it, but when it changes and your code breaks, you will get no support.

(frame-parameter FRAME 'background-mode), on the other hand, uses only
public, documented symbols, guaranteed to be available and working
well into the next century. (Exaggerating a bit here, but you get the
idea.)



reply via email to

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