diff options
author | Xue Fuqiao <xfq.free@gmail.com> | 2013-07-24 16:04:39 +0800 |
---|---|---|
committer | Xue Fuqiao <xfq.free@gmail.com> | 2013-07-24 16:04:39 +0800 |
commit | a61dba1c5a5f32827eeda649c9421fc92d742a3d (patch) | |
tree | 16c9e74645fc045c08bb2570826e60f57462e4f4 /lisp/emacs-lisp/pcase.el | |
parent | 0e55c076ae7e22b1fecd6bbfca1356d5b2a9223e (diff) | |
parent | ff65ca0d81d219b326fa2a95cf77875c0e4b5eb6 (diff) | |
download | emacs-a61dba1c5a5f32827eeda649c9421fc92d742a3d.tar.gz emacs-a61dba1c5a5f32827eeda649c9421fc92d742a3d.tar.bz2 emacs-a61dba1c5a5f32827eeda649c9421fc92d742a3d.zip |
Merge from mainline.
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. |