From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Changes OK for Emacs 29? Date: Sat, 21 Jan 2023 08:28:44 +0800 Message-ID: <875yd07mtf.fsf@yahoo.com> References: <87cz797cyu.fsf.ref@yahoo.com> <87cz797cyu.fsf@yahoo.com> <833585nxn9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11343"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 21 01:29:42 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pJ1lN-0002kp-MK for ged-emacs-devel@m.gmane-mx.org; Sat, 21 Jan 2023 01:29:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJ1kj-00019F-BA; Fri, 20 Jan 2023 19:29:01 -0500 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 1pJ1kh-00018z-UJ for emacs-devel@gnu.org; Fri, 20 Jan 2023 19:28:59 -0500 Original-Received: from sonic302-22.consmr.mail.ne1.yahoo.com ([66.163.186.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJ1kf-0004RV-V4 for emacs-devel@gnu.org; Fri, 20 Jan 2023 19:28:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1674260933; bh=62PYvF4G55Hi9+jLuSVJCcC6QY+XceSDjVpFt0RYl3Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=TWvn9gqxt06eWfNKEBir4F+zAKTl34U5Ltls0XDqVULR3ZCWcLRAmqg1qUh/h/m1es9Da1H10k/pBFxCMvb1/xKdDQywHYJExQs8hT9PeF8IXr38I6YHBk0QY3xWPZbrj8MmIPmhvnVOtdiHusHs6vETMjEV45iZChQ484wU03AkLIMR5ZY7JSdfe6czYDrXYw/8gwNuQrdJXl2/lKPVgVKoPnICvGhCqa3uulUMVTVmzKZJTf42QJlIh6JcbR9xueEsxYB17oAr0Wjwr/LAmMj59cELEHyMvSfQn8bh4yYI5PvHowzMV+jPcXbQCS72J+LWqXwmGOGhWR4fq51DQQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1674260933; bh=0tn96tzFMAa1XYxlOB19n/Xuy1ggHKh3MJbFNTEKB4r=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=GRcVH+Lj2day/Dz6LkntHyHzE+qQEEgFXWjt2iidg+IzXV2g+zg4IlO9jJrIdrJWzl4ug1tjcz1D+nx+cyDbOZ38HuwJGgYTsvXL+gx0P3bob4iGc37oniVQXOnRiPv7e82rhparE83flWBEKl4+23UpYEDT09qwX4Beb7NbptFUVscNqApgqoKjFNjAdxBuxC97WdGbAc3CnsvtbCsaoBSyxmrvy3RIV1ZiUyH2ylxM+VMRw53VRZQ9kssiwnZgCIoFI8pmoIa4UoYA+J+cxzcrAYNFPy879ye44D5vf8+Q0mkaJaO/Ln/nnqJcWteJObeMgWNPFP3cJVsW1wDn8g== X-YMail-OSG: HFcjID0VM1lmpIyJD1NAoIaYaMZv5aC2YLeXcrBHmTyYxmuT7xRhgxoplrmRZ7r cig2MTMum0IOx2Vs6AFOuwbAgqhwz_fS5NuDWX0R.FjqqHaY7B7j3ZwC1UwYmtExS.Ame.z49tgl fQEhoBNgrJ3SLmfzVk9aRKqe.zGt_5SlCy1kLB1lxDLp5RKg81qK1smZ3HH7UKSiOgrYFD6cmejp wktmPh0xWKvP6Ph.Arr_qBFed6zQxzW7dCg9h.v94.fGwhyOyQfsWet5bx9G1G9JKO8ebkier4eE 5MZyLwdL2ZF4DdVy1_HU2jkN3qFZJdK.pFd5kNFOYKe8a_UVBavEaML38Hac6yMssozzsxxp3k1Y aUG0AR4CkgGVSgdGd8CwzErr3ghCDYSV2mQf8XL84.Oqa9aPISfcpY5qzrR4_rIeY7YdE2i7Ewft Ov2PY7vBiTnNeNeaaISzJY1ZIv.kLVBoz_Rwnl6Kcmaxto4ZV_ClFBPnUh0iaeX20461x4AiYhsM IaKnkECa3PIvR_jGeK2_HNVSM.QfkW2OOXE.GOurKPOlq3PS98pEuFgnZPllFlN6aPvVbX44As7X kNhHA1taLTIkQs08YiYzwVFTLaII77MOx5q2Isc6nDTNiTpS_ro5hDNOVBRyH4AtXiGaJfgTKbov aeLPBDYJDjYCzvwPO7h7veZ7h4mVTheAVSynxHW_HTSm7fp28_8Nc5o8jmY6Yje7KNM.PBi945NA BAVz2o7E4YqEAdImMLLsLOYMaVW9G_ibtZgY1PLcm_tf6Skp4QL7Od3sTnNoGc2xIOJ5rOWI3eg9 SnPUBqF5So3PcAQiG5Y.gnWTZg_JeaBc1Q1amAO0Qu X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ne1.yahoo.com with HTTP; Sat, 21 Jan 2023 00:28:53 +0000 Original-Received: by hermes--production-sg3-84766d64d7-khdp7 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 6435f65a92607cea81956b85a5d85e38; Sat, 21 Jan 2023 00:28:49 +0000 (UTC) In-Reply-To: <833585nxn9.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 20 Jan 2023 15:28:10 +0200") X-Mailer: WebService/1.1.21096 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.186.148; envelope-from=luangruo@yahoo.com; helo=sonic302-22.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302586 Archived-At: Eli Zaretskii writes: >> From: Po Lu >> Date: Fri, 20 Jan 2023 17:49:13 +0800 >> >> Users report that the following changes to two functions are needed for >> the Delete key to delete forward correctly on Haiku: >> >> (defun display-symbol-keys-p (&optional display) >> "Return non-nil if DISPLAY supports symbol names as keys. >> This means that, for example, DISPLAY can differentiate between >> the keybinding RET and [return]." >> (let ((frame-type (framep-on-display display))) >> (or (memq frame-type '(x w32 ns pc pgtk haiku)) >> ;; MS-DOS and MS-Windows terminals have built-in support for >> ;; function (symbol) keys >> (memq system-type '(ms-dos windows-nt))))) >> >> (defun normal-erase-is-backspace-setup-frame (&optional frame) >> "Set up `normal-erase-is-backspace-mode' on FRAME, if necessary." >> (unless frame (setq frame (selected-frame))) >> (with-selected-frame frame >> (unless (terminal-parameter nil 'normal-erase-is-backspace) >> (normal-erase-is-backspace-mode >> (if (if (eq normal-erase-is-backspace 'maybe) >> (and (not noninteractive) >> (or (memq system-type '(ms-dos windows-nt)) >> (memq window-system '(w32 ns pgtk haiku)) >> (and (eq window-system 'x) >> (fboundp 'x-backspace-delete-keys-p) >> (x-backspace-delete-keys-p)) >> ;; If the terminal Emacs is running on has erase char >> ;; set to ^H, use the Backspace key for deleting >> ;; backward, and the Delete key for deleting forward. >> (and (null window-system) >> (eq tty-erase-char ?\^H)))) >> normal-erase-is-backspace) >> 1 0))))) >> >> Are they ok for Emacs 29? > > I don't know. Please describe the problem, please show the changes > (as diffs, for example), and please explain how these changes fix the > problems. Here are the changes. It's always possible to tell backspace apart from delete, and RET from return on Haiku. diff --git a/lisp/simple.el b/lisp/simple.el index 4551b749d56..a38426060e0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -10317,7 +10317,7 @@ normal-erase-is-backspace-setup-frame (if (if (eq normal-erase-is-backspace 'maybe) (and (not noninteractive) (or (memq system-type '(ms-dos windows-nt)) - (memq window-system '(w32 ns pgtk)) + (memq window-system '(w32 ns pgtk haiku)) (and (eq window-system 'x) (fboundp 'x-backspace-delete-keys-p) (x-backspace-delete-keys-p)) diff --git a/lisp/frame.el b/lisp/frame.el index 322a6f9aa59..fa376788eb0 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -2189,7 +2189,7 @@ display-symbol-keys-p This means that, for example, DISPLAY can differentiate between the keybinding RET and [return]." (let ((frame-type (framep-on-display display))) - (or (memq frame-type '(x w32 ns pc pgtk)) + (or (memq frame-type '(x w32 ns pc pgtk haiku)) ;; MS-DOS and MS-Windows terminals have built-in support for ;; function (symbol) keys (memq system-type '(ms-dos windows-nt)))))