                            (remove-unrestorable-file-buffers tail)
                          tail))))))
 
+    (with-eval-after-load 'whitespace
+      (defun whitespace-display-window-advice (buffer)
+        (with-current-buffer buffer
+          (special-mode)
+          (goto-char (point-min)))
+        (switch-to-buffer buffer))
+      (advice-add 'whitespace-display-window :override 'whitespace-display-window-advice))
+
     (defun frameset--restore-frame-advice (old-func &rest args)
       (let ((window-state (cadr args)))
         (apply old-func

            (rg-mode      . search)
            (vterm-mode   . terminal)))

  (purpose-x-code1-setup)
  (purpose-x-popwin-setup)
  (purpose-x-kill-setup)

        (x-focus-frame (selected-frame)))
      (set-window-hscroll window 0))
    (advice-add 'edebug-pop-to-buffer :override 'edebug-pop-to-buffer-advice))

  (with-eval-after-load 'wid-browse
    (define-key widget-browse-mode-map [remap bury-buffer] 'quit-window))

  (with-eval-after-load 'frameset
    (defun remove-unrestorable-file-buffers (window-tree)
