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#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package Date: Wed, 24 May 2023 14:32:41 +0300 Message-ID: <83edn6new6.fsf@gnu.org> References: <1181651021.466162.1581309285621.ref@mail.yahoo.com> <1181651021.466162.1581309285621@mail.yahoo.com> <87sfd2ns6d.fsf@posteo.net> <833551ecb2.fsf@gnu.org> <87ttxh4e9i.fsf@posteo.net> <87bkjmiqtz.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12505"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62767@debbugs.gnu.org, philipk@posteo.net, monnier@iro.umontreal.ca To: lin Sun Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 24 13:33:18 2023 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 1q1mk2-00033E-OY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 May 2023 13:33:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1mjo-0005ks-VA; Wed, 24 May 2023 07:33:04 -0400 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 1q1mjm-0005kK-SY for bug-gnu-emacs@gnu.org; Wed, 24 May 2023 07:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1mjm-0002S9-Ir for bug-gnu-emacs@gnu.org; Wed, 24 May 2023 07:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q1mjm-0001YV-0r for bug-gnu-emacs@gnu.org; Wed, 24 May 2023 07:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 May 2023 11:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62767 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62767-submit@debbugs.gnu.org id=B62767.16849279515939 (code B ref 62767); Wed, 24 May 2023 11:33:01 +0000 Original-Received: (at 62767) by debbugs.gnu.org; 24 May 2023 11:32:31 +0000 Original-Received: from localhost ([127.0.0.1]:42114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1mjE-0001Xf-01 for submit@debbugs.gnu.org; Wed, 24 May 2023 07:32:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1mj8-0001XQ-DU for 62767@debbugs.gnu.org; Wed, 24 May 2023 07:32:26 -0400 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 1q1mj1-00029w-Vf; Wed, 24 May 2023 07:32:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=S5UHdq9lZz2QcCnoeuk06FVT8z1jqT2JhTDNeAcW7ls=; b=ogUXhlzZo6nt RBNVtq0tDkEvOV3tTbyptofCUP4/LhVsYvMr6Nm9OqmFu0koJ0oPC4I4so/ONv+eHF4Dlfkdqby5Q SLsrJJGUlYsiIx01MjtGP+DZrh1TtGmDT1ZYvHe1g/AEfm9hAvH9NnNk24pLVgEjyFYkKRc/Ox1rg vAQzu2XkmajoIThWBGbdgY0/uG1gl6ozXG36sj1grr79oAfxaHaR1XrcAoFMzk+jlTlsIhTv/ec/3 iwxh82oWClOL0lmE33mW9l4A0gKXbixOh2lxhXmpiJxfnorywVHg+U+LiZaexpbgqOOBC00TKr8pK h5wVQRWRBE0uQ7rFW8ykCQ==; 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 1q1mj1-0003HB-8T; Wed, 24 May 2023 07:32:15 -0400 In-Reply-To: (message from lin Sun on Wed, 24 May 2023 02:53:08 +0000) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262288 Archived-At: > From: lin Sun > Date: Wed, 24 May 2023 02:53:08 +0000 > > > I am experimenting with a different approach to avoid the loading of > > the entire info.el file using package.el. > > Instead, I am adding the directories to the `Info-directory-list', > > which will be utilized by other functions responsible for loading the > > specific info files. > > Please help review the patch I attached. Thanks. Could you please describe how this makes sure Info-directory-list will be set to a correct value, in the various scenarios that are relevant? In particular, Info-directory-list is not the right variable to tweak here, as it is computed by info.el. I think we need a separate variable. > - (let ((info-dirs (butlast Info-directory-list))) > - (when info-dirs > - (pp `(progn (require 'info) > - (info-initialize) > - (setq Info-directory-list > - (append ',info-dirs Info-directory-list))) > - (current-buffer)))) > + (when-let ((info-dirs (butlast Info-directory-list))) > + (pp `(defvar Info-directory-list '()) (current-buffer)) > + (pp `(setq Info-directory-list > + (delete-dups > + (append ',info-dirs Info-directory-list))) > + (current-buffer))) Using 'append' here could cause duplicate directories in Info-directory-list. > +(defvar Info--initialized nil > + "Non-nil if `info-initialize' has been run.") There's no need to capitalize the first letter of the name of an internal variable. We capitalize 'I' in "Info" so that it would be easier to type info.el commands with completion (other commands that begin with 'i' use lower-case 'i'). This is not a factor for internal variables.