From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: lorentey@elte.hu (=?iso-8859-2?q?L=F5rentey_K=E1roly?=) Newsgroups: gmane.emacs.devel Subject: Re: Display-local settings Date: Mon, 19 Apr 2004 17:10:09 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87eks0654s.fsf@sno.mundell.ukfsn.org> <87n06bp4ng.fsf@sno.mundell.ukfsn.org> <8765cwkejr.fsf@mail.jurta.org> <200404071157.UAA25094@etlken.m17n.org> <200404071312.WAA25268@etlken.m17n.org> <87zn9nqras.fsf@emacswiki.org> <87hdvux5uz.fsf@orebokech.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1082397244 10301 80.91.224.253 (19 Apr 2004 17:54:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Apr 2004 17:54:04 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 19 19:53:57 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BFcxw-0001JM-00 for ; Mon, 19 Apr 2004 19:53:56 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BFcxr-0008Ev-00 for ; Mon, 19 Apr 2004 19:53:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BFcZI-0007xr-34 for emacs-devel@quimby.gnus.org; Mon, 19 Apr 2004 13:28:28 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BFcSf-0006LT-CB for emacs-devel@gnu.org; Mon, 19 Apr 2004 13:21:37 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BFcE3-0002M2-Gt for emacs-devel@gnu.org; Mon, 19 Apr 2004 13:07:02 -0400 Original-Received: from [157.181.1.137] (helo=mx1.elte.hu) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BFcDX-0002F4-BA; Mon, 19 Apr 2004 13:05:59 -0400 Original-Received: from mailbox1.caesar.elte.hu (mailbox1.caesar.elte.hu [157.181.151.157]) by mx1.elte.hu (Postfix) with ESMTP id 05BAC276E36; Mon, 19 Apr 2004 17:11:02 +0200 (CEST) Original-Received: from eris (eris.elte.hu [157.181.150.146]) by mailbox1.caesar.elte.hu (Postfix) with ESMTP id EDBD9A079515; Mon, 19 Apr 2004 17:10:43 +0200 (CEST) Original-Received: by eris (Postfix, from userid 1000) id E587C47BA6; Mon, 19 Apr 2004 17:10:09 +0200 (CEST) Original-To: David Kastrup In-Reply-To: (David Kastrup's message of "16 Apr 2004 22:38:15 +0200") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-ELTE-SpamVersion: MailScanner 4.26.8-itk2 (ELTE 1.1) SpamAssassin 2.63 ClamAV 0.65 X-ELTE-VirusStatus: clean X-ELTE-SpamCheck: no X-ELTE-SpamCheck-Details: score=-4.9, required 5.9, autolearn=not spam, BAYES_00 -4.90 X-ELTE-SpamLevel: X-ELTE-SpamScore: -4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21896 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21896 David Kastrup writes: >> So frame-local settings are sufficient as long as we get a chance to >> dynamically setup those parameters whenever a new frame is created. > > We currently only have > > frame-creation-function's value is=20 > x-create-frame-with-faces > > Window-system dependent function to call to create a new frame. > The window system startup file should set this to its frame creation > function, which should take an alist of parameters as its argument. > > Defined in `frame'. > > [back] > > That's hardly sufficient. I think I should mention that the behaviour of make-frame has changed a bit in the multi-tty branch: `frame-creation-function' has been replaced by a window system-dependent `frame-creation-function-alist'. (I know it's an ugly incompatible change--providing an equivalent compatible solution is on my todo list.) But changing the frame creation method is perhaps not the best way to approach this particular problem: if a Lisp package really does need to do window-system specific frame initialization, then I think it should simply hook into after-make-frame-functions, like this: (defun xyzzy-after-make-frame-function (frame) (let ((w (window-system frame))) (cond ((eq w 'x) (xyzzyfy-x-frame frame)) ((eq w 'nil) (xyzzyfy-tty-frame frame)) ;; etc. (t (error "Can not xyzzyfy frame: window-system %s unknown" w))))) (add-hook 'after-make-frame-functions 'xyzzy-after-make-frame-function) Probably most packages only need to set special frame parameters; we could introduce a simple window-system specific default-frame-alist mechanism to make that easier. --=20 K=E1roly