]> git.eshelyaron.com Git - emacs.git/commitdiff
Simplify pcomplete-uniquify-list
authorStefan Kangas <stefankangas@gmail.com>
Sat, 5 Aug 2023 08:55:27 +0000 (10:55 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Sat, 5 Aug 2023 15:57:53 +0000 (17:57 +0200)
* lisp/pcomplete.el (pcomplete-uniquify-list): Improve docstring.
Simplify.

lisp/pcomplete.el

index 36f68f1af57ebd06cbebf4862592655463d5bc89..c7ec228c1dbb851f2d829a5b0f8674805cba4bb2 100644 (file)
@@ -1318,10 +1318,10 @@ If specific documentation can't be given, be generic."
 
 ;; general utilities
 
-(defun pcomplete-uniquify-list (l)
-  "Sort and remove multiples in L."
-  (setq l (sort l #'string-lessp))
-  (seq-uniq l))
+(defun pcomplete-uniquify-list (sequence)
+  "Sort and remove multiples in SEQUENCE.
+Sequence should be a vector or list of strings."
+  (sort (seq-uniq sequence) #'string-lessp))
 (define-obsolete-function-alias 'pcomplete-uniqify-list #'pcomplete-uniquify-list "27.1")
 
 (defun pcomplete-process-result (cmd &rest args)