From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexandros Prekates Newsgroups: gmane.emacs.help Subject: Re: Is Default face a per frame attribute or a global one? Date: Wed, 27 Aug 2014 04:49:44 +0300 Message-ID: <53FD3938.7040508@openmailbox.org> References: <53FA7566.8080007@openmailbox.org> <87a96tnmgq.fsf@gmail.com> <53FB0AC8.5040505@openmailbox.org> <871ts4ojx2.fsf@gmail.com> <53FBC1CE.7030602@openmailbox.org> <87k35vn92v.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1409104215 5817 80.91.229.3 (27 Aug 2014 01:50:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2014 01:50:15 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Alex Kost Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 27 03:50:10 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 1XMSNG-0007Kk-62 for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Aug 2014 03:50:10 +0200 Original-Received: from localhost ([::1]:56902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMSNF-00069d-O3 for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Aug 2014 21:50:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMSN1-00069G-9u for help-gnu-emacs@gnu.org; Tue, 26 Aug 2014 21:49:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMSMw-00053i-RQ for help-gnu-emacs@gnu.org; Tue, 26 Aug 2014 21:49:55 -0400 Original-Received: from mail.openmailbox.org ([212.129.10.237]:35239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMSMw-00053W-FN for help-gnu-emacs@gnu.org; Tue, 26 Aug 2014 21:49:50 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.openmailbox.org (Postfix) with ESMTP id CA3262E05B0; Wed, 27 Aug 2014 03:49:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=openmailbox.org; h=content-transfer-encoding:content-type:content-type :in-reply-to:references:subject:subject:mime-version:user-agent :from:from:date:date:message-id:received; s=openmailbox; t= 1409104187; bh=/UaM838KCClQ1cPTjSTt7mUyxUuG65Bpn2xB+uFfiaI=; b=N cUswFLblSmB/AzQdcxcLenXOV6wNpUy4282eRBOvdTg6YFyJm9kgh3fosQfHaBww fwcdtu/zQTA/wBrZeiujZHDDlIMZf6422l+MdZEG4chAE5gUhx9kr04moEcLTseF Ym3jxOrM3fjohzSY34vTmOA8ZyJvOMVCHsHxTk65a0= X-Virus-Scanned: at openmailbox.org Original-Received: from mail.openmailbox.org ([212.129.10.237]) by localhost (mail.openmailbox.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ze3C8ifAf4Rs; Wed, 27 Aug 2014 03:49:47 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <87k35vn92v.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.129.10.237 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:99409 Archived-At: On 26/08/2014 07:55 =CF=80=CE=BC, Alex Kost wrote: > 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 amo= ng >>>>>> fonts, faces, frames etc, i noticed >>>>>> that if i have 2 frames (A and B) and i evaluate from ielm in fr= ame A >>>>>> (set-frame-font "liberation serif" nil nil) . when i check the def= ault >>>>>> 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 on= e >>> =E2=80=98default=E2=80=99 face (defined in "faces.el"), if that's wha= t you 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 wi= th >> 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 attribute= s > 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 ca= lls > =E2=80=98set-face-attribute=E2=80=99 to specify a font for the current = frame. > Thanks. That makes things more clear now. set-frame-font --> set-face-attribute -->=20 internal-set-lisp-face-attribute (c function). That last one somehow implements the=20 http://www.emacswiki.org/emacs/FacesPerFrame funtionality. Although i 'm curious of how you do that in a non-OO language :-) Alexandros