aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2016-04-10 22:47:03 -0700
committerPaul Eggert2016-04-10 22:47:21 -0700
commit9b1aab91fc479be9a923af1874801eadc1c19b20 (patch)
tree094c8f49dfb36d3e595a4dacfa6535ade1cd647a
parent0e7bcec103073eceecc2621c19e4d290b2d97e8d (diff)
downloademacs-9b1aab91fc479be9a923af1874801eadc1c19b20.tar.gz
emacs-9b1aab91fc479be9a923af1874801eadc1c19b20.zip
Port run-prolog EMACS to SWI-Prolog 7.2.3
* lisp/progmodes/prolog.el (prolog-ensure-process): Work around incompatibility of SWI-Prolog 7.2.3 and earlier with the new way of dealing with the EMACS and INSIDE_EMACS environment variables.
-rw-r--r--lisp/progmodes/prolog.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 9ee405b31e1..212a5fa69ab 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -1374,8 +1374,20 @@ the variable `prolog-prompt-regexp'."
1374 () 1374 ()
1375 (with-current-buffer (get-buffer-create "*prolog*") 1375 (with-current-buffer (get-buffer-create "*prolog*")
1376 (prolog-inferior-mode) 1376 (prolog-inferior-mode)
1377 (apply 'make-comint-in-buffer "prolog" (current-buffer) 1377
1378 (prolog-program-name) nil (prolog-program-switches)) 1378 ;; The "INFERIOR=yes" hack is for SWI-Prolog 7.2.3 and earlier,
1379 ;; which assumes it is running under Emacs if either INFERIOR=yes or
1380 ;; if EMACS is set to a nonempty value. The EMACS setting is
1381 ;; obsolescent, so set INFERIOR. Newer versions of SWI-Prolog should
1382 ;; know about INSIDE_EMACS (which replaced EMACS) and should not need
1383 ;; this hack.
1384 (let ((process-environment
1385 (if (getenv "INFERIOR")
1386 process-environment
1387 (cons "INFERIOR=yes" process-environment))))
1388 (apply 'make-comint-in-buffer "prolog" (current-buffer)
1389 (prolog-program-name) nil (prolog-program-switches)))
1390
1379 (unless prolog-system 1391 (unless prolog-system
1380 ;; Setup auto-detection. 1392 ;; Setup auto-detection.
1381 (setq-local 1393 (setq-local