[Top][All Lists]

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

[elpa] externals/realgud dc0e131 031/140: Guard against nil (realgud:get

From: Rocky Bernstein
Subject: [elpa] externals/realgud dc0e131 031/140: Guard against nil (realgud:get-command-name "eval")
Date: Sat, 25 May 2019 19:35:25 -0400 (EDT)

branch: externals/realgud
commit dc0e13169c207a752c6f4d19f0fc0c30fdbdf83f
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    Guard against nil (realgud:get-command-name "eval")
 realgud/common/track.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/realgud/common/track.el b/realgud/common/track.el
index eeeb3e9..4140974 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -189,7 +189,8 @@ message."
 (defun realgud:eval-command-p(text)
   "Checks the TEXT if the command that was ran was an eval command."
-  (string-prefix-p (realgud:get-command-name "eval") 
(realgud:get-output-command text)))
+  (let (cmd-name (realgud:get-command-name "eval"))
+       (and (stringp cmd-name) (string-prefix-p (realgud:get-command-name 
"eval") (realgud:get-output-command text)))))
 (defun realgud:truncate-eval-message(text)
   "Truncates the TEXT to the size of realgud-eval-message-print-length."

reply via email to

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