Mercurial > hg > xemacs-beta
diff lisp/regexp-opt.el @ 5473:ac37a5f7e5be
Merge with trunk.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Thu, 17 Mar 2011 23:42:59 +0100 |
parents | 308d34e9f07d f00192e1cd49 |
children |
line wrap: on
line diff
--- a/lisp/regexp-opt.el Tue Feb 22 22:56:02 2011 +0100 +++ b/lisp/regexp-opt.el Thu Mar 17 23:42:59 2011 +0100 @@ -173,23 +173,23 @@ (cond ;; ;; If there are no strings, just return the empty string. - ((= (length strings) 0) + ((eql (length strings) 0) "") ;; ;; If there is only one string, just return it. - ((= (length strings) 1) - (if (= (length (car strings)) 1) + ((eql (length strings) 1) + (if (eql (length (car strings)) 1) (concat open-charset (regexp-quote (car strings)) close-charset) (concat open-group (regexp-quote (car strings)) close-group))) ;; ;; If there is an empty string, remove it and recurse on the rest. - ((= (length (car strings)) 0) + ((eql (length (car strings)) 0) (concat open-charset (regexp-opt-group (cdr strings) t t) "?" close-charset)) ;; ;; If all are one-character strings, just return a character set. - ((= (length strings) (apply '+ (mapcar 'length strings))) + ((eql (length strings) (apply '+ (mapcar 'length strings))) (concat open-charset (regexp-opt-charset strings) close-charset))