summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2021-05-28 11:51:32 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2021-05-29 09:18:01 +0200
commit0cbfb7e7951e3a3e277835958f6daa139a653c52 (patch)
treec3dc50bdb8e8a626ee55e8243d58a84a9220d4a2 /lisp/emacs-lisp
parent61961903fd979f0f385db3138025866c88908c6f (diff)
downloademacs-0cbfb7e7951e3a3e277835958f6daa139a653c52.tar.gz
emacs-0cbfb7e7951e3a3e277835958f6daa139a653c52.tar.bz2
emacs-0cbfb7e7951e3a3e277835958f6daa139a653c52.zip
; * lisp/emacs-lisp/rx.el (rx--pcase-macroexpander): slight rephrase
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/rx.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index 43bd84d9990..071d390f0e4 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -1442,10 +1442,9 @@ following constructs:
introduced by a previous (let REF ...)
construct."
(let* ((rx--pcase-vars nil)
- (regexp (rx--to-expr (rx--pcase-transform (cons 'seq regexps))))
- (nvars (length rx--pcase-vars)))
+ (regexp (rx--to-expr (rx--pcase-transform (cons 'seq regexps)))))
`(and (pred stringp)
- ,(pcase nvars
+ ,(pcase (length rx--pcase-vars)
(0
;; No variables bound: a single predicate suffices.
`(pred (string-match ,regexp)))
@@ -1458,7 +1457,7 @@ following constructs:
(match-string 1 s)
0))
(and ,(car rx--pcase-vars) (pred (not numberp)))))
- (_
+ (nvars
;; Pack the submatches into a dotted list which is then
;; immediately destructured into individual variables again.
;; This is of course slightly inefficient.