From 1f0bef565ecdb08b36f131430dd16da4d3b7e787 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 9 Jul 2017 09:07:37 -0700 Subject: doc: fix compat note 156. * txr.1: Fix a flaw in the compat note 156 wording. The workaround described only applies to TXR that has not been upgraded to 157 or newer; it is not an alternative to using the compat option, but a way to fix code under old TXR. Also adding here the recommendation that applications should switch to the new evaluating case functions rather than relying on the compat switch. --- txr.1 | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/txr.1 b/txr.1 index 475e74dc..d90490d1 100644 --- a/txr.1 +++ b/txr.1 @@ -60037,12 +60037,21 @@ would arrange for the evaluation of .code a as a variable, rather than treating it as the symbol .code a -itself. Beside using the compatibility mechanism, a workaround is to -use a list of keys, exemplified by a rewrite of the foregoing -expression to +itself. Though the compatibility mechanism restores the behavior, +applications depending on the evaluating behavior should be changed to +instead use +.codn caseq* , +.code caseql* +or +.codn casequal . +A workaround for this bug for \*(TX versions 156 or older is to replace +simple keys with a key list of length one, exemplified by a rewrite of the +foregoing expression to .codn "(caseql x ((a) 0))" . -The other behavior was that empty lists of forms in a clause were -producing a result value of +Here +.code a +is not evaluated. +forms in a clause were producing a result value of .codn t . For example .code "(case 1 (1))" -- cgit v1.2.3