summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/regexp-opt.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
-rw-r--r--lisp/emacs-lisp/regexp-opt.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index 589f1b70ac4..6627c20a7bf 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -141,7 +141,9 @@ in REGEXP."
(open-charset (if lax "" open-group))
(close-charset (if lax "" close-group)))
(cond
- ;;
+ ;; Protect against user-stupidity... could call error here
+ ((null strings)
+ nil)
;; If there is only one string, just return it.
((= (length strings) 1)
(if (= (length (car strings)) 1)