From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: goncholden Newsgroups: gmane.emacs.help Subject: Re: checking for light or dark background Date: Wed, 02 Feb 2022 16:18:13 +0000 Message-ID: References: <838rut77h2.fsf@gnu.org> <835ypx72m1.fsf@gnu.org> Reply-To: goncholden Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15913"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 02 18:20:49 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 1nFJJJ-0003ns-JM for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 18:20:49 +0100 Original-Received: from localhost ([::1]:39166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFJJH-0003pR-MM for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 12:20:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFIM1-0001Mx-VO for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 11:19:34 -0500 Original-Received: from mail-40137.protonmail.ch ([185.70.40.137]:46037) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFILq-0005lE-0o for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 11:19:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1643818694; bh=41xgCdw1OjikTu+afnQAoXDQuIkdeGFF/1Ag+aBdZbc=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=RZ/7GTjyYyYBqC5cCb5IFSWYvB93r1IBVVi407PMVSAilPGakiW74gi9K0rnhVBW4 DWXXswKOhomDQJsjlYde6t28GdoROCxmzMfdZ2PRhSUbmqBs4Z4xaeksrOawtP2ax6 i5a20zY9fgVNOqY3MJ+OjE78vLa8W5WjvRQ4M8rxyojAuy8k/PAwd25VZtNHxHCr9v O2JQkp1bfz0imI7GoYg7O4REvqV3cxlPKzfyO92utpRwvG2paYVGI3s3WyJeDT0LVU cSccCokqK9q2/pqYUl4D2cFZDCFCj8Hh6qOSbPF0OiNuAHkfrHlldKezwIQj57tT4N G7oK8iDfz5UJA== In-Reply-To: <835ypx72m1.fsf@gnu.org> Received-SPF: pass client-ip=185.70.40.137; envelope-from=goncholden@protonmail.com; helo=mail-40137.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:135672 Archived-At: =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Wednesday, February 2nd, 2022 at 2:41 PM, Eli Zaretskii w= rote: > Date: Wed, 02 Feb 2022 13:27:58 +0000 > > From: goncholden goncholden@protonmail.com > > Cc: help-gnu-emacs@gnu.org > > =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original = Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 > > On Wednesday, February 2nd, 2022 at 1:25 PM, goncholden goncholden@proton= mail.com wrote: > > > =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Origina= l Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80= =90 > > > > On Wednesday, February 2nd, 2022 at 12:56 PM, Eli Zaretskii eliz@gnu.or= g wrote: > > > > > Date: Wed, 02 Feb 2022 09:26:02 +0000 > > > > > > From: goncholden via Users list for the GNU Emacs text editor help-gn= u-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 wa= s playing with initially. > > The problem I was having was that for Emacs 27.2, the command (frame--cur= rent-backround-mode nil) > > was not available. What is the recommendation for Emacs>=3D28. I don't understand: (frame-parameter nil 'background-mode) works for Emacs 28 and later as well. Yes, I have now switched to (frame-parameter nil 'background-mode).