1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Don't use eval to quieten prolog.el compilation.

* lisp/progmodes/prolog.el (pltrace-on, pltrace-off): Declare.
(prolog-enable-sicstus-sd, prolog-disable-sicstus-sd): Don't use eval.
This commit is contained in:
Glenn Morris 2016-01-28 21:04:20 -05:00
parent 59e39ccf2a
commit e94983f6a6

View file

@ -2617,6 +2617,8 @@ and end of list building."
(goto-char (point-max))
)
(declare-function pltrace-on "ext:pltrace" ())
(defun prolog-enable-sicstus-sd ()
"Enable the source level debugging facilities of SICStus 3.7 and later."
(interactive)
@ -2627,21 +2629,22 @@ and end of list building."
(progn
;; If there is a *prolog* buffer, then call pltrace-on
(if (get-buffer "*prolog*")
;; Avoid compilation warnings by using eval
(eval '(pltrace-on)))
(pltrace-on))
(setq prolog-use-sicstus-sd t)
)))
(declare-function pltrace-off "ext:pltrace" (&optional remove-process-filter))
(defun prolog-disable-sicstus-sd ()
"Disable the source level debugging facilities of SICStus 3.7 and later."
(interactive)
(require 'pltrace)
(setq prolog-use-sicstus-sd nil)
;; Remove the hook
(remove-hook 'prolog-inferior-mode-hook 'pltrace-on)
;; If there is a *prolog* buffer, then call pltrace-off
(if (get-buffer "*prolog*")
;; Avoid compile warnings by using eval
(eval '(pltrace-off))))
(pltrace-off)))
(defun prolog-toggle-sicstus-sd ()
;; FIXME: Use define-minor-mode.