anchor.diff:      (loop for d = (calispel:? download-manager:*notifications*)
             while d
             when (download-manager:finished-p d)
  -            do (hooks:run-hook (after-download-hook *browser*))
  +          do (hooks:run-hook (after-download-hook *browser*))
             do (sleep 0.1) ; avoid excessive polling
                (setf (bytes-downloaded download-render)
                      (download-manager:bytes-fetched download-object))
  
positive.code: 
  (hooks:define-hook-type prompt-buffer (function (prompt-buffer)))
  (hooks:define-hook-type download (function (download-manager:download)))
  
  (hooks:define-hook-type resource (function (request-data) (or request-data null)))
  (export-always '(make-hook-resource make-handler-resource))
  
  (define-class proxy ()
    ((url (quri:uri "socks5://127.0.0.1:9050")
          :documentation "The address of the proxy server.
  It's made of three components: protocol, host and port.
  Example: \"http://192.168.1.254:8080\".")
     (allowlist '("localhost" "localhost:8080")
                :type list-of-strings
                :documentation "A list of URIs not to forward to the proxy.")
     (proxied-downloads-p t
                          :documentation "Non-nil if downloads should also use the proxy."))
    (:export-class-name-p t)
    (:export-accessor-names-p t)
    (:accessor-name-transformer (class*:make-name-transformer name))
  
negative.code:    browser
     (lambda ()
       (run-thread "finalization"
                   ;; Restart on init error, in case `*init-file-path*' broke the state.
                   ;; We only `handler-case' when there is an init file, this way we avoid
                   ;; looping indefinitely.
                   (if (or (getf *options* :no-init)
                           (not (uiop:file-exists-p (expand-path *init-file-path*))))
                       (startup browser urls)
                       (handler-case (startup browser urls)
                         (error (c)
                           (log:error "Startup failed (probably due to a mistake in ~s):~&~a"
                                      (expand-path *init-file-path*) c)
                           (if *run-from-repl-p*
                               (progn
                                 (quit)
                                 (reset-all-user-classes)
                                 (apply #'start (append *options* (list :urls urls :no-init t))))
                               (restart-with-message c))))))))
    ;; Set `init-time' at the end of finalize to take the complete startup time
    ;; into account.
    (setf (slot-value *browser* 'init-time)
  