]> git.eshelyaron.com Git - emacs.git/commitdiff
; Read multiple functions in 'edebug-remove-instrumentation'
authorEshel Yaron <me@eshelyaron.com>
Thu, 1 Feb 2024 18:37:12 +0000 (19:37 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 1 Feb 2024 18:37:12 +0000 (19:37 +0100)
* lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Use
'completing-read-multiple'.

lisp/emacs-lisp/edebug.el

index a8a515025034b65d127fb0a20d2a577e46087218..7c6d23d5554cf9747f49397bb325b353e2dee798 100644 (file)
@@ -4627,23 +4627,15 @@ instrumentation for, defaulting to all functions."
       (mapatoms
        (lambda (symbol)
          (when (and (get symbol 'edebug)
-                    (or (functionp symbol)
-                        (macrop symbol))
-                    (edebug--unwrap*-symbol-function
-                     symbol))
+                    (or (functionp symbol) (macrop symbol))
+                    (edebug--unwrap*-symbol-function symbol))
            (push symbol functions)))
        obarray)
-      (unless functions
-        (user-error "Found no functions to remove instrumentation from"))
-      (let ((name
-             (completing-read
-              (format-prompt "Remove instrumentation from"
-                             "all functions")
-              functions)))
-        (if (and name
-                 (not (equal name "")))
-            (list (intern name))
-          functions)))))
+      (unless functions (user-error "No instrumented functions"))
+      (let ((names (completing-read-multiple
+                    (format-prompt "Remove instrumentation from" "all")
+                    functions nil t)))
+        (or (mapcar #'intern names) functions)))))
   ;; Remove instrumentation.
   (dolist (symbol functions)
     (when-let ((unwrapped