registry.el: Fix call to cl-subseq
authorEric Abrahamsen <eric@ericabrahamsen.net>
Thu, 19 Mar 2015 05:37:38 +0000 (13:37 +0800)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Fri, 20 Mar 2015 09:47:14 +0000 (17:47 +0800)
* lisp/registry.el (registry-collect-prune-candidates): Earlier
  versions of cl-subseq would, if you asked for a subsequence longer
  than the sequence itself, pad its result with `nil's. It now errors,
  so don't ask it to do that.

lisp/ChangeLog
lisp/registry.el

index 3a3a2a9..2199e39 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-19  Eric Abrahamsen  <eric@ericabrahamsen.net>
+
+       * registry.el (registry-collect-prune-candidates): Fix call to
+       cl-subseq.
+
 2015-03-11  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * registry.el (registry-db): Temporary fix old Emacsen compilation.
index e4c37a6..a5d8239 100644 (file)
@@ -391,7 +391,7 @@ entries first and return candidates from beginning of list."
     ;; list of entry keys.
     (when sortfunc
       (setq candidates (sort candidates sortfunc)))
-    (delq nil (cl-subseq (mapcar #'car candidates) 0 limit))))
+    (cl-subseq (mapcar #'car candidates) 0 (min limit (length candidates)))))
 
 (provide 'registry)
 ;;; registry.el ends here