diff options
author | Tom Tromey <tromey@redhat.com> | 2013-07-26 14:02:53 -0600 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-07-26 14:02:53 -0600 |
commit | cc231cbe45d27a1906d268fb72d3b4105a2e9c65 (patch) | |
tree | c011828e2a3a18e77eaa8849e3cccb805d798f42 /lisp/emacs-lisp/pcase.el | |
parent | b34a529f177a6ea32da5cb1254f91bf9d71838db (diff) | |
parent | fec9206062b420aca84f53d05a72c3ee43244022 (diff) | |
download | emacs-cc231cbe45d27a1906d268fb72d3b4105a2e9c65.tar.gz emacs-cc231cbe45d27a1906d268fb72d3b4105a2e9c65.tar.bz2 emacs-cc231cbe45d27a1906d268fb72d3b4105a2e9c65.zip |
merge from trunk
Diffstat (limited to 'lisp/emacs-lisp/pcase.el')
-rw-r--r-- | lisp/emacs-lisp/pcase.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index 511f1480099..50c92518b02 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -659,11 +659,15 @@ Otherwise, it defers to REST which is a list of branches of the form (memq-fine t)) (when all (dolist (alt (cdr upat)) - (unless (or (pcase--self-quoting-p alt) - (and (eq (car-safe alt) '\`) - (or (symbolp (cadr alt)) (integerp (cadr alt)) - (setq memq-fine nil) - (stringp (cadr alt))))) + (unless (if (pcase--self-quoting-p alt) + (progn + (unless (or (symbolp alt) (integerp alt)) + (setq memq-fine nil)) + t) + (and (eq (car-safe alt) '\`) + (or (symbolp (cadr alt)) (integerp (cadr alt)) + (setq memq-fine nil) + (stringp (cadr alt))))) (setq all nil)))) (if all ;; Use memq for (or `a `b `c `d) rather than a big tree. |