From: Gerd Möllmann Date: Sat, 12 Aug 2023 14:21:02 +0000 (+0200) Subject: Re-implement find-all-symbols X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=58c2e4d7093f71c6a9b2b45eb0f777593f3b23aa;p=emacs.git Re-implement find-all-symbols --- diff --git a/lisp/emacs-lisp/pkg.el b/lisp/emacs-lisp/pkg.el index 5083a056585..6f460482ba4 100644 --- a/lisp/emacs-lisp/pkg.el +++ b/lisp/emacs-lisp/pkg.el @@ -726,12 +726,12 @@ Value is t." (defun find-all-symbols (name) "Return a list of all symbols in the system having the specified name." (let ((name (pkg--stringify-name name "symbol name")) - (result ())) - (maphash #'(lambda (_package-name package) - (cl-multiple-value-bind (sym _status) (find-symbol name package) - (when sym - (cl-pushnew sym result)))) - *package-registry*) + (result ()) + (all-packages (cl-remove-duplicates (hash-table-values *package-registry*)))) + (dolist (package all-packages) + (cl-multiple-value-bind (sym _status) (find-symbol name package) + (when sym + (cl-pushnew sym result)))) result))