From 20df6d278ec25273de358ef33be093a7177c1971 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Thu, 1 Feb 2024 19:37:12 +0100 Subject: [PATCH] ; Read multiple functions in 'edebug-remove-instrumentation' * lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Use 'completing-read-multiple'. --- lisp/emacs-lisp/edebug.el | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index a8a51502503..7c6d23d5554 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -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 -- 2.39.5