branch: elpa/vc-fossil
commit 5e711789ab86425c138e32f6b58649ebea1ef8da
Author: barak <barak>
Commit: barak <barak>

    ideomatic lisp
---
 vc/el/vc-fossil.el | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index c51ada5..334002d 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -54,12 +54,11 @@
 
 (defun vc-fossil--run (&rest args)
   "Run a fossil command and return its output as a string"
-  (let* ((ok t)
-        (str (with-output-to-string
-               (with-current-buffer standard-output
-                 (unless (apply #'vc-fossil--out-ok args)
-                   (setq ok nil))))))
-    (and ok str)))
+  (catch 'bail
+    (with-output-to-string
+      (with-current-buffer standard-output
+       (unless (apply #'vc-fossil--out-ok args)
+         (throw 'bail nil))))))
 
 (defun vc-fossil-root (file)
   (vc-find-root file "_FOSSIL_"))

Reply via email to