[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57349: 29.0.50; pixel-scroll-precision-mode. error integer-or-marker
From: |
Eli Zaretskii |
Subject: |
bug#57349: 29.0.50; pixel-scroll-precision-mode. error integer-or-marker-p nil |
Date: |
Tue, 23 Aug 2022 15:36:54 +0300 |
> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: 57349@debbugs.gnu.org
> Date: Tue, 23 Aug 2022 14:15:59 +0200
>
> >> or sometimes errors 'Wrong type argument: integer-or-marker-p, nil'.
> >
> > This shouldn't happen, indeed.
> >
> >> Not sure what to make of this. Looks like posn-at-x-y returns a posn
> >> with a nil point? Or maybe posn-point returns nil?
> >
> > Either this should be fixed, or the code should be prepared for nil in
> > this case.
>
> Yup.
>
> 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 don't think it's reasonable to expect that posn-WHATEVER functions
will always return a valid buffer position. There are parts on the
window/frame decorations where no buffer position makes sense. We
sometimes forcibly put some close position there, or get it as a side
effect of the implementation, but I don't think we should rely on it.