emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for a simple nil check in `calc-graph-add-curve'


From: Narendra Joshi
Subject: Re: Patch for a simple nil check in `calc-graph-add-curve'
Date: Sat, 21 Mar 2020 22:56:36 +0100

A simple `calc-graph-fast' call with the following values on Emacs
Calc stack fails:

3:  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
2:  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
1:  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
<top of the stack>

It fails because `calc-graph-fast` eventually calls `math-trunc` on
the line and point style values which aren't set yet. Since they are
`nil` we should avoid calling `math-trunc` on them and take a default
value. The patch just adds a `nil` check for these variables `lstyles`
(LineStyles) and `pstyles` (PointStyles).

 - Narendra

On Sat, Mar 21, 2020 at 9:27 PM Eli Zaretskii <address@hidden> wrote:
>
> > From: Narendra Joshi <address@hidden>
> > Date: Sat, 21 Mar 2020 20:48:52 +0100
> >
> > Can someone please add this simple `nil' check in the attached patch?
>
> Thanks, but could you please provide the rationale?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]