all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Narendra Joshi <narendraj9@gmail.com>
To: emacs-devel@gnu.org
Subject: Patch for a simple nil check in `calc-graph-add-curve'
Date: Sat, 21 Mar 2020 20:48:52 +0100	[thread overview]
Message-ID: <CAHCj4z6=OAPUSiEvjEr4FbEbcq+UuvSqjcntKw9thKeZEHsSYg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 91 bytes --]

Hi,

Can someone please add this simple `nil' check in the attached patch?

Best,
Narendra

[-- Attachment #2: 0001-Add-nil-check-for-pstyle-and-lstyle-in-calc-graph-ad.patch --]
[-- Type: text/x-patch, Size: 1134 bytes --]

From e6132b54351ecb487001cc4592f313efcb3d8f15 Mon Sep 17 00:00:00 2001
From: Narendra Joshi <narendraj9@gmail.com>
Date: Sat, 21 Mar 2020 20:45:38 +0100
Subject: [PATCH] Add nil check for pstyle and lstyle in calc-graph-add-curve.

---
 lisp/calc/calc-graph.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el
index 4cdfdbd4b9..4feddd9e4d 100644
--- a/lisp/calc/calc-graph.el
+++ b/lisp/calc/calc-graph.el
@@ -211,9 +211,9 @@ calc-graph-add-curve
       (setq pstyle (and (eq (car-safe pstyle) 'vec) (nth (1+ num) pstyle)))
       (setq lstyle (and (eq (car-safe lstyle) 'vec) (nth (1+ num) lstyle))))
     (calc-graph-set-styles
-     (or (and (Math-num-integerp lstyle) (math-trunc lstyle))
+     (or (and lstyle (Math-num-integerp lstyle) (math-trunc lstyle))
          0)
-     (or (and (Math-num-integerp pstyle) (math-trunc pstyle))
+     (or (and pstyle (Math-num-integerp pstyle) (math-trunc pstyle))
          (if (eq (car-safe (calc-var-value (nth 2 ydata))) 'vec)
              0 -1))
      (math-contains-sdev-p (eval (nth 2 ydata))))))
-- 
2.20.1


             reply	other threads:[~2020-03-21 19:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-21 19:48 Narendra Joshi [this message]
2020-03-21 20:27 ` Patch for a simple nil check in `calc-graph-add-curve' Eli Zaretskii
2020-03-21 21:56   ` Narendra Joshi
2020-04-08 14:47     ` Bruno Félix Rezende Ribeiro
2020-04-08 15:10       ` Eli Zaretskii
2020-04-08 15:27         ` Narendra Joshi
2020-04-10 14:07         ` Bruno Félix Rezende Ribeiro
2020-04-10 14:31           ` Robert Pluim
2020-04-10 15:33           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHCj4z6=OAPUSiEvjEr4FbEbcq+UuvSqjcntKw9thKeZEHsSYg@mail.gmail.com' \
    --to=narendraj9@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.