From e7c5ab20154458d5cfaa002d7887f8f6f111153b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Wed, 14 Jan 2026 17:39:53 +0100 Subject: [PATCH] ; * lisp/emacs-lisp/regexp-opt.el (regexp-opt-group): Clarify intent. --- lisp/emacs-lisp/regexp-opt.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 68bd93422ae..27c558ae349 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -209,10 +209,7 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher." ;; ;; If there are several one-char strings, use charsets ((and (= (length (car strings)) 1) - (let ((strs (cdr strings))) - (while (and strs (/= (length (car strs)) 1)) - (pop strs)) - strs)) + (any (lambda (s) (= (length s) 1)) (cdr strings))) (let (letters rest) ;; Collect one-char strings (dolist (s strings)