From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Proposal for an improved `help-for-help' Date: Fri, 30 Apr 2021 23:02:11 +0300 Message-ID: References: <838s7hxqkr.fsf@gnu.org> <1c2c69f9-f42e-45e2-ab0e-8506aa859f85@yandex.ru> <8335ven7tu.fsf@gnu.org> <6654ddbe-0f1b-f36e-26f2-f4ee178b12ac@yandex.ru> <83sg3elkdz.fsf@gnu.org> <283b4718-88eb-b63a-ce0b-316e4def4ff3@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22332"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: emacs-devel@gnu.org To: Stefan Kangas , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 30 22:02:57 2021 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 1lcZLl-0005jw-G8 for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Apr 2021 22:02:57 +0200 Original-Received: from localhost ([::1]:40260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcZLk-0001Pq-If for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Apr 2021 16:02:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcZLA-0000zV-Eo for emacs-devel@gnu.org; Fri, 30 Apr 2021 16:02:20 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:44995) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcZL6-00082Y-NE; Fri, 30 Apr 2021 16:02:20 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id h15so19623580wre.11; Fri, 30 Apr 2021 13:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Sczo1DmgKH/gcbIAUnLnuf5Joo6cZU5/ykiUBARMKrY=; b=nRx1eF3G7CPKVTpsZj2yCAVYj3YD9dmQxJr3ZLQqQoFP9PPr5RqGwR49Bg4WWve1sf Fd6xAC1IIHXB5Int5moSv7eVO/LzFlk0JhAPpg9uEaT5lY/D0y8vRX7M0+TuW/+VFlTE Gz+DtJwtMWMs41yenE5QLk8SM5bV1NpmwHL4KIVReWXv667zlESVS+SjVAzriG4XRFYK Wl6WxkD5kI8jx84wppLI2PysF3ONDx1zaKSJ7R7XQQJ3zRQAH8pTUXehQ91NkfMN2G9o N/G6cPuoKbvo3s5pfOLtkCiAHxxRDnWyVyrz5aFbiFQmYB8AttyOJY6akAw/gzs1dDxc 5vxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Sczo1DmgKH/gcbIAUnLnuf5Joo6cZU5/ykiUBARMKrY=; b=aHmg4mirIUCy02HasOeji+Ec85CxlnqkLvODtCJOs7HQmVZ84w8sdrT3c5h9CkYovq jgx7YSCpUxOg5Ud/kJgI0Pn6uE4lMMjXBnrhFVi0YVjWzFqj63PeoweOqhiRlQc1hHHf NHQxkKFylXlCqAS1Ht8cX9HW1BAF89bSyhhdq1t0DO5+iiNQizEekEdZ9qZ25iVilSQO 1tVG8zl8enIGOjoIxHzJU6UI/K9iso6QYFfcfiu+rcrgXKLgBhylfsNSZ4BkHwPqrJTm mevX04HXnGA6OMV8jO+wdkp+aZfYx4PInan6JSepRCj5n+Gg4+bNDVUKAZRzK8999cAu hyAg== X-Gm-Message-State: AOAM530cDuAsPgunPI/D2UV4hTl2QzPmD5Gp+8xOloGXcKJ8uXzVnb2O gb4wrafm4GeRT/b3EtbZQGgy/3Bf13A= X-Google-Smtp-Source: ABdhPJxnaFwO5xlPUkAsTdoe/KnQ4Wws3uyU0d0GioIhSaWXpoCOagqXkrHLiN3UBpU1QACkNnUsXA== X-Received: by 2002:a5d:5488:: with SMTP id h8mr9029621wrv.81.1619812933585; Fri, 30 Apr 2021 13:02:13 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id o62sm19995135wmo.3.2021.04.30.13.02.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Apr 2021 13:02:12 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=raaahh@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:268692 Archived-At: On 30.04.2021 20:39, Stefan Kangas wrote: >> I really like using SPC/S-SPC for scrolling. >> >> It also works in other programs (even though Shift-Space rarely shows up >> in any menus or hints), so it should be helpful to support as well. > > I agree it should be added, and as I pointed out in a different reply > that is also more consistent with the binding that already exists in > `special-mode-map'. > > However, the `make-help-screen' macro uses (read-key-sequence nil) to > get the key, but when I press S-SPC, that function only returns " ". Try (read-key-sequence nil), S-SPC in some special mode buffer like Xref, it will return [33554446]. So I think you just need to define that binding in the local map. The below works for me (only in graphical Emacs, though). Not sure what to do with the magic number. diff --git a/lisp/help-macro.el b/lisp/help-macro.el index 7fe1fb6c3d..8216ddfeb5 100644 --- a/lisp/help-macro.el +++ b/lisp/help-macro.el @@ -112,6 +112,7 @@ make-help-screen (let ((minor-mode-map-alist nil)) (setcdr local-map ,helped-map) (define-key local-map [t] 'undefined) + (define-key local-map (kbd "S-SPC") 'undefined) ;; Make the scroll bar keep working normally. (define-key local-map [vertical-scroll-bar] (lookup-key global-map [vertical-scroll-bar])) @@ -143,6 +144,7 @@ make-help-screen (goto-char (point-min)) (while (or (memq char (append help-event-list (cons help-char '( ?? ?\C-v ?\s ?\177 deletechar backspace vertical-scroll-bar ?\M-v + 33554464 next prior up down)))) (eq (car-safe char) 'switch-frame) (equal key "\M-v")) @@ -152,7 +154,7 @@ make-help-screen (handle-switch-frame char)) ((memq char '(?\C-v ?\s next)) (scroll-up)) - ((or (memq char '(?\177 ?\M-v deletechar backspace prior)) + ((or (memq char '(?\177 ?\M-v deletechar backspace prior 33554464)) (equal key "\M-v")) (scroll-down)) ((memq char '(down))