diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-02-26 19:54:59 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2021-02-26 19:54:59 +0100 |
commit | 5c922cc3a4b0677805a678267df2b7598e92bb83 (patch) | |
tree | f7680e085436621332230c7a46df36ad4048310b /lisp/emacs-lisp/rx.el | |
parent | cedc55041ea5179dcb389845d2d0e3562060cab9 (diff) | |
parent | 496fa1c03b1b3ce4aa9872751e9fac45167766c2 (diff) | |
download | emacs-5c922cc3a4b0677805a678267df2b7598e92bb83.tar.gz emacs-5c922cc3a4b0677805a678267df2b7598e92bb83.tar.bz2 emacs-5c922cc3a4b0677805a678267df2b7598e92bb83.zip |
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'lisp/emacs-lisp/rx.el')
-rw-r--r-- | lisp/emacs-lisp/rx.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 58584f300c9..ffc21951b64 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -1437,7 +1437,11 @@ following constructs: construct." (let* ((rx--pcase-vars nil) (regexp (rx--to-expr (rx--pcase-transform (cons 'seq regexps))))) - `(and (pred (string-match ,regexp)) + `(and (pred stringp) + ;; `pcase-let' takes a match for granted and discards all unnecessary + ;; conditions, which means that a `pred' clause cannot be used for + ;; the match condition. The following construct seems to survive. + (app (lambda (s) (string-match ,regexp s)) (pred identity)) ,@(let ((i 0)) (mapcar (lambda (name) (setq i (1+ i)) |