emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/org-contrib e21cf9bdf7 2/2: * lisp/ob-oz.el: Fix compiler


From: ELPA Syncer
Subject: [nongnu] elpa/org-contrib e21cf9bdf7 2/2: * lisp/ob-oz.el: Fix compiler warnings
Date: Fri, 8 Sep 2023 07:01:03 -0400 (EDT)

branch: elpa/org-contrib
commit e21cf9bdf7e14e9177f6be3f17e9e3cd413f746b
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    * lisp/ob-oz.el: Fix compiler warnings
    
    (oz-send-string):
    (run-oz):
    (oz-compiler-buffer): Add missing declares.
    (oz-send-string-expression): Remove redundant `unwind-protect' and
    `progn'.
---
 lisp/ob-oz.el | 39 +++++++++++++++++++--------------------
 1 file changed, 19 insertions(+), 20 deletions(-)

diff --git a/lisp/ob-oz.el b/lisp/ob-oz.el
index e8a747ca7f..e9d38ae30c 100644
--- a/lisp/ob-oz.el
+++ b/lisp/ob-oz.el
@@ -92,6 +92,10 @@
 ;;; major mode for editing Oz programs
 (require 'mozart nil t)
 
+(defvar oz-compiler-buffer) ; defined in mozart.el
+(declare-function oz-send-string "ext:mozart" (string &optional system))
+(declare-function run-oz "ext:mozart" ())
+
 ;;
 ;; Interface to communicate with Oz.
 ;; (1) For statements without any results: oz-send-string
@@ -179,26 +183,21 @@ function returns nil."
     ;; wait for result
     (if wait-time
        (let ((waited 0))
-         (unwind-protect
-             (progn
-               (while
-                   ;; stop loop if org-babel-oz-collected-result \= nil or 
waiting time is over
-                   (not (or (not (equal org-babel-oz-collected-result nil))
-                            (> waited wait-time)))
-                 (progn
-                   (sit-for polling-delay)
-;;                 (message "org-babel-oz: next polling iteration")
-                   (setq waited (+ waited polling-delay))))
-;;             (message "org-babel-oz: waiting over, got result or waiting 
timed out")
-;;             (message (format "wait-time: %s, waited: %s" wait-time waited))
-               (setq result org-babel-oz-collected-result)
-               (setq org-babel-oz-collected-result nil))))
-      (unwind-protect
-         (progn
-           (while (equal org-babel-oz-collected-result nil)
-             (sit-for polling-delay))
-           (setq result org-babel-oz-collected-result)
-           (setq org-babel-oz-collected-result nil))))
+         (while
+             ;; stop loop if org-babel-oz-collected-result \= nil or waiting 
time is over
+             (not (or (not (equal org-babel-oz-collected-result nil))
+                    (> waited wait-time)))
+           (sit-for polling-delay)
+           ;;              (message "org-babel-oz: next polling iteration")
+           (setq waited (+ waited polling-delay)))
+         ;;            (message "org-babel-oz: waiting over, got result or 
waiting timed out")
+         ;;            (message (format "wait-time: %s, waited: %s" wait-time 
waited))
+         (setq result org-babel-oz-collected-result)
+         (setq org-babel-oz-collected-result nil))
+      (while (equal org-babel-oz-collected-result nil)
+       (sit-for polling-delay))
+      (setq result org-babel-oz-collected-result)
+      (setq org-babel-oz-collected-result nil))
     result))
 
 (defun org-babel-expand-body:oz (body params)



reply via email to

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