[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 75b3f4d0ac 2/2: Don't overwrite cus-load dependencies
From: |
Stefan Monnier |
Subject: |
Re: master 75b3f4d0ac 2/2: Don't overwrite cus-load dependencies |
Date: |
Fri, 23 Sep 2022 14:09:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> * lisp/cus-dep.el (custom-make-dependencies): Don't overwrite
> elements added by packages (bug#58015).
> ---
> lisp/cus-dep.el | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el
> index bb07a0694a..163a2da1f1 100644
> --- a/lisp/cus-dep.el
> +++ b/lisp/cus-dep.el
> @@ -175,7 +175,10 @@ Usage: emacs -batch -l ./cus-dep.el -f
> custom-make-dependencies DIRS"
> (prin1 (sort found #'string<))))
> alist))))))
> (dolist (e (sort alist (lambda (e1 e2) (string< (car e1) (car e2)))))
> - (insert "(put '" (car e) " 'custom-loads '" (cdr e) ")\n")))
> + ;; Don't overwrite elements added by packages.
> + (insert "(put '" (car e)
> + " 'custom-loads (append '" (cdr e)
> + " (get '" (car e) " 'custom-loads)))\n")))
> (insert "\
Assuming that bug was rare, the `get` above will usually return nil, so
the `append` would be more efficient if we swapped its arguments.
Does the resulting order matter?
Also, should we filter out duplicates?
Stefan
- Re: master 75b3f4d0ac 2/2: Don't overwrite cus-load dependencies,
Stefan Monnier <=