From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex Kost Newsgroups: gmane.emacs.help Subject: Re: Is Default face a per frame attribute or a global one? Date: Tue, 26 Aug 2014 08:55:36 +0400 Message-ID: <87k35vn92v.fsf@gmail.com> References: <53FA7566.8080007@openmailbox.org> <87a96tnmgq.fsf@gmail.com> <53FB0AC8.5040505@openmailbox.org> <871ts4ojx2.fsf@gmail.com> <53FBC1CE.7030602@openmailbox.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1409028970 2799 80.91.229.3 (26 Aug 2014 04:56:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Aug 2014 04:56:10 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Alexandros Prekates Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 26 06:56:03 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XM8nb-0000Hh-Cu for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Aug 2014 06:56:03 +0200 Original-Received: from localhost ([::1]:51631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XM8nb-0005iv-4A for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Aug 2014 00:56:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XM8nI-0005iq-2h for help-gnu-emacs@gnu.org; Tue, 26 Aug 2014 00:55:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XM8n8-0001jA-Vp for help-gnu-emacs@gnu.org; Tue, 26 Aug 2014 00:55:44 -0400 Original-Received: from mail-la0-x22b.google.com ([2a00:1450:4010:c03::22b]:43030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XM8n8-0001j6-NW for help-gnu-emacs@gnu.org; Tue, 26 Aug 2014 00:55:34 -0400 Original-Received: by mail-la0-f43.google.com with SMTP id gi9so11923521lab.16 for ; Mon, 25 Aug 2014 21:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=a9nvAMS/aomUwSypKHfFMdAgnQwDQPApr5kBnjKkhCM=; b=hE+P1hKcdiP4V7FQbD2QrrEdKoVeoDXwszFYWCgTNC77etqy+pk/vjSq4JimpUCSkq 8lHEtxQ1n3pqQoVPnUgr1gbdz6z+jwsoQeRsnM7SxtZo06DM9RPXXui9KsZmOEfYdKJW ade+8uY3QjuYFurbWSafqSIxrR+eAl1lzeMFRKWUGdZ9ryxoTepDb81BjszqDaWU2NGm 8XJUNs42qqQjQ/fZ5L4rdGEAMAF/ijalzI5zLa45RyOsrHzB8psa5kU+rOl/D+XiosvN WUczRmd1syx2PT3C1LDgzpL/UvCszx1v3PAH5hU/A7BZpQuB1yfIldACsY2w/nWqqLMv +tiQ== X-Received: by 10.152.6.5 with SMTP id w5mr396935law.94.1409028933635; Mon, 25 Aug 2014 21:55:33 -0700 (PDT) Original-Received: from leviafan (128-70-193-103.broadband.corbina.ru. [128.70.193.103]) by mx.google.com with ESMTPSA id s10sm1242397laa.29.2014.08.25.21.55.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Aug 2014 21:55:32 -0700 (PDT) In-Reply-To: <53FBC1CE.7030602@openmailbox.org> (Alexandros Prekates's message of "Tue, 26 Aug 2014 02:07:58 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22b X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99403 Archived-At: Alexandros Prekates (2014-08-26 03:07 +0400) wrote: > On 25/08/2014 03:03 =CE=BC=CE=BC, Alex Kost wrote: >> Alexandros Prekates (2014-08-25 14:07 +0400) wrote: >> >>> On 25/08/2014 08:54 =CF=80=CE=BC, Alex Kost wrote: >>>> Alexandros Prekates (2014-08-25 03:29 +0400) wrote: >>>> >>>>> Continuing little experiments to better undestand the relation among >>>>> fonts, faces, frames etc, i noticed >>>>> that if i have 2 frames (A and B) and i evaluate from ielm in frame= A >>>>> (set-frame-font "liberation serif" nil nil) . when i check the default >>>>> face's font i see different values in frame A from frame B. >>>>> >>>>> So it seems that default face is a frame's variable. >>>>> >>>>> i mean every frame has its own default face? Is that right? >>>> As you can see after "C-h f set-frame-font": >>>> >>>> =E2=80=9C... >>>> If FRAMES is nil, apply the font to the selected frame only. >>>> ...=E2=80=9D >>>> >>>> So the second nil in your expression means you set a font only for the >>>> current frame A. >>>> >>>> >>> So default face is not a global emacs session variable. It's an >>> attribute per frame. >> I thought you were talking about frame fonts. AFAIU there is only one >> =E2=80=98default=E2=80=99 face (defined in "faces.el"), if that's what y= ou mean. >> > > But the assumption that there is only one global default face > contradicts with what i see. > > In two frames (of the same emacs session) M-x describe-face (default) > gives me different font families ( i changed in each frame the font with > set-frame-font.) I didn't mean there is always only one global value of a face for all frames. As you could see it is possible to set face attributes for a particular frame. Here is a paragraph from (info "(elisp) Faces"): =E2=80=9C... By default, each face name corresponds to the same set of attributes in all frames. But you can also assign a face name a special set of attributes in one frame (*note Attribute Functions::). =E2=80=9D You can look at (info "(elisp) Attribute Functions") to read how it can be done. And =E2=80=98set-frame-font=E2=80=99 does exactly that: it calls =E2=80=98set-face-attribute=E2=80=99 to specify a font for the current fram= e.