|
From: | Sahitihi |
Subject: | Re: Fwd: Re: Patch file for colorize module |
Date: | Mon, 4 Jun 2018 13:18:02 +0530 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
Hi Ricardo, I used cond conditional and gave a try. This worked out
with following line. I also included string-match which also worked. All I need to look for next step is to use regular expressions
instead of string. (cond ((string-match "(starting phase" str) (colorized-display str '(GREEN)))You also see that “if” alone is not sufficient here, because you have more than one _expression_. You could nest “if” expressions, but that’s ugly. You can use “cond” instead. ((string-prefix? "succeed" str) (colorized-display str '(GREEN))) ((string-prefix? "failed" str) (colorized-display str '(GREEN))) (else (display str target-port) ))) Please look at the examples in my previous email again. I used “string-match”, “match:substring”, and “and=>”, which you may not be familiar with yet. I used them individually but I still dint figure out the way it works in the example. I will check that as next one. Thanks!! Sahithi |
[Prev in Thread] | Current Thread | [Next in Thread] |