From 75407435b1821f065e1c42967f3d3384c3732a28 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 9 Apr 2008 04:29:43 +0000 Subject: [PATCH] (regexp-opt-group): Use substring-no-properties for correct handling of unibyte strings. --- lisp/emacs-lisp/regexp-opt.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 18bd094e4d4..51ed53e71fc 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -226,7 +226,7 @@ This means the number of non-shy regexp grouping constructs ;; 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 -- 2.39.5