anchor.diff:      ;; TODO: WebKitGTK sometimes (when?) triggers "load-failed" when loading a
       ;; page from the webkit-history cache.  Upstream bug?  Anyways, we should
       ;; ignore these.
  -    (if *loading-webkit-history-p*
  -        (setf *loading-webkit-history-p* nil)
  +    (if (loading-webkit-history-p buffer)
  +        (setf (loading-webkit-history-p buffer) nil)
           (unless (member (slot-value buffer 'load-status) '(:finished :failed))
             (echo "Failed to load URL ~a in buffer ~a." failing-url (id buffer))
             (setf (slot-value buffer 'load-status) :failed)
  
positive.code:             (webkit:webkit-policy-decision-ignore response-policy-decision)
              nil)))))
  
  (defvar *loading-webkit-history-p* nil
    "Internal hack, do not use!")
  
  (define-ffi-method on-signal-load-changed ((buffer gtk-buffer) load-event)
    ;; `url' can be nil if buffer didn't have any URL associated
    ;; to the web view, e.g. the start page, or if the load failed.
  
negative.code:           ((eq load-event :webkit-load-committed)
             (on-signal-load-committed buffer url))
            ((eq load-event :webkit-load-finished)
             (setf (loading-webkit-history-p buffer) nil)
             (unless (eq (slot-value buffer 'load-status) :failed)
               (setf (slot-value buffer 'load-status) :finished))
             (on-signal-load-finished buffer url)
  