summaryrefslogtreecommitdiff
path: root/lisp/epa-ks.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-09-24 19:41:03 +0200
committerStefan Kangas <stefan@marxist.se>2021-09-24 19:41:03 +0200
commit35d0675467e61aff30c21544f87f55b1b1a2cfd3 (patch)
treedfbc48f1575e762352d60b55bb25facfa438875b /lisp/epa-ks.el
parent8fbf816ccd0fe223568d6c31c4571ca45dffaa8d (diff)
downloademacs-35d0675467e61aff30c21544f87f55b1b1a2cfd3.tar.gz
emacs-35d0675467e61aff30c21544f87f55b1b1a2cfd3.tar.bz2
emacs-35d0675467e61aff30c21544f87f55b1b1a2cfd3.zip
Prefer seq-random-elt to nth+random
* lisp/emacs-lisp/seq.el (seq-random-elt): Autoload. * lisp/avoid.el (mouse-avoidance-random-shape): * lisp/epa-ks.el (epa-ks--query-url): * lisp/erc/erc-networks.el (erc-server-select): * lisp/gnus/gnus-fun.el (gnus--random-face-with-type) (gnus-fun-ppm-change-string): * lisp/net/soap-inspect.el (soap-sample-value-for-xs-simple-type): * lisp/obsolete/landmark.el (landmark-random-move): * lisp/play/mpuz.el (mpuz-build-random-perm): * lisp/play/zone.el (zone-pgm-stress): * lisp/vc/add-log.el (add-change-log-entry): * test/lisp/net/tramp-tests.el (tramp-test44-asynchronous-requests): Prefer seq-random-elt to nth+random.
Diffstat (limited to 'lisp/epa-ks.el')
-rw-r--r--lisp/epa-ks.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/epa-ks.el b/lisp/epa-ks.el
index ebdb1274218..35caa1a93c5 100644
--- a/lisp/epa-ks.el
+++ b/lisp/epa-ks.el
@@ -149,8 +149,7 @@ If EXACT is non-nil, don't accept approximate matches."
(cond ((null epa-keyserver)
(user-error "Empty keyserver pool"))
((listp epa-keyserver)
- (nth (random (length epa-keyserver))
- epa-keyserver))
+ (seq-random-elt epa-keyserver))
((stringp epa-keyserver)
epa-keyserver)
((error "Invalid type for `epa-keyserver'")))