Alexandre Oberlin<please@nospam.com> writes:
Thanks for your suggestion.
I tried to check if one of those solutions would work at least
while editing but none does. Actually in the narrowed region or
cloned buffer the syntax highlighting seems to take into account
the unseen text to set the highlighting. I need to copy the sh
region to a new file to get the correct syntax highlighting.
Apart from multiple modes, you can try working with Org mode,
which gives a nice way of embedding source code in documents.