emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/pkg 58c2e4d7093 1/5: Re-implement find-all-symbols


From: Gerd Moellmann
Subject: scratch/pkg 58c2e4d7093 1/5: Re-implement find-all-symbols
Date: Tue, 22 Aug 2023 10:29:50 -0400 (EDT)

branch: scratch/pkg
commit 58c2e4d7093f71c6a9b2b45eb0f777593f3b23aa
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>

    Re-implement find-all-symbols
---
 lisp/emacs-lisp/pkg.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]