From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Should this package be included into the NS port? Date: Sat, 02 Jun 2018 22:25:33 -0400 Message-ID: References: <20180602201135.GA97920@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1527992653 19238 195.159.176.226 (3 Jun 2018 02:24:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Jun 2018 02:24:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: George Plymale II , emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 03 04:24:08 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 1fPIgi-0004w1-Il for ged-emacs-devel@m.gmane.org; Sun, 03 Jun 2018 04:24:08 +0200 Original-Received: from localhost ([::1]:33376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPIip-0007Zu-Lo for ged-emacs-devel@m.gmane.org; Sat, 02 Jun 2018 22:26:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPIiA-0007Zo-Qe for emacs-devel@gnu.org; Sat, 02 Jun 2018 22:25:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPIi7-0002Zz-JO for emacs-devel@gnu.org; Sat, 02 Jun 2018 22:25:38 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:55460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPIi7-0002Zt-Cv for emacs-devel@gnu.org; Sat, 02 Jun 2018 22:25:35 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w532PXhZ022484; Sat, 2 Jun 2018 22:25:34 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id A4A146554F; Sat, 2 Jun 2018 22:25:33 -0400 (EDT) In-Reply-To: <20180602201135.GA97920@breton.holly.idiocy.org> (Alan Third's message of "Sat, 2 Jun 2018 21:11:35 +0100") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6299=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6299> : inlines <6676> : streams <1788575> : uri <2651734> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:225942 Archived-At: > I=E2=80=99m pretty sure that number is the one defined in nsterm.h line 7= 51: > > #define KEY_NS_NEW_FRAME ((1<<28)|(0<<16)|12) Hmm... I wonder why the code uses a number instead of a symbol? Apparently it's not just specific to NS since system-key-alist is apparently also used under X11. Here it says: system-key-alist is a variable defined in =E2=80=98keyboard.c=E2=80=99. Its value is ((65280 . remove)) It is a terminal-local variable; global value is the same. But AFAIK, this 65280 is an X11 keysym code. I.e. should never be turned into a Lisp numeric event (since there are only used for characters). I guess someone who understands why we have modify_event_symbol might be able to help us figure out how to best fix this problem. > and it looks like it=E2=80=99s defined for lisp in x-setup-function-keys = in > common-win.el, but it looks to me like it should be set up in all > frames where (featurep 'ns) is true. This code is not run for non-GUI frames/terminals, I think. > I guess that function doesn=E2=80=99t run on terminal frames, then. That = might > explain it. Exactly. > Would we be able to define this (or maybe all of the NS events?) in > ns-win.el instead of in this function? Yes. > Would that be a bad idea? Seems no worse than having it in common-win.el and wrapped in (featurep 'ns) But it might not help, since ns-win.el is used for NS GUI frames, whereas we'd want it for NS non-GUI frames. Stefan