Vit Zyka wrote:
> Hans Hagen wrote:
>> Vit Zyka wrote:
>>> Hans Hagen wrote:
>>>> Vit Zyka wrote:
>>>>>
>>>>> thanks for a remmembering. As I said: this mail is a suggestion to 
>>>>> solve a general problem by systemic way.
>>>>>
>>>> sure, but \input cannot be redefined in a robust way because of its 
>>>> scanning nature; ok, in luatex we can intercept things, but not in 
>>>> mkii
>>>> Hans
>>>
>>> I thought that the number of calling \input inside text state is 
>>> limited---(only?) one example is a loading encoding definition file. 
>>> Why not to incorporate the cleverness of setting a default 
>>> \endinputchar to a macro that invokes \input?
>>>
>>>> \startreadingfile ... \stopreadingfile is an option then
>>>
>>> understand as a solution bypassing \input redefinition
>> it all depends on the usage ...
>> - most commands use \readfile, or \readjobfile or alike - when loading 
>
> yes, in this case \readsysfile inside:
>
> \def\dododoincludepdffontresource#1% encoding
>   {\bgroup
>    \edef\currentencoding{#1}%
>    \doifvaluesomething\pdffontfileresource
>      {\startreadingfile
>         \ignorelines % just in case \par is redefined;
>
> \readsysfile{pdfr-\getvalue\pdffontfileresource}\donothing\donothing
>       \stopreadingfile
>       \letgvalue\pdffontfileresource\empty}%
>    \egroup}
>
>> modules of system files , we revert to tex catcode regimes etc
>> user files ... well, here tex (context) does not know what is dealt 
>> with; take xml, in that case we want to stay in xml mode; or 
>> verbatim, which needs to set up verbatim
>> actually this is all arranged already (and always has been)
>
> catcodes yes, but \endlinechar not:
>
> \def\startreadingfile% beter een every en \setnormalcatcodes
>   {\doglobal\increment\readingfilelevel
>    \the\everystartreadingfile
>    \beginrestorecatcodes
>    \setcatcodetable\prtcatcodes}
>
> why not introduce something like
>
>    \beginrestoreendlinechar
\def\startreadingfile
  {\doglobal\increment\readingfilelevel
   \the\everystartreadingfile
   \pushendofline
   \restoreendofline
   \beginrestorecatcodes
   \setcatcodetable\prtcatcodes}

\def\stopreadingfile
  {\endrestorecatcodes
   \popendofline
   \the\everystopreadingfile
   \doglobal\decrement\readingfilelevel}

\let\normalstartreadingfile\startreadingfile
\let\normalstopreadingfile \stopreadingfile

there must have been a reason for not adding this, probably because when 
we are in line by line mode we don;t want this; in the otr the 
endlinechar is restored anyway

i'm a bit reluctant to just change these defaults because i cannot 
forsee where it fails me

Hans

 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to