Switching between prolog systems is not supported properly. Say I stated with (setq prolog-system 'swi) in my configuration, and I set (setq-local prolog-system 'gnu) in my working buffer. Now when I do `run-prolog` it is expected to run gprolog instead of swipl. But this is not happening, it still runs swipl. The bug seems to be in `prolog-ensure-process` function. If the process is not running, a new process is created using make-comint-in-buffer whose program name is supplied using (prolog-program-name). But we have already shifted to the *prolog* buffer here, so whatever the value of prolog-system in our source buffer, the program started is still that of the global variable. In my patch I just bound (prolog-program-name) and (prolog-program-switches) before switching to *prolog* buffer. This seems to work.