diff --git a/contrib/remind-conf-mode.06/remind-conf-mode.el b/contrib/remind-conf-mode.06/remind-conf-mode.el index a095556c..df006f01 100644 --- a/contrib/remind-conf-mode.06/remind-conf-mode.el +++ b/contrib/remind-conf-mode.06/remind-conf-mode.el @@ -112,7 +112,7 @@ "WARN" "UNTIL" "THROUGH" "SCANFROM" "DURATION" "TAG" "MSG" "MSF" "CAL" "SPECIAL" "IFTRIG" "PS" "PSFILE" "BANNER" "INCLUDE" "PUSH-OMIT-CONTEXT" "DEBUG" "DUMPVARS" "CLEAR-OMIT-CONTEXT" "POP-OMIT-CONTEXT" "SET" "ERRMSG" "FSET" - "EXIT" "FLUSH" "PRESERVE" "MOON" "COLOR") + "EXIT" "FLUSH" "PRESERVE" "MOON" "COLOR" "COLOUR") #'(lambda (a b) (> (length a) (length b))))) (defconst remind-type-keywords diff --git a/examples/remind.vim b/examples/remind.vim index 284ca6d6..582f22ae 100644 --- a/examples/remind.vim +++ b/examples/remind.vim @@ -23,7 +23,7 @@ syn keyword remindExpiry UNTIL FROM SCANFROM SCAN WARN SCHED THROUGH syn keyword remindTag PRIORITY TAG syn keyword remindTimed AT DURATION syn keyword remindMove ONCE SKIP BEFORE AFTER -syn keyword remindSpecial INCLUDE INC BANNER PUSH-OMIT-CONTEXT PUSH CLEAR-OMIT-CONTEXT CLEAR POP-OMIT-CONTEXT POP COLOR +syn keyword remindSpecial INCLUDE INC BANNER PUSH-OMIT-CONTEXT PUSH CLEAR-OMIT-CONTEXT CLEAR POP-OMIT-CONTEXT POP COLOR COLOUR syn keyword remindRun MSG MSF RUN CAL SATISFY SPECIAL PS PSFILE SHADE MOON syn keyword remindConditional IF ELSE ENDIF IFTRIG syn keyword remindDebug DEBUG DUMPVARS DUMP ERRMSG FLUSH PRESERVE diff --git a/man/remind.1 b/man/remind.1 index c0c7de3b..d1a0ae3d 100644 --- a/man/remind.1 +++ b/man/remind.1 @@ -4167,6 +4167,9 @@ calendar. Use it like this: REM ... SPECIAL COLOR 0 128 0 This is a dark green reminder .fi +You can spell COLOR either the American way ("COLOR") or the British +way ("COLOUR"). This manual will use the American way. + Immediately following COLOR should be three decimal numbers ranging from 0 to 255 specifying red, green and blue intensities, respectively. The rest of the line is the text to put in the calendar. diff --git a/scripts/tkremind b/scripts/tkremind index 78548216..9b50bb05 100755 --- a/scripts/tkremind +++ b/scripts/tkremind @@ -796,6 +796,7 @@ proc FillCalWindow {} { DoMoonSpecial $n $stuff continue } + "COLOUR" - "COLOR" { if {[regexp {^ *([0-9]+) +([0-9]+) +([0-9]+) +(.*)$} $stuff all r g b rest]} { if {$r > 255} { @@ -822,7 +823,7 @@ proc FillCalWindow {} { } } } - if { $type != "*" && $type != "COLOR"} { + if { $type != "*" && $type != "COLOR" && $type != "COLOUR"} { continue } .cal.t$n configure -state normal diff --git a/src/calendar.c b/src/calendar.c index ac28a9ad..0b4ff6e7 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -1016,11 +1016,12 @@ static int DoCalRem(ParsePtr p, int col) trig.typ = PASSTHRU_TYPE; } if (trig.typ == PASSTHRU_TYPE) { - if (!PsCal && strcmp(trig.passthru, "COLOR")) { + if (!PsCal && strcmp(trig.passthru, "COLOR") && strcmp(trig.passthru, "COLOUR")) { FreeTrig(&trig); return OK; } - if (!strcmp(trig.passthru, "COLOR")) { + if (!strcmp(trig.passthru, "COLOR") || + !strcmp(trig.passthru, "COLOUR")) { is_color = 1; /* Strip off the three color numbers */ DBufFree(&buf); @@ -1073,6 +1074,7 @@ static int DoCalRem(ParsePtr p, int col) /* Suppress time if it's not today or if it's a non-COLOR special */ if (jul != JulianToday || (trig.typ == PASSTHRU_TYPE && + strcmp(trig.passthru, "COLOUR") && strcmp(trig.passthru, "COLOR"))) { if (DBufPuts(&obuf, SimpleTime(NO_TIME)) != OK) { DBufFree(&obuf); diff --git a/src/dorem.c b/src/dorem.c index cebdb13e..e705fe0d 100644 --- a/src/dorem.c +++ b/src/dorem.c @@ -708,14 +708,14 @@ int TriggerReminder(ParsePtr p, Trigger *t, TimeTrig *tim, int jul) DBufInit(&calRow); DBufInit(&pre_buf); if (t->typ == RUN_TYPE && RunDisabled) return E_RUN_DISABLED; - if ((t->typ == PASSTHRU_TYPE && strcmp(t->passthru, "COLOR")) || + if ((t->typ == PASSTHRU_TYPE && strcmp(t->passthru, "COLOR") && strcmp(t->passthru, "COLOUR")) || t->typ == CAL_TYPE || t->typ == PS_TYPE || t->typ == PSF_TYPE) return OK; /* Handle COLOR types */ - if (t->typ == PASSTHRU_TYPE && !strcmp(t->passthru, "COLOR")) { + if (t->typ == PASSTHRU_TYPE && (!strcmp(t->passthru, "COLOR") || !strcmp(t->passthru, "COLOUR")) { /* Strip off three tokens */ r = ParseToken(p, &buf); if (!NextMode) { diff --git a/src/rem2ps.c b/src/rem2ps.c index 245ff47a..2d7c3f17 100644 --- a/src/rem2ps.c +++ b/src/rem2ps.c @@ -366,6 +366,7 @@ void DoPsCal(void) } } } else if (!strcmp(passthru, "*") || + !strcmp(passthru, "COLOUR") || !strcmp(passthru, "COLOR")) { /* Put on linked list */ if (!CurEntries) { @@ -375,7 +376,8 @@ void DoPsCal(void) while(d->next) d = d->next; d->next = c; } - if (!strcmp(passthru, "COLOR")) { + if (!strcmp(passthru, "COLOR") || + !strcmp(passthru, "COLOUR")) { c->special = SPECIAL_COLOR; } } diff --git a/www/php/remind.php b/www/php/remind.php index 48ebfa22..2c6321d5 100644 --- a/www/php/remind.php +++ b/www/php/remind.php @@ -58,7 +58,7 @@ class Remind if ($special === null || $special == '*') { return $this->munge_entry($day, $results, $specials, $options, $body, $e); } - if ($special == 'COLOR') { + if ($special == 'COLOR' || $special == 'COLOUR') { if (preg_match('/^(\d+)\s+(\d+)\s+(\d+)\s+(.*)/', $body, $matches)) { return sprintf('%s', $matches[1] % 255, @@ -293,7 +293,7 @@ class Remind $entry['file'] = $lineinfo['file']; $lineinfo = 0; } - if ($special != '*' && $special != 'COLOR' && $special != 'HTML') { + if ($special != '*' && $special != 'COLOR' && $special != 'COLOUR' && $special != 'HTML') { if (!array_key_exists($special, $specials)) { $specials[$special] = array(); } diff --git a/www/rem2html b/www/rem2html index e205f118..25d09ba5 100755 --- a/www/rem2html +++ b/www/rem2html @@ -257,7 +257,7 @@ sub parse_input $shades->[$d] = sprintf("#%02X%02X%02X", ($1 % 256), ($2 % 256), ($3 % 256)); } - } elsif ($special eq 'COLOR') { + } elsif ($special eq 'COLOR' || $special eq 'COLOUR') { if ($body =~ /(\d+)\s+(\d+)\s+(\d+)\s+(.*)$/) { my($r, $g, $b, $text) = ($1, $2, $3, $4); my $color = sprintf("style=\"color: #%02X%02X%02X;\"",