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: face-remap-add-relative versus set-face-attribute Date: Sun, 13 Feb 2022 02:26:00 +0000 Message-ID: References: <87a6evvax9.fsf@zoho.eu> 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="2469"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emanuel Berg , help-gnu-emacs@gnu.org To: goncholden Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 13 03:27:10 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 1nJ4bW-0000Q5-Ek for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 13 Feb 2022 03:27:10 +0100 Original-Received: from localhost ([::1]:51676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJ4bU-0000fb-OX for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 12 Feb 2022 21:27:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJ4aX-0000fQ-ED for help-gnu-emacs@gnu.org; Sat, 12 Feb 2022 21:26:09 -0500 Original-Received: from mail-4319.protonmail.ch ([185.70.43.19]:54297) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJ4aT-0002GD-NQ for help-gnu-emacs@gnu.org; Sat, 12 Feb 2022 21:26:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1644719161; bh=9sIEkYddjiBj6iNudAIyh5d20O/rUNi34fRTyadl4j8=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=oN+KPQNO/sjQJX+Tk0loUkyrtvf3ATsJKIft/ZOsoJw+x/+wXK7bkz7RUOXYshmut LfyGNUPYAzvxarLLjuVrz4Y4HQ09vcUlmHhuoGiagza2pnORLmvefFT1Mq56viB2Xb rkTmHCJaP8GUIRmO4IE1IvIkyNuOxxC/uH/5G4tEXlt31SeCtx02UzXz6Sp5DrhILU +URW2z4rc8n98L3KWofQgmG2KgCYBZsQYjwUWjFC5YA+RIFC3qKo8cdIwf0SfCOXg6 VKTAGMzRI2RAsqXi00lkcPkAtfQfLb1RuHbmQQGOf7MhoCiVXUpPf0uO/rp7/cs/nu /LKNhi65nV9Cg== In-Reply-To: Received-SPF: pass client-ip=185.70.43.19; envelope-from=goncholden@protonmail.com; helo=mail-4319.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, TO_EQ_FM_DIRECT_MX=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:135919 Archived-At: ------- Original Message ------- On Sunday, February 13th, 2022 at 2:12 AM, goncholden wrote: > ------- Original Message ------- > On Sunday, February 13th, 2022 at 12:59 AM, Emanuel Berg via Users list f= or the GNU Emacs text editor help-gnu-emacs@gnu.org wrote: > > goncholden via Users list for the GNU Emacs text editor wrote: > > > > > What is superior? Using (face-remap-add-relative 'default :weight 'bo= ld) > > > or using (set-face-attribute 'font-lock-comment-face nil :weight norm= al) ? > > They don't do the same thing ... But the second is good, except I don't > > think one needs to `quote' font-lock-comment-face. > > face-remap-add-relative could be buffer local. Would one prefer buffer lo= cal for customising > comments? > > > Don't forget about font-lock-comment-delimiter-face BTW ... > > > And try this ... > > > (defun set-all-faces (fg &optional bg weight) > > (let ((backg (or bg "black")) > > (wght (or weight 'normal)) > > (faces) ) > > (mapatoms (lambda (s) > > (when (facep s) > > (push (symbol-name s) faces) ))) > > (dolist (f faces) > > (set-face-attribute (intern f) nil > > :foreground fg) > > :background backg > > :weight wght > > :italic nil) )) > > > (set-all-faces "red") What is the use of set-all-faces, getting perplexed with it.