# HG changeset patch # User Chong Yidong # Date 1207715383 0 # Node ID 877d364e5ff60254f1fb233dd848f4b9c590ec15 # Parent c3a6b4a9a15b97fa3fbc2e02bed5482cd5cb3c06 (regexp-opt-group): Use substring-no-properties for correct handling of unibyte strings. diff -r c3a6b4a9a15b -r 877d364e5ff6 lisp/emacs-lisp/regexp-opt.el --- a/lisp/emacs-lisp/regexp-opt.el Wed Apr 09 04:28:45 2008 +0000 +++ b/lisp/emacs-lisp/regexp-opt.el Wed Apr 09 04:29:43 2008 +0000 @@ -226,7 +226,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)))) + (let* ((char (substring-no-properties (car strings) 0 1)) (half1 (all-completions char strings)) (half2 (nthcdr (length half1) strings))) (concat open-group