bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45795: 27.1; prolog-mode prolog-system switch bug


From: k3tu0isui
Subject: bug#45795: 27.1; prolog-mode prolog-system switch bug
Date: Mon, 11 Jan 2021 22:39:22 +0530

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.

Attachment: 0001-prolog-mode-prolog-system-switch-process-bug.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]