From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Florian Newsgroups: gmane.emacs.devel Subject: frame.el: call before-make-frame-hook earlier in make-frame Date: Thu, 30 Jul 2015 13:00:41 +0200 Message-ID: <20150730110041.GE23175@csr-pc9.zib.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1438263546 11037 80.91.229.3 (30 Jul 2015 13:39:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jul 2015 13:39:06 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 30 15:39:01 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZKo31-0004Bi-Io for ged-emacs-devel@m.gmane.org; Thu, 30 Jul 2015 15:38:59 +0200 Original-Received: from localhost ([::1]:40088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKo30-0006Nl-Rf for ged-emacs-devel@m.gmane.org; Thu, 30 Jul 2015 09:38:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKla0-0002L0-6B for emacs-devel@gnu.org; Thu, 30 Jul 2015 07:00:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKlZv-0000vP-VE for emacs-devel@gnu.org; Thu, 30 Jul 2015 07:00:52 -0400 Original-Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:36964) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKlZv-0000ux-Nl for emacs-devel@gnu.org; Thu, 30 Jul 2015 07:00:47 -0400 Original-Received: by wibud3 with SMTP id ud3so63003279wib.0 for ; Thu, 30 Jul 2015 04:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=RScfxj2ogyMb6u5gPzSWvHsBNz0U3z7emQujWouws1Y=; b=xZC6hHjJsn/f3RNgt+30QGHlO8afeR2YmmG6ESSuMrpmV1Hm+/fsM7GVIQeuXbJVLH EYUwOAYvE4figFdwPk4jLn5L52RFyKLCrXXfDYXc/9KavzC4isKXJ2HzbvChO+5wTOtn BinAmVi0tV7sw9qEeWbQ+UdjOsmBiWzhh/y47fIqCSn+qudjQxmOfVtKoQnMuxs5YPN1 3/pIWkMVIkPd6UPZwLEDSfPnEVSYx3HIrxBILyKee58PMPt1Aku/m3hNv2jErPSE3J7i DHRjJpYjcAaWwXwaCZ3UdN59hnpViRjYB4qNSDxzoDmF0US3YVopVZ17VQNrwSAeNIvL 8UPw== X-Received: by 10.194.192.166 with SMTP id hh6mr83480542wjc.127.1438254045527; Thu, 30 Jul 2015 04:00:45 -0700 (PDT) Original-Received: from localhost (csr-pc9.zib.de. [130.73.78.129]) by smtp.gmail.com with ESMTPSA id c3sm1260642wja.3.2015.07.30.04.00.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2015 04:00:44 -0700 (PDT) Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::230 X-Mailman-Approved-At: Thu, 30 Jul 2015 09:38:56 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188191 Archived-At: Dear Emacs developers, I would like to propose to call the before-make-frame-hook in the function make-frame *before* retrieving the parameters of the new frame (window-system-default-frame-alist and default-frame-alist) and not after. That way, one could dynamically set these variables inside the hook, e.g. to create the new frame under the current position of the mouse cursor. frame.el: [...] (defun make-frame (&optional parameters) [...] ;; NEW position of hook (run-hooks 'before-make-frame-hook) ;; Add parameters from `window-system-default-frame-alist'. (dolist (p (cdr (assq w window-system-default-frame-alist))) (unless (assq (car p) params) (push p params))) ;; Add parameters from `default-frame-alist'. (dolist (p default-frame-alist) (unless (assq (car p) params) (push p params))) ;; Now make the frame. ;; OLD position of hook ;;(run-hooks 'before-make-frame-hook) [...] Is there a reason that the hook is called after reading the params? Kind regards, Florian