From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: [drew.adams@oracle.com: links in Help buffer aren't alwayscorrect] Date: Tue, 13 Dec 2005 11:52:33 -0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1134503722 14420 80.91.229.2 (13 Dec 2005 19:55:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2005 19:55:22 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 13 20:55:13 2005 Return-path: Original-Received: from [199.232.75.2] (helo=lists.gnu.org) by ciao.gmane.org with esmtp (Exim 4.43) id 1EmGDX-0003Hh-1v for ged-emacs-devel@m.gmane.org; Tue, 13 Dec 2005 20:53:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmGE5-0005wf-0j for ged-emacs-devel@m.gmane.org; Tue, 13 Dec 2005 14:54:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EmGD8-0005vc-70 for emacs-devel@gnu.org; Tue, 13 Dec 2005 14:53:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EmGD4-0005pT-1y for emacs-devel@gnu.org; Tue, 13 Dec 2005 14:53:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmGD3-0005p3-44 for emacs-devel@gnu.org; Tue, 13 Dec 2005 14:53:13 -0500 Original-Received: from [148.87.122.30] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EmGEz-0000KA-KV for emacs-devel@gnu.org; Tue, 13 Dec 2005 14:55:13 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by rgminet01.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id jBDJqYnd002586 for ; Tue, 13 Dec 2005 12:52:35 -0700 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jBDJqYo0031058 for ; Tue, 13 Dec 2005 12:52:34 -0700 Original-Received: from dradamslap (dhcp-amer-rmdc-csvpn-gw5-141-144-106-118.vpn.oracle.com [141.144.106.118]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id jBDJqXl6031044 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 13 Dec 2005 12:52:34 -0700 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-Broken-Reverse-DNS: no host name found for IP address 199.232.75.2 Xref: news.gmane.org gmane.emacs.devel:47630 Archived-At: > The text "buffer-list" in the last sentence is linked to the > help for the `buffer-list' function, not the `buffer-list' frame > parameter. Either there should be no link here (if there is no > way to show help on the parameter) or > the link should point to help on the frame parameter. Since there is no describe-frame-parameter command, and the phrase "frame paramter" follows the quoted symbol (unlike the phrases listed in help-xref-symbol-regexp, which precede quoted symbols), we can avoid hyperlinking such phrases by changing help-make-xrefs in help-mode.el from: ;; Quoted symbols (save-excursion (while (re-search-forward help-xref-symbol-regexp nil t) (let* ((data (match-string 8)) (sym (intern-soft data))) (if sym to: ;; Quoted symbols (save-excursion (while (re-search-forward help-xref-symbol-regexp nil t) (let* ((data (match-string 8)) (sym (intern-soft data))) (if (and sym (save-match-data (not (looking-at "[ \t\n]+frame parameter")))) I agree with the intention, but have doubts about the implementation - it seems fragile, depending as it does on the exact text in the doc string. If someone writes "frame parameter `buffer-list'" instead of "the `buffer-list' frame parameter" then it won't work correctly. Likewise, if someone writes a French doc string for a function or var that refers to a frame parameter. But I guess the same could be said for the use of `help-xref-symbol-regexp', generally. Given that we do use `help-xref-symbol-regexp' in a way that depends on the exact doc-string text, wouldn't it be better to add the doc-string convention to always precede the specific name by the type, so, for instance, this doc string would say "frame parameter `buffer-list'"? Then, "frame parameter could be added to `help-xref-symbol-regexp'. There may not be a `describe-frame-parameter' function, but the `help-make-xrefs' code could use a preceding "frame parameter" to link to the Info section describing the `buffer-list' parameter. Or, at the very least, it could test for preceding "frame parameter" in order to do nothing (add no link) if it is present.