[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables a
From: |
Ruijie Yu |
Subject: |
bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package |
Date: |
Mon, 17 Apr 2023 14:53:50 +0800 |
User-agent: |
mu4e 1.9.22; emacs 30.0.50 |
lin Sun via "Bug reports for GNU Emacs, the Swiss army knife of text editors"
<bug-gnu-emacs@gnu.org> writes:
> Hi Philip,
>
> I had researched these three calls with the "require 'info", and
> updated the patch for better performance.
> The 1 th and 3rd can be rewritten with the new form, but the 2nd one
> is necessary, and should not be changed.
> @@ -4427,7 +4426,7 @@ package-quickstart-refresh
> "(Re)Generate the `package-quickstart-file'."
> (interactive)
> (package-initialize 'no-activate)
> - (require 'info)
> + (require 'info) ; insure Info-directory-list avaliable for package-activate
"insure" -> "ensure"?
> (let ((package--quickstart-pkgs ())
> ;; Pretend we haven't activated anything yet!
> (package-activated-list ())
> @@ -4472,10 +4471,10 @@ package-quickstart-refresh
> (current-buffer))
> (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)))
> + (pp `(with-eval-after-load 'info
> + (info-initialize)
> + (setq Info-directory-list
> + (append ',info-dirs Info-directory-list)))
> (current-buffer))))
I did some testing, and noticed that `with-eval-after-load' returns nil
to its caller when the feature is not loaded. That is, when `info' is
not already loaded, you are effectively calling (pp nil). This is not
feature-equivalent to the original code, so this might require the
`require' form.
--
Best,
RY
- bug#62609: 29.0.60; [PATCH] src/comp.c: New variable `comp-el-to-eln-strip-prefix` for `comp-el-to-eln-rel-filename`, (continued)
bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, lin Sun, 2023/04/11
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, Philip Kaludercic, 2023/04/14
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, lin Sun, 2023/04/14
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, Eli Zaretskii, 2023/04/15
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, Philip Kaludercic, 2023/04/15
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, Eli Zaretskii, 2023/04/15
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, lin Sun, 2023/04/17
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package,
Ruijie Yu <=
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, Ruijie Yu, 2023/04/17
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, Philip Kaludercic, 2023/04/17
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, lin Sun, 2023/04/17
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, Philip Kaludercic, 2023/04/17
- bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, Eli Zaretskii, 2023/04/17
bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, Stefan Monnier, 2023/04/17
bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, lin Sun, 2023/04/19
bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, Eli Zaretskii, 2023/04/20
bug#62767: 29.0.90; [PATCH] *lisp/emacs-lisp/package.el: set variables after info package, lin Sun, 2023/04/20