emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113520: * lisp/emacs-lisp/pcase.el (pcase--u1): Ver


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r113520: * lisp/emacs-lisp/pcase.el (pcase--u1): Verify if self-quoting values can be
Date: Wed, 24 Jul 2013 05:13:36 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113520
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14935
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2013-07-24 01:13:24 -0400
message:
  * lisp/emacs-lisp/pcase.el (pcase--u1): Verify if self-quoting values can be
  checked with memq.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/pcase.el       pcase.el-20100810123717-8zwve3391p2ywm1h-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-07-24 04:56:12 +0000
+++ b/lisp/ChangeLog    2013-07-24 05:13:24 +0000
@@ -1,5 +1,8 @@
 2013-07-24  Stefan Monnier  <address@hidden>
 
+       * emacs-lisp/pcase.el (pcase--u1): Verify if self-quoting values can be
+       checked with memq (bug#14935).
+
        * files.el (revert-buffer-function): Use a non-nil default.
        (revert-buffer-preserve-modes): Declare var to
        provide access to the `preserve-modes' argument.

=== modified file 'lisp/emacs-lisp/pcase.el'
--- a/lisp/emacs-lisp/pcase.el  2013-07-08 21:54:54 +0000
+++ b/lisp/emacs-lisp/pcase.el  2013-07-24 05:13:24 +0000
@@ -659,11 +659,15 @@
               (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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]