summaryrefslogtreecommitdiff
path: root/lisp/net/soap-inspect.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/soap-inspect.el')
-rw-r--r--lisp/net/soap-inspect.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el
index 6f9ce6a2d69..eca338eb22d 100644
--- a/lisp/net/soap-inspect.el
+++ b/lisp/net/soap-inspect.el
@@ -6,7 +6,7 @@
;; Created: October 2010
;; Keywords: soap, web-services, comm, hypermedia
;; Package: soap-client
-;; Homepage: https://github.com/alex-hhh/emacs-soap-client
+;; URL: https://github.com/alex-hhh/emacs-soap-client
;; This file is part of GNU Emacs.
@@ -114,7 +114,7 @@ This is a specialization of `soap-sample-value' for
(cond
((soap-xs-simple-type-enumeration type)
(let ((enumeration (soap-xs-simple-type-enumeration type)))
- (nth (random (length enumeration)) enumeration)))
+ (and enumeration (seq-random-elt enumeration))))
((soap-xs-simple-type-pattern type)
(format "a string matching %s" (soap-xs-simple-type-pattern type)))
((soap-xs-simple-type-length-range type)
@@ -124,7 +124,7 @@ This is a specialization of `soap-sample-value' for
(format "a string between %d and %d chars long" low high))
(low (format "a string at least %d chars long" low))
(high (format "a string at most %d chars long" high))
- (t (format "a string OOPS")))))
+ (t "a string OOPS"))))
((soap-xs-simple-type-integer-range type)
(cl-destructuring-bind (min . max) (soap-xs-simple-type-integer-range type)
(cond
@@ -134,7 +134,7 @@ This is a specialization of `soap-sample-value' for
(t (random 100)))))
((consp (soap-xs-simple-type-base type)) ; an union of values
(let ((base (soap-xs-simple-type-base type)))
- (soap-sample-value (nth (random (length base)) base))))
+ (soap-sample-value (and base (seq-random-elt base)))))
((soap-xs-basic-type-p (soap-xs-simple-type-base type))
(soap-sample-value (soap-xs-simple-type-base type))))))
@@ -220,7 +220,7 @@ to its sub elements. If ELEMENT is the WSDL document itself, the
entire WSDL can be inspected."
(let ((inspect (get (soap-type-of element) 'soap-inspect)))
(unless inspect
- (error "Soap-inspect: no inspector for element"))
+ (error "soap-inspect: No inspector for element"))
(with-current-buffer (get-buffer-create "*soap-inspect*")
(setq buffer-read-only t)