From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: checking for light or dark background Date: Wed, 02 Feb 2022 16:41:10 +0200 Message-ID: <835ypx72m1.fsf@gnu.org> References: <838rut77h2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21391"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 02 16:59:32 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFI2e-0005OI-9C for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 16:59:32 +0100 Original-Received: from localhost ([::1]:38010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFI2d-0007LU-2P for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 10:59:31 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFGon-0006BD-4A for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 09:41:09 -0500 Original-Received: from [2001:470:142:3::e] (port=34562 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFGom-0004Rx-PN for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 09:41:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=+19rAPBtimwzNHN2HBOwPgBn+XLv/9mBb4fwjuRFu/U=; b=i+wPJwobxE94WunBYfX3 QkO5WuhDS/crkvSWB0pccaqRqk5zNXAtmIw/U8ynIvCiW/nz1HkLo/E2tatvXn4q6L3wS9C2nyMP9 GyfkR56PMBZrYjJxq66gJa10nB/rO6DKSyL+ZWiw+KiML+532lj6TMD/rz5OES0wNEd36PU2aHRQU PE/Z1CEWe2HtG+iXHyTACYGZal9In/Yss9X6X2RJza7iC1OfSZA6J81dp2Ly+HY5jMeqnM49XWQ7T 7gMg2TnuyKncfv3/W120teX+GhdINPUN4o6sNZWHnpyux3tHpmDKAn+9KCaXWrUUpd1Eje+ixKupK zNDhVrBXwLNG5w==; Original-Received: from [87.69.77.57] (port=3470 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFGom-0005Jw-91 for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 09:41:08 -0500 In-Reply-To: (message from goncholden on Wed, 02 Feb 2022 13:27:58 +0000) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:135664 Archived-At: > Date: Wed, 02 Feb 2022 13:27:58 +0000 > From: goncholden > Cc: help-gnu-emacs@gnu.org > > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > > On Wednesday, February 2nd, 2022 at 1:25 PM, goncholden wrote: > > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > > > > On Wednesday, February 2nd, 2022 at 12:56 PM, Eli Zaretskii eliz@gnu.org wrote: > > > > > Date: Wed, 02 Feb 2022 09:26:02 +0000 > > > > > > From: goncholden via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.org > > > > > > I want to determine whether emacs is using a light or dark background. This could be set up by emacs itself > > > > > > or by a theme. > > > > Like this: > > > > (frame-parameter nil 'background-mode) > > > > This evaluates to either light or dark. Very neat compared to what I was playing with initially. > > > 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. I don't understand: (frame-parameter nil 'background-mode) works for Emacs 28 and later as well.