Subject: Re: bug#57349: 29.0.50; pixel-scroll-precision-mode. error integer-or-marker-p nil

From: Gerd Möllmann <[email-masked]>
Date: Tue, 23 Aug 2022 14:36:52 +0200

Gerd Möllmann <[email-masked]> writes:

> I could add a check in the function that does the (goto-char nil), but I
> don't know if that would be only fixing a symptom of something else.

I just had an idea.  What if this deoends on the mini-window.  One of
the functions signalling looks like this:

(defun pixel-scroll-precision-scroll-up-page (delta)
  "Scroll the current window up by DELTA pixels.
Note that this function doesn't work if DELTA is larger than
the height of the current window."
  (let* ((edges (window-edges nil t nil t))
         (max-y (- (nth 3 edges)
                   (nth 1 edges)))
         (usable-height max-y)
         (posn (posn-at-x-y 0 (+ (window-tab-line-height)
                                 (window-header-line-height)
                                 (- max-y delta))))
         (point (posn-point posn))
         (up-point (save-excursion
                     (goto-char point)
                     ^^^ here point is nil
                     (vertical-motion (- (1+ scroll-margin)))
                     (point))))

The documentation of window-edges says it is using the selected window
when its window argument is nil.  The selected window can't be the
mini-window unless the minibuffer is active.

And indeed, when I enter the minibuffer (M-:), and mouse-wheel as
descibed before, no error occurs.

Does that sound plausible?