Hook to open an xref SourceID. This is used for
cross-referencing non-files, such as XPCE buffers, files from
archives, git repositories, etc. When successful, the
corresponding prolog:xref_close_source/2 hook is called for
closing the source.
Open a source. As we cannot open the same source twice we must
lock it. As of 7.3.32 this can be done through the
prolog:xref_close_source/2 hook. In older versions we get no
callback on the close, so we must leave the editor unlocked.