aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2016-01-28 21:04:20 -0500
committerGlenn Morris2016-01-28 21:04:20 -0500
commite94983f6a637761bf1944ce3633cf1698091a61b (patch)
tree702f50cee4cef6d57620399e16cb3a3e20bea6dc /lisp
parent59e39ccf2a26fd7251cdaf1852167eee1700b62b (diff)
downloademacs-e94983f6a637761bf1944ce3633cf1698091a61b.tar.gz
emacs-e94983f6a637761bf1944ce3633cf1698091a61b.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/prolog.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 352f3785c05..3767dbaa1e8 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -2617,6 +2617,8 @@ and end of list building."
2617 (goto-char (point-max)) 2617 (goto-char (point-max))
2618) 2618)
2619 2619
2620(declare-function pltrace-on "ext:pltrace" ())
2621
2620(defun prolog-enable-sicstus-sd () 2622(defun prolog-enable-sicstus-sd ()
2621 "Enable the source level debugging facilities of SICStus 3.7 and later." 2623 "Enable the source level debugging facilities of SICStus 3.7 and later."
2622 (interactive) 2624 (interactive)
@@ -2627,21 +2629,22 @@ and end of list building."
2627 (progn 2629 (progn
2628 ;; If there is a *prolog* buffer, then call pltrace-on 2630 ;; If there is a *prolog* buffer, then call pltrace-on
2629 (if (get-buffer "*prolog*") 2631 (if (get-buffer "*prolog*")
2630 ;; Avoid compilation warnings by using eval 2632 (pltrace-on))
2631 (eval '(pltrace-on)))
2632 (setq prolog-use-sicstus-sd t) 2633 (setq prolog-use-sicstus-sd t)
2633 ))) 2634 )))
2634 2635
2636(declare-function pltrace-off "ext:pltrace" (&optional remove-process-filter))
2637
2635(defun prolog-disable-sicstus-sd () 2638(defun prolog-disable-sicstus-sd ()
2636 "Disable the source level debugging facilities of SICStus 3.7 and later." 2639 "Disable the source level debugging facilities of SICStus 3.7 and later."
2637 (interactive) 2640 (interactive)
2641 (require 'pltrace)
2638 (setq prolog-use-sicstus-sd nil) 2642 (setq prolog-use-sicstus-sd nil)
2639 ;; Remove the hook 2643 ;; Remove the hook
2640 (remove-hook 'prolog-inferior-mode-hook 'pltrace-on) 2644 (remove-hook 'prolog-inferior-mode-hook 'pltrace-on)
2641 ;; If there is a *prolog* buffer, then call pltrace-off 2645 ;; If there is a *prolog* buffer, then call pltrace-off
2642 (if (get-buffer "*prolog*") 2646 (if (get-buffer "*prolog*")
2643 ;; Avoid compile warnings by using eval 2647 (pltrace-off)))
2644 (eval '(pltrace-off))))
2645 2648
2646(defun prolog-toggle-sicstus-sd () 2649(defun prolog-toggle-sicstus-sd ()
2647 ;; FIXME: Use define-minor-mode. 2650 ;; FIXME: Use define-minor-mode.