changeset 45905:20781c152651

(regexp-opt-group): Don't cons uselessly.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 18 Jun 2002 21:52:42 +0000
parents 4c3a4e9f96e7
children cacf84433461
files lisp/emacs-lisp/regexp-opt.el
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/regexp-opt.el	Tue Jun 18 21:50:30 2002 +0000
+++ b/lisp/emacs-lisp/regexp-opt.el	Tue Jun 18 21:52:42 2002 +0000
@@ -192,7 +192,7 @@
      ;;
      ;; We have a list of different length strings.
      (t
-      (let ((prefix (try-completion "" (mapcar 'list strings))))
+      (let ((prefix (try-completion "" strings)))
 	(if (> (length prefix) 0)
 	    ;; common prefix: take it and recurse on the suffixes.
 	    (let* ((n (length prefix))
@@ -205,7 +205,7 @@
 	  (let* ((sgnirts (mapcar (lambda (s)
 				    (concat (nreverse (string-to-list s))))
 				  strings))
-		 (xiffus (try-completion "" (mapcar 'list sgnirts))))
+		 (xiffus (try-completion "" sgnirts)))
 	    (if (> (length xiffus) 0)
 		;; common suffix: take it and recurse on the prefixes.
 		(let* ((n (- (length xiffus)))
@@ -222,7 +222,7 @@
 	      ;; Otherwise, divide the list into those that start with a
 	      ;; particular letter and those that do not, and recurse on them.
 	      (let* ((char (char-to-string (string-to-char (car strings))))
-		     (half1 (all-completions char (mapcar 'list strings)))
+		     (half1 (all-completions char strings))
 		     (half2 (nthcdr (length half1) strings)))
 		(concat open-group
 			(regexp-opt-group half1)