From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16333: 24.3.50; Info manuals: link defined terms to their glossary entries Date: Sat, 31 Oct 2020 09:03:52 +0200 Message-ID: <83wnz698rr.fsf@gnu.org> References: <> <<87pnfk1ozm.fsf@marxist.se>> <<44a24b90-adf8-41f1-8d06-b35f55f1850c@default>> <> <<83tuudaz1y.fsf@gnu.org>> <1f8767bb-1912-42ea-abba-dd666bea48b0@default> <3b9fabae-fbe4-4c4a-b11b-8aad73016ace@default> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7064"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 16333@debbugs.gnu.org, stefan@marxist.se To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 31 08:05:13 2020 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 1kYkwp-0001hY-6Y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 31 Oct 2020 08:05:11 +0100 Original-Received: from localhost ([::1]:38130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYkwn-0005ag-K9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 31 Oct 2020 03:05:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYkwg-0005aa-7H for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2020 03:05:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48894) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYkwf-0001AF-Te for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2020 03:05:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYkwf-0001az-Nf for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2020 03:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2020 07:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16333 X-GNU-PR-Package: emacs Original-Received: via spool by 16333-submit@debbugs.gnu.org id=B16333.16041278576072 (code B ref 16333); Sat, 31 Oct 2020 07:05:01 +0000 Original-Received: (at 16333) by debbugs.gnu.org; 31 Oct 2020 07:04:17 +0000 Original-Received: from localhost ([127.0.0.1]:60440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYkvx-0001Zs-17 for submit@debbugs.gnu.org; Sat, 31 Oct 2020 03:04:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYkvu-0001Ze-Qj for 16333@debbugs.gnu.org; Sat, 31 Oct 2020 03:04:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34725) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYkvo-0000xh-Q5; Sat, 31 Oct 2020 03:04:08 -0400 Original-Received: from [176.228.60.248] (port=2596 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kYkvn-0007Yv-W2; Sat, 31 Oct 2020 03:04:08 -0400 In-Reply-To: <3b9fabae-fbe4-4c4a-b11b-8aad73016ace@default> (message from Drew Adams on Fri, 30 Oct 2020 14:14:54 -0700 (PDT)) 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" Xref: news.gmane.io gmane.emacs.bugs:192238 Archived-At: > Date: Fri, 30 Oct 2020 14:14:54 -0700 (PDT) > From: Drew Adams > Cc: stefan@marxist.se, 16333@debbugs.gnu.org > > > Here's a suggestion, to make this less rigid/fragile: > > Substitute for "mouse-2" everywhere in the help text, > > as follows. > > > > (defun mouse-fixup-help-message (msg) > > "Fix help message MSG for `mouse-1-click-follows-link'." > > (let (mp pos) > > (when (and mouse-1-click-follows-link > > (stringp msg) > > (string-match-p "mouse-2" msg) > > (setq mp (mouse-pixel-position)) > > (consp (setq pos (cdr mp))) > > (car pos) (>= (car pos) 0) > > (cdr pos) (>= (cdr pos) 0) > > (setq pos (posn-at-x-y (car pos) (cdr pos) (car mp))) > > (windowp (posn-window pos))) > > (with-current-buffer (window-buffer (posn-window pos)) > > (when (mouse-on-link-p pos) > > (setq msg (replace-regexp-in-string > > "mouse-2" > > (concat > > (cond ((eq mouse-1-click-follows-link 'double) > > "double-") > > ((and (integerp mouse-1-click-follows-link) > > (< mouse-1-click-follows-link 0)) > > "Long ") > > (t "")) > > "mouse-1") > > msg)))))) > > msg) > > ___ > > > > Or if you think it's more appropriate for some reason, > > then substitute only the first occurrence of "mouse-2". > > > > Of if you think we should let users specify exactly > > which occurrences of "mouse-2" to substitute, then > > define a formatting escape for that (e.g. "%m"), so > > only "mouse-2" occurrences preceded by that escape get > > substituted. E.g., "xxx%mmouse-2" would substitute > > the "mouse-2", but "xxxmouse-2" would not. > > > Actually, the following is much better. It lets code > use different patterns in different contexts, by binding > the variable. > > Should I submit this as a separate bug report, or can it > be considered in the context of this one? Please be sure to grep all our Lisp sources and make sure this change won't replace stuff in places we don't want. Please don't push this before this check is complete, thanks.