From bc35fdf25e8326c543ea69622d804e211232214a Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sat, 20 Feb 2021 17:14:42 +0100 Subject: 2021-02-20 16:49:00 --- metapost/context/base/mpxl/mp-lmtx.mpxl | 10 +++++----- metapost/context/base/mpxl/mp-luas.mpxl | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'metapost') diff --git a/metapost/context/base/mpxl/mp-lmtx.mpxl b/metapost/context/base/mpxl/mp-lmtx.mpxl index 93791e7c5..3a6028954 100644 --- a/metapost/context/base/mpxl/mp-lmtx.mpxl +++ b/metapost/context/base/mpxl/mp-lmtx.mpxl @@ -393,11 +393,11 @@ vardef lmt_do_arrow = save l ; string l ; l := getparameter "location" ; save k ; string k ; k := getparameter "kind" ; save p ; path p ; p := getparameter "path" ; - save ahvariant ; ahvariant := if a = "dimpled" : 1 elseif a = "curved" : 2 else : 0 fi ; - save ahdimple ; ahdimple := getparameter "dimple" ; - save ahscale ; ahscale := getparameter "scale" ; - save ahangle ; ahangle := getparameter "angle" ; - save ahlength ; ahlength := getparameter "length" ; + interim ahvariant := if a = "dimpled" : 1 elseif a = "curved" : 2 else : 0 fi ; + interim ahdimple := getparameter "dimple" ; + interim ahscale := getparameter "scale" ; + interim ahangle := getparameter "angle" ; + interim ahlength := getparameter "length" ; if not getparameter "headonly" : draw p ; fi ; diff --git a/metapost/context/base/mpxl/mp-luas.mpxl b/metapost/context/base/mpxl/mp-luas.mpxl index 9ea130d35..05f7cef05 100644 --- a/metapost/context/base/mpxl/mp-luas.mpxl +++ b/metapost/context/base/mpxl/mp-luas.mpxl @@ -223,8 +223,8 @@ newscriptindex mfid_utfsub ; mfid_utfsub := scriptindex "utfsub" ; % def utflen = runscript mfid_utflen enddef ; % def utfsub = runscript mfid_utfsub enddef ; -vardef utfnum(expr s) = runscript mfid_utfnum s enddef ; % str -vardef utflen(expr s) = runscript mfid_utflen s enddef ; % str +vardef utfnum expr s = runscript mfid_utfnum s enddef ; % str +vardef utflen expr s = runscript mfid_utflen s enddef ; % str vardef utfsub(text t) = runscript mfid_utfsub t enddef ; % str, first, (optional) last permanent utfnum, utflen, utfsub ; @@ -265,14 +265,15 @@ permanent getparameters, presetparameters, hasparameter, hasoption, getparameter getparametercount, getmaxparametercount, getparameterpath, getparameterpen, getparametertext, % getparameteroption, applyparameters, pushparameters, popparameters ; -% This might also be done in stock mkiv: +% No vardef's because we need to scan for an assignment too and we'll see +% an endgroup otherwise. -newscriptindex mfid_year ; mfid_year := scriptindex "year" ; vardef year = runscript mfid_year enddef ; -newscriptindex mfid_month ; mfid_month := scriptindex "month" ; vardef month = runscript mfid_month enddef ; -newscriptindex mfid_day ; mfid_day := scriptindex "day" ; vardef day = runscript mfid_day enddef ; -newscriptindex mfid_hour ; mfid_hour := scriptindex "hour" ; vardef hour = runscript mfid_hour enddef ; -newscriptindex mfid_minute ; mfid_minute := scriptindex "minute" ; vardef minute = runscript mfid_minute enddef ; -newscriptindex mfid_second ; mfid_second := scriptindex "second" ; vardef second = runscript mfid_second enddef ; +newscriptindex mfid_year ; mfid_year := scriptindex "year" ; def year = runscript mfid_year enddef ; +newscriptindex mfid_month ; mfid_month := scriptindex "month" ; def month = runscript mfid_month enddef ; +newscriptindex mfid_day ; mfid_day := scriptindex "day" ; def day = runscript mfid_day enddef ; +newscriptindex mfid_hour ; mfid_hour := scriptindex "hour" ; def hour = runscript mfid_hour enddef ; +newscriptindex mfid_minute ; mfid_minute := scriptindex "minute" ; def minute = runscript mfid_minute enddef ; +newscriptindex mfid_second ; mfid_second := scriptindex "second" ; def second = runscript mfid_second enddef ; permanent year, month, day, hour, minute, second ; % overloaded -- cgit v1.2.3