branch: externals/vertico commit 9a7b1bf5ef888987af140c0af9747f3162176eca Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
vertico--protect: Simplify --- vertico.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vertico.el b/vertico.el index d70efcad44..f6565af47e 100644 --- a/vertico.el +++ b/vertico.el @@ -481,14 +481,14 @@ The value should lie between 0 and vertico-count/2." "Protect FUN such that errors are caught. If an error occurs, the FUN is retried with `debug-on-error' enabled and the stack trace is shown in the *Messages* buffer." - (let ((fun (lambda () - (condition-case nil - (progn (funcall fun) nil) - ((debug error) t))))) - (when (or debug-on-error (funcall fun)) - (let ((debug-on-error t) - (debugger #'vertico--debug)) - (funcall fun))))) + (when (or debug-on-error (condition-case nil + (progn (funcall fun) nil) + ((debug error) t))) + (let ((debug-on-error t) + (debugger #'vertico--debug)) + (condition-case nil + (funcall fun) + ((debug error) nil))))) (defun vertico--exhibit () "Exhibit completion UI."