unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 75b3f4d0ac 2/2: Don't overwrite cus-load dependencies
       [not found] ` <20220923160721.00AFFC12D95@vcs2.savannah.gnu.org>
@ 2022-09-23 18:09   ` Stefan Monnier
  2022-09-24 10:16     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2022-09-23 18:09 UTC (permalink / raw)
  To: emacs-devel; +Cc: Lars Ingebrigtsen

>     * 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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: master 75b3f4d0ac 2/2: Don't overwrite cus-load dependencies
  2022-09-23 18:09   ` master 75b3f4d0ac 2/2: Don't overwrite cus-load dependencies Stefan Monnier
@ 2022-09-24 10:16     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-24 10:16 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> 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?

Nope.

> Also, should we filter out duplicates?

Probably.  Now done.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-24 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <166394924016.22898.17012781912047452236@vcs2.savannah.gnu.org>
     [not found] ` <20220923160721.00AFFC12D95@vcs2.savannah.gnu.org>
2022-09-23 18:09   ` master 75b3f4d0ac 2/2: Don't overwrite cus-load dependencies Stefan Monnier
2022-09-24 10:16     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).