GNU bug report logs -
#62767
29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package
Previous Next
Full log
View this message in rfc822 format
> From: lin Sun <sunlin7 <at> yahoo.com>
> 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.
This bug report was last modified 1 year and 235 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.