From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: dancol@dancol.org Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 6fdc3fa: Support terminal focus notifications Date: Sat, 9 Jun 2018 08:49:25 -0700 Message-ID: References: <20180609055212.3056.85949@vcs0.savannah.gnu.org> <20180609055213.B7E0920498@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1528559262 1131 195.159.176.226 (9 Jun 2018 15:47:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 9 Jun 2018 15:47:42 +0000 (UTC) User-Agent: SquirrelMail/1.4.23 [SVN] Cc: Daniel Colascione , emacs-devel@gnu.org To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 09 17:47:38 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRg5Z-0000Bd-EL for ged-emacs-devel@m.gmane.org; Sat, 09 Jun 2018 17:47:38 +0200 Original-Received: from localhost ([::1]:40763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRg7g-0003xP-Bv for ged-emacs-devel@m.gmane.org; Sat, 09 Jun 2018 11:49:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRg7S-0003vb-Po for emacs-devel@gnu.org; Sat, 09 Jun 2018 11:49:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRg7R-0008DP-QY for emacs-devel@gnu.org; Sat, 09 Jun 2018 11:49:34 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:40252) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRg7R-00088M-Gn for emacs-devel@gnu.org; Sat, 09 Jun 2018 11:49:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From:Subject:Date:References:In-Reply-To:Message-ID; bh=8X9tw2gJEG/KANSStU6pQfIGyci5j6gXHy8E9YO3Lto=; b=AmeHjZ0tnNaXiVkN+yhmZ4awQNqsdI9sotObn6JlgIfVjKeflyjkJfOfpDTSxzM1/HgOy8jtfPYHHw/MOGIwttKEfSi7OO6E3qjmrQBAy48ydCWucnPjUWC0N3BSDjOF0auOnahlKR2UIF/uZC8tphcNxToN+UwkMmpVf3QcSCSD+1SoWQMUwkTR21YMyIQq+JNjMZSX8g6GT7YZ2mnRXh4O+MhGg6ERtz9J2PktrRdIx80BptI9RtDBwPGKjPxe88v6KRjCblxzpfUlcZpw5Urqhal0ueH52wnSF5p4Bz851oYfeny5kNQYlkR216Y25IJWLnUwGpmhD2ML5B9KJQ==; Original-Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fRg7J-0003OX-QA; Sat, 09 Jun 2018 08:49:25 -0700 Original-Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Sat, 9 Jun 2018 08:49:25 -0700 In-Reply-To: X-Priority: 3 (Normal) Importance: Normal X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:226139 Archived-At: >> +(defun xterm-handle-focus-in () >> + (interactive) >> + (handle-focus-in)) >> +(defun xterm-handle-focus-out () >> + (interactive) >> + (handle-focus-out)) > > Aka > > (defalias 'xterm-handle-focus-in #'handle-focus-in) > (defalias 'xterm-handle-focus-out #'handle-focus-out) > > right? handle-focus-{in,out} have an interactive specification that makes them not work when bound directly to the synthetic event --- which seems silly, since we never actually use the event --- but I didn't want to touch the existing focus code. >> +(define-key global-map [xterm-focus-in] #'xterm-handle-focus-in) >> +(define-key global-map [xterm-focus-out] #'xterm-handle-focus-out) > > I think this deserves a comment explaining why we don't use the > pre-existing `focus-in` and `focus-out` events and why we bind our > events in global-map rather than in special-map (as is done for > `focus-in/out` events). I was being consistent with the xterm-paste event. All three events should go in special-map if that's the right place, shouldn't they? It doesn't seem to make a difference in this case.