[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 e94983f 2/2: Don't use eval to quieten prolog.el
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs-25 e94983f 2/2: Don't use eval to quieten prolog.el compilation. |
Date: |
Fri, 29 Jan 2016 02:04:28 +0000 |
branch: emacs-25
commit e94983f6a637761bf1944ce3633cf1698091a61b
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
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.
---
lisp/progmodes/prolog.el | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 352f378..3767dba 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -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.