From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Marc Coquand Newsgroups: gmane.emacs.help Subject: Re: Creating a custom face for a variable shown in global-mode-string? Date: Tue, 26 Nov 2024 09:09:29 +0200 Message-ID: <87o72279p2.fsf@mccd.space> References: <874j3u7wj4.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22853"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 26 08:10:25 2024 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 1tFpiK-0005oP-Ea for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 26 Nov 2024 08:10:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFphc-0008M7-1q; Tue, 26 Nov 2024 02:09:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFpha-0008Lu-P0 for help-gnu-emacs@gnu.org; Tue, 26 Nov 2024 02:09:38 -0500 Original-Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFphY-0002xt-Pb for help-gnu-emacs@gnu.org; Tue, 26 Nov 2024 02:09:38 -0500 Original-Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 0B79911401C6; Tue, 26 Nov 2024 02:09:33 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Tue, 26 Nov 2024 02:09:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mccd.space; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm3; t=1732604972; x=1732691372; bh=25iZ652bpiV1HfWbGh5s4 hd2LgAAqkrLoPdJcLekjIM=; b=IbfNk9LXN6TTMmZwNopfzLMReh2yyIYm1rUHG INSPC2HVfyWNOUWl7cvsVa4pnFkgrh2G2yga9KdQ9Tjtk12V2roZUu/0iMkiLig0 pHrIkJ1Qc5661LeOhom2dmXK+CjeSbIzdA/uUaVK19FF3GrIcvLZjh8dEzo5Bdox 9RKdftDvhHCJyUPHHxVW0zobm0w+yOt3pcy9CjICQoTDXtUBnCABd2Bkr/6Wo4ug V1ibYc8czh8mILZSHd30JeMcmSkgNy1m+Y/MtJ31yLaADBhlySd9+SZ9kOrngARo WbARibzdJ/JCNz4qVRxUwJk+0YZvuta310saeEg5eeHA2UYfg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1732604972; x=1732691372; bh=25iZ652bpiV1HfWbGh5s4hd2LgAAqkrLoPd JcLekjIM=; b=1qU4nvCnomVuy/C5rz1+O2MkMKRmz2YXxmaSDOdLubtC/dsvAvk L1vMVMiSMGmTcFp8FUwR+OXDRDUYPnhkVJPOABSIT62iCUmcrQibXQn/OErkVmKI qCHu8KnOdFBFlHA7Zh+XF9I/P34USrKCUEouEImI7rYt6FG2gtlqEmkHo+XG1H6A ljpA8WiNiYrV0xiuaYxzCzhDxZoyofHnZEOod3blGK802DGZVQhfUDOl7m2I5esZ djAMC8YTCmgHHuDKY4FZHuhJN8rpqgYRP10v9Rr+dYUGp8cBVCxHqSkdX919f1jB S6WxRQ5w0MZf7oTnOm9OiAQ/nTniho0fGDg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrgeeigddutdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujgffkfggtgesthdtredttddttdenucfh rhhomhepofgrrhgtucevohhquhgrnhguuceomhgrrhgtsehmtggtugdrshhprggtvgeqne cuggftrfgrthhtvghrnhepleetgfevuefgieehgfegteejtdelkeeivddtvdehteeuudeh jeelhfefueffheeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepmhgrrhgttgesfhgrshhtmhgrihhlrdhfrhdpnhgspghrtghpthhtohepvddp mhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepmhhitghhrggvlhgphhgvvghruggvgh gvnhesfigvsgdruggvpdhrtghpthhtohephhgvlhhpqdhgnhhuqdgvmhgrtghssehgnhhu rdhorhhg X-ME-Proxy: Feedback-ID: ia2d149fd:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Nov 2024 02:09:31 -0500 (EST) In-Reply-To: <874j3u7wj4.fsf@web.de> (message from Michael Heerdegen on Mon, 25 Nov 2024 23:56:15 +0100) Received-SPF: pass client-ip=202.12.124.151; envelope-from=marcc@fastmail.fr; helo=fout-b8-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148406 Archived-At: I was trying to figure out how to do both but couldn't find it in the emacs manual. Thanks for the pointers, I'll have a look! -- Marc On Mon, Nov 25 2024, Michael Heerdegen wrote: > Marc Coquand writes: > >> (push '(ctrl-lock-state " [CTRL] " "") global-mode-string) >> [...] >> Is there a way to change the color of it, so it is shown in a red and >> bold color? > > Is the question about how to create a face, or how to attach it? > > I assume you ask about the latter: please look at > > (info "(elisp) Properties in Mode") > > in the GNU Emacs Lisp Reference Manual then. You will probably want to > use a :propertize construct specifying a 'face' text property. > > > Michael.