From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: Creating a custom face for a variable shown in global-mode-string? Date: Mon, 25 Nov 2024 23:56:15 +0100 Message-ID: <874j3u7wj4.fsf@web.de> References: <87a5doetds.fsf@mccd.space> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28009"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Marc Coquand Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 25 23:56:02 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 1tFhzt-00077m-QB for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 25 Nov 2024 23:56:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFhzE-0007Wz-Mk; Mon, 25 Nov 2024 17:55:20 -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 1tFhzD-0007Wj-DW for help-gnu-emacs@gnu.org; Mon, 25 Nov 2024 17:55:19 -0500 Original-Received: from mout.web.de ([212.227.17.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFhzB-0006UQ-PL for help-gnu-emacs@gnu.org; Mon, 25 Nov 2024 17:55:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1732575312; x=1733180112; i=michael_heerdegen@web.de; bh=6VpKKCjbUfl/Kxwi+kT9L5xBYnbjFHCm8aQmqoYkgLw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=OY5lmaXORHjwM7iJq+Q44Ylh5PmLueQhXfAR/lXgO2BKcxwjIAj471bqzTPwJGCa q1d3oyHvVLpljm/5zDTxDAoAutpH68LPpakW9+P92ARM2mDBBADhzfOSa573Sw2k9 PVMjmnTZ65pcisg4VLCdJxjRDDUW9lgRJGDxdxbYbusFSIuKkvSV7N2pyUvvtJoM0 1wLqu58ZhC6Ae5VMMh0b+Ah7nB0c96hsZCIvVfYkISBlZei+Q+mb0NGac89uDDcJw FRwvY8LXmi3vVhorQDkxo4BNdH+zQfVwsgh591/wlwgRn40rS5vRf2eY7mFCcvem7 uwI53rkxxhBT/MxKJg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([92.75.138.197]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mvbn2-1tWyDZ3bgU-00yrQM; Mon, 25 Nov 2024 23:55:11 +0100 In-Reply-To: <87a5doetds.fsf@mccd.space> (Marc Coquand's message of "Sun, 24 Nov 2024 13:57:51 +0200") X-Provags-ID: V03:K1:a2c/WM5fht8kK0oU0eJz8RY8JGz30mSv96nq4uIPc/zqOyFuNah vWGzrLkQIdpAFsJetyHv/KbgpxAylXbbVjtA6oSlUNprpWiqOaZ9fPJ2G4sODkSbh753BVA n+MojPQKyHN33b8TIJJNhcO76Ya+To1smuvwBLRjGXrZQmiJUF1FsgNWVdgS4rzN2e9oqUi j5Hv2Y6wTemXiACv4QJLg== UI-OutboundReport: notjunk:1;M01:P0:mO+obt7HFoQ=;Ro9onVYv7Yn+wkVNXXQd92NY2C0 xqGMrQ+U/ZzeaI+4m5d1PGXSlTguV8Rqll3zfZP8I4xoVXxM46jCDlGLnzUT7bQkEg7GFYBHm PxpDK7AMRH5PRHtKAjAccvjgOLmhWdiaIh1m6Cg4SbGU09iTJ/IbhGENPdjx+fjV3ZnWG+VTh WDY528BxWVZAHY6r2fmR8WemD7xi1Dp0Dn0wVRNhWKnBIJ1AB1t/F/lUwh4zsAx5RKuJfho8h ZWfkowG6lPCJNs2/ZcYGiqLcBK3c5dU+4+h5rRAgVeq/Y6a5F7wqRWy2/4syRFU0nscL/cmFx SFMgKlEUIDM6/YUDfCwqsLT2vlMnCcubk+NDR3cBM3R/D+1sbbNkdZOVWqmi5xe9qmMf6xenW /rtZW/x6eECw1YaLMLxuyonUjfCulLjoZEwcIX9nKFTVsUoHRwowh5WgOeaYZusrwML+lmOzp fXIhEi9OCemsxyrmog+VJ7VYEr/dX4DbJjSQa66ykSPrAQgHfFVDe+FSwv4zJTQPzPaEBWavQ GPGi3bOxY2upHc72/IwlekyL/ofWNncCUzK0AA01aPfhBVKnqWeC0HCK+2qN+efciGSpXtaxF JHz2P337YmUUyydTUQLi+w4EKypr8sHdwli+6/OWont2fT+5Ao53offjp5363ruTi/0rh+GM/ NiXzdRwETALVP3BL4SEp+TC6sDQE9T1ujV4we+XKUqEnbEEj3DMk6kn9tPguTHpjA9EOzwD7R Y2GzUzYoveOQ+Z4c/1kwKm3654o2B7fxDPCw7ZclgFbFPEl5ejx6J7t2YnWmqpUINrX8EVvY Received-SPF: pass client-ip=212.227.17.12; envelope-from=michael_heerdegen@web.de; helo=mout.web.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=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:148404 Archived-At: 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.