branch: elpa/sly commit 3278819ddf71d16444e6cea293dd41ca83ea9bae Author: João Távora <joaotav...@gmail.com> Commit: João Távora <joaotav...@gmail.com>
Delete sly-timer-call, remnant from pre-lexical binding times It just complicates debugging, as seen in #410. * sly.el (sly-timer-call): Delete. (sly-attempt-connection): Call from timer lambda. --- sly.el | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/sly.el b/sly.el index 04f4716..37567c3 100644 --- a/sly.el +++ b/sly.el @@ -1434,24 +1434,11 @@ Fall back to `sly-init-using-slynk-loader' if ASDF fails." (setq sly-connect-retry-timer (run-with-timer sly-connection-poll-interval nil - #'sly-timer-call #'sly-attempt-connection - `((sly-ignore-protocol-mismatches . ,sly-ignore-protocol-mismatches)) - process (and retries (1- retries)) - (1+ attempt))))))) - -(defun sly-timer-call (fun env &rest args) - "Call function FUN with ARGS, reporting all errors. - -FUN is called with the overriding dynamic environment in ENV, an -alist of bindings. - -The default condition handler for timer functions (see -`timer-event-handler') ignores errors." - (condition-case data - (cl-progv (mapcar #'car env) (mapcar #'cdr env) - (apply fun args)) - ((debug error) - (debug nil (list "Error in timer" fun args data))))) + (lambda () + (let ((sly-ignore-protocol-mismatches + sly-ignore-protocol-mismatches)) + (sly-attempt-connection process (and retries (1- retries)) + (1+ attempt)))))))))) (defun sly-cancel-connect-retry-timer () (when sly-connect-retry-timer