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.devel Subject: master 30d4011b8a: Use substitute-command-keys in Info-index error Date: Sat, 26 Nov 2022 16:10:02 +0200 Message-ID: <83v8n1st6t.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24236"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 26 15:10:11 2022 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 1oyvsg-00066o-Ph for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Nov 2022 15:10:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyvsD-0005Re-Sv; Sat, 26 Nov 2022 09:09:41 -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 1oyvsB-0005RA-Ce for emacs-devel@gnu.org; Sat, 26 Nov 2022 09:09:39 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyvsA-0006X7-Oi; Sat, 26 Nov 2022 09:09:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Subject:To:From:Date:mime-version:in-reply-to: references; bh=kLvWiUX594AHXXBdwfMGnn52Kk8pKYRz5d6N5MI2+7M=; b=MFpnzeUSQnroef LA6rCvcu3gKotDHiEcN1/Tc/Vt5ECsq5BYhaSghKo4Yso1vhg1MQtLOjZKUwQT7sjgYtXwdt3MqIu /T4IoSlGGhaJDbjYnw7YDQjcSxVTsg+b6mZr7cNN0d8SK9uiWcAQHX9FPaoam8YGL+PPXNDGf8IR9 HBHBPIq1V0oyk5T4N1H8Tie/DCHffI/YvlgW0DWTfCig2BgQUb/58/8i+GE4GNi+nCGrOLec6wNE2 61lvx0BYDl7xKtBp/dJkyMfTuwStv2SYHtNTHjBmDqYo7lxKZbOJbizmF/bi+dDTZ671t2r/lwMNf UhmYLnMH/r8mbxgmd0EQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyvsA-0007YL-01; Sat, 26 Nov 2022 09:09:38 -0500 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:300568 Archived-At: > From: emacs-diffs-request@gnu.org > Date: Sat, 26 Nov 2022 03:56:27 -0500 > > diff --git a/lisp/info.el b/lisp/info.el > index 8860a664bd..7d44a1cec1 100644 > --- a/lisp/info.el > +++ b/lisp/info.el > @@ -3329,6 +3329,12 @@ If FILE is nil, check the current Info file." > (or node (error "No index")) > (Info-goto-node node))) > > +(defun info--ensure-not-in-directory-node () > + (if (equal Info-current-file "dir") > + (error (substitute-command-keys > + (concat "The Info directory node has no index; " > + "type \\[Info-menu] to select a manual"))))) The new code doesn't handle the case where "DIR" is in upper-case, nor if Info-current-file is something like "/usr/share/info/dir" (which can happen if you say "C-u C-h i /usr/share/info/dir RET"). (Yes, the original code didn't handle these cases either.)