From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#14935: 24.3.50; pcase (or) UPAT fails? Date: Wed, 24 Jul 2013 01:14:10 -0400 Message-ID: References: <87ip01fr90.fsf@gmail.com> <87ehapf0v3.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374642911 15920 80.91.229.3 (24 Jul 2013 05:15:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jul 2013 05:15:11 +0000 (UTC) Cc: 14935-done@debbugs.gnu.org To: Vitalie Spinu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 24 07:15:12 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V1rPo-0003VC-6s for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jul 2013 07:15:08 +0200 Original-Received: from localhost ([::1]:54448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1rPn-0005Jc-Pf for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jul 2013 01:15:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1rPk-0005I4-DU for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2013 01:15:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1rPi-0000Zz-Va for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2013 01:15:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1rPi-0000ZD-Sq for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2013 01:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V1rPi-0002n5-I6 for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2013 01:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Jul 2013 05:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14935 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14935-done@debbugs.gnu.org id=D14935.137464286310587 (code D ref 14935); Wed, 24 Jul 2013 05:15:02 +0000 Original-Received: (at 14935-done) by debbugs.gnu.org; 24 Jul 2013 05:14:23 +0000 Original-Received: from localhost ([127.0.0.1]:46021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V1rP5-0002kf-3Z for submit@debbugs.gnu.org; Wed, 24 Jul 2013 01:14:23 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:33925) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V1rP2-0002kM-2u for 14935-done@debbugs.gnu.org; Wed, 24 Jul 2013 01:14:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFsoXa8/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJLMwjX2RCgOkeoFegmop X-IPAS-Result: Av8EABK/CFFsoXa8/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJLMwjX2RCgOkeoFegmop X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="19674849" Original-Received: from 108-161-118-188.dsl.teksavvy.com (HELO pastel.home) ([108.161.118.188]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Jul 2013 01:14:07 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 9BCE666D4C; Wed, 24 Jul 2013 01:14:10 -0400 (EDT) In-Reply-To: <87ehapf0v3.fsf@gmail.com> (Vitalie Spinu's message of "Tue, 23 Jul 2013 23:00:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76612 Archived-At: > (pcase "^" > ((or "^" "%") (message "here"))) Yes, this should work, but it incorrectly used `memq' whereas the (or `"^" `"%") pattern correctly leads to the use of `member'. I installed the patch below which should fix it, Stefan === modified file 'lisp/emacs-lisp/pcase.el' --- lisp/emacs-lisp/pcase.el 2013-07-08 21:54:54 +0000 +++ lisp/emacs-lisp/pcase.el 2013-07-24 05:10:31 +0000 @@ -659,7 +659,11 @@ (memq-fine t)) (when all (dolist (alt (cdr upat)) - (unless (or (pcase--self-quoting-p 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)