"Ilya N. Golubev" <gin(a)mo.msk.ru> writes:
> Could we fix this by having `insert-file-contents-internal'
bind
> `coding-system-for-read' to the value of CODESYS if non-nil CODESYS
> was provided?
Not sure. If it will only be used for file it was intended for,
It will be used for reading all the files for the duration of the
call.
But, AFAIK, nothing forbids file name handler to depend on some
additional (configuration?) data, which are taken from additional
files, and coding system defaults used while reading files may
affect that data.
True. Coding systems in conjunction with file name handlers can make
your head explode. :-(
If already set CODESYS was available to recurisively called
`insert-file-contents', the latter would not call
`insert-file-contents-pre-hook' again.
Then perhaps we should make sure that insert-file-contents records its
CODESYS argument somewhere where the child will find it. That,
although very dirty, seems like a better solution than introducing
kludges to the user code that tries to use the hooks.