From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70138: Do not intercept C-TAB on Haiku OS Date: Tue, 02 Apr 2024 21:00:58 +0800 Message-ID: <87sf033omt.fsf@yahoo.com> References: Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35025"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 70138@debbugs.gnu.org To: =?UTF-8?Q?Tor-bj=C3=B6rn?= Claesson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 02 15:03:02 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rrdn4-0008w6-2r for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Apr 2024 15:03:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrdmd-0006AB-2g; Tue, 02 Apr 2024 09:02:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrdm3-0005xI-3T for bug-gnu-emacs@gnu.org; Tue, 02 Apr 2024 09:02:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrdm2-0002TT-QP for bug-gnu-emacs@gnu.org; Tue, 02 Apr 2024 09:01:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrdm5-00062M-Va for bug-gnu-emacs@gnu.org; Tue, 02 Apr 2024 09:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Apr 2024 13:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70138 X-GNU-PR-Package: emacs Original-Received: via spool by 70138-submit@debbugs.gnu.org id=B70138.171206290323104 (code B ref 70138); Tue, 02 Apr 2024 13:02:01 +0000 Original-Received: (at 70138) by debbugs.gnu.org; 2 Apr 2024 13:01:43 +0000 Original-Received: from localhost ([127.0.0.1]:53026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrdlm-00060Y-LR for submit@debbugs.gnu.org; Tue, 02 Apr 2024 09:01:43 -0400 Original-Received: from sonic314-20.consmr.mail.ne1.yahoo.com ([66.163.189.146]:38984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrdlk-000609-Qu for 70138@debbugs.gnu.org; Tue, 02 Apr 2024 09:01:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1712062890; bh=Lh9D/9R14+M3JHIPgnNg4EqSTECrdih5o356Dh4yaHg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=fLOYTAzgPIsfbJ08/3kXc3SSyV1kBODepxELLV8IwTNgoL88XVApOLeAlW3AYkJwkS08e/CCvZHpxxS1iYVxthdK/OUBm8BG8ACfv4Ix47E9CWPY5rlON28f7U2eBT8HsSt71f6eG1s91eHcK7rmKY/Fid5s1BBSaQ3vbgAHgtSGaqn9R8vX1Qg1oq0xgNhzhIpgCvi59qGKGOFNgbKyfjAC+xJpzi6xyW9OfnptMZFkGaMwzUgm7VXtcz3NgCSWhbVQztIusKopJSVAiH6st5ysAmyPWU+vk0oUIp6HKzGHdAAb3yQFP++oid5SXkzGz4oIwEj8oQtT3+AtrW+kZA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1712062890; bh=rs3+eZBr9unvHblAKlx9In76jFS47xCMy79MT/KfEGg=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=JhxH7Cu9CHUMBjw/ISEH2jdtK1uV97bEsQ1zhgB9+L8mMRGVUDeitTvhWGFuVbelP3d/yoEibqatDBoUpVAudHrGl1N2tRON19wjBlkOn7QHxxvZi3/ihJsIZXJ6IzHMuu1dROJ90E3TY7nsQGbni0dalOKywVXuaslbGrtiKqBLviGw/Ew/XlR6aNQlh0qOcoY6pLFWCh7plaTRvKjuND9xl0o6OgmTXKklwZptGrNdxkJ+/mIMSRx/g8ItTtDBJL+ViFOgXEAkga2eTIcqT/QSj+4DOEFOxvl5PcrIsLvJ7S1KKkHAc3va1kHUhNxWCurWe68aCdwbjrZQ95JGyQ== X-YMail-OSG: P5c_FCEVM1mnwa60OGFIJl.0p7Mkg4oIWbHqoyBfiYOeVcX6Xtdr2QI3zTkywUZ g6B4qCv4utH85OerlB1CgzCAlpJoetoy6rx_7GgYyZuXJOY34zUmXUvnX4GRD0p1qIgfBbMXfY4v 5Z0EbUbGXrsK1IKO.9iNk_QxayfFSkNssPwutFHea0XoMsVULjrwVIFs7hiCbMlkxE7MgHK0zwSL LqIpJC7glDEOh.1BnQCG9m3aRI85jVptZqe9s6XnKJAKb_..XH0_IbkwBAIqUDsztzBDh9OtjOqO o1U.IrNCL_knuTzHMtFmUxrzhz5nM02VLpHiCowmk2GtYRWeRzxK6GGNwOkzObxgQ7UuHTJuxo1z jLkemSqF.sSxXPnG_qUxAOvI7.FhfFyFtuUHou9f0Elotns5LvFlvlFzWGiFySBMVPIw4ajxwNkK cKto0kt5E.b0qpSd5LQ.Gpl0OfaHEf6uNHXK2UY4k.vU_hRcPC0XePu._zoKzVUK601dS6pDO1EK VctHHC8ytcSti5xY2gsjBFWL4BChAUAnzLN9sd6cUgMIyTWEqpGLHS_pjMBmTBMLuuZOM3AeIIWP VOQjkA_iBYms0yCbbQ0E1uT6doYUpAxhfEMQRxAqe4FJRcKRKxr6Q8Jzfr_NTAjjc1EfWWFieat7 T.ToWoH9.INCg8eTraA01.PP36buyu0dcX6iFKMtp1yLoHjx6DdCFHI7WO3YD.XunXXb5yeVZt01 osy1n4OMgNrx1KzIkWSC9JdRTtKIp6pbTVlN79JaoMVEoC7YadueM2BDzvE27dZNNoniNQXLUPcU pdVd7Jkz0cdt1MYcuVqcXd4R0C1MX1ko27XdckoYH4 X-Sonic-MF: X-Sonic-ID: 35e543b8-447e-4fc1-a260-0163eb306cb1 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Tue, 2 Apr 2024 13:01:30 +0000 Original-Received: by hermes--production-sg3-6dc75bc8fb-wtvcs (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 07caf2740824534cb6e21c692d965c91; Tue, 02 Apr 2024 13:01:25 +0000 (UTC) In-Reply-To: ("=?UTF-8?Q?Tor-bj=C3=B6rn?= Claesson"'s message of "Tue, 2 Apr 2024 09:33:24 +0300") X-Mailer: WebService/1.1.22205 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282508 Archived-At: Tor-bj=C3=B6rn Claesson writes: > Hello!=20 > > On Haiku, C-TAB switches between application windows. Emacs > unfortunately intercepts this keystroke, breaking window switching. > > This patch makes Emacs instead pass C-TAB to Haiku, while introducing > the variable haiku-pass-control-tab-to-system, allowing the current > behaviour. > > I would be grateful for feedback on this patch, and am willing to work > on it until it is ok. If necessary, I'm happy to assign copyright. Thanks. Please insert an entry in etc/NEWS documenting this change, and format the code consistently with its surroundings, thus: > + if (haiku_should_pass_control_tab_to_system() && > + mods & B_CONTROL_KEY && key =3D=3D 38) { > + BWindow::DispatchMessage (msg, handler); > + return; > + } if (haiku_should_pass_control_tab_to_system () && (mods & B_CONTROL_KEY) && key =3D=3D 38) { BWindow::DispatchMessage (msg, handler); return; } > +bool > +haiku_should_pass_control_tab_to_system (void) { > + return haiku_pass_control_tab_to_system; > +} Please position the opening brace of this defun on its own line. > + DEFVAR_BOOL ("haiku-pass-control-tab-to-system", > + haiku_pass_control_tab_to_system, > + doc: /* Whether or not to pass C-TAB to the system. > + Settings this variable will cause Emacs to pass C-TAB to the sy= stem (allowing window switching on Haiku), rather than intercepting it for = use in Emacs." */); > + haiku_pass_control_tab_to_system =3D true; Please move the second paragraph of the doc string to column zero and fill it with M-q. Last but not least, please write ChangeLog entries for the commit message as specified in our CONTRIBUTE document. I'm willing to write them on your behalf, as a first time contributor, but it would better acquaint you with our practices to apply yourself to the task. Thanks. Eli, will we require copyright assignment for this change?