From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Newsgroups: gmane.emacs.help Subject: pcase and minus-sign Date: Wed, 30 Nov 2016 13:12:23 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1480507468 27918 195.159.176.226 (30 Nov 2016 12:04:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2016 12:04:28 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.4.0 To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 30 13:04:23 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cC3cb-0006Rf-7e for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Nov 2016 13:04:21 +0100 Original-Received: from localhost ([::1]:43087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC3cf-0005Z8-3P for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Nov 2016 07:04:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC3bj-0005Uz-6L for help-gnu-emacs@gnu.org; Wed, 30 Nov 2016 07:03:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC3bf-0001GC-6n for help-gnu-emacs@gnu.org; Wed, 30 Nov 2016 07:03:27 -0500 Original-Received: from mout.kundenserver.de ([212.227.17.24]:54939) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cC3be-0001Fa-Tl for help-gnu-emacs@gnu.org; Wed, 30 Nov 2016 07:03:23 -0500 Original-Received: from [192.168.178.35] ([77.12.119.56]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0LilXp-1ci6hY1Gov-00cw1J for ; Wed, 30 Nov 2016 13:03:21 +0100 X-Provags-ID: V03:K0:Bsh6kdxL24Oet50wy3eEVUtjW5Zc//Oa4zzn8C/hsdfMfZ+rrUH GlDfqFIatNIVuyzcZjue4EnIZ3uhAK5o59uAL/5QXt2z349jpswQxQ4odnRA945HmZjGedb +y8z15a7g/X8r8KCZN0x724kXK6cMkXVX5y5nQuU7edrZCQjTXAjoPKgqhu05u47GJdmNTj 8YZhsYRt93Xpjog5+BF0w== X-UI-Out-Filterresults: notjunk:1;V01:K0:JCdaSPjPyic=:KnIgdenWUm19FfGYnYpE1n s0SvPNFplowqLYkA25SRLyF8fujvHs04DU1hgBsq/5/+J1jzm71VTPegv0kKlpvg8b21rbQO1 docF0ikbhumXty0IDsPXTQFNiWZcoV8UJmyEPaJlm3cnPjP/rV16G81248gGYrE3exNkD0gY+ eCPrQ46j9kKMW1IIAOMilpDYEBKEL5w6a7rWQg8cBgNTCmxz6Mqs9YXIYaOL+D8+AbjO26prA R/LK5q6i/iDqVzFMPYAuBBWR4DzpwbwdP8WKds72VRO4UAViOW4NKFHPTFnU8nOWsgiznDRI0 cWnsFGoIwdVLRA2l9TZDq2pOMnltx3rV+oJowXAbMwgWHKd28JjX7gX84i6ZJI8r3r1UHeni/ agAk4OzHXNSwybBWXaLNiGJ8VcIY1cpAh8h/EM9F/Ao0actDzsC9en+J9aMiepQ0/pLytLrXl ZV3diYhcb8mqajXH0KppExMitZ9+0/2uaoX74ZDfpNGHpJ7Jsh8ncvfaxQWq+xfgUcQ3pQi4E egEZnw4KdG+liAEVkc4lWR6Y3ntz2HrwXnxhPuNEYGU/SRiYGfb4MgDYYJ7uoyaqYRdkU/ahU yJICLhWf7/It0AD6U+s34AEnRuUKABoAS4VLTJDc3WFVKOETlj/MtwokzQwxRHSI+hqPrSLGR Vdyn+aSoeDhAH1898YjlprnRn3UPWVGlbnXwQPgHXq3T9F58Wel3X6q8ffglpuB2v/YxzvgF9 FP8ZYsa53Qa3a6M+ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.24 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111829 Archived-At: Hi, see code below. With numerical argument "1", first pattern is matched as expected. However without arg the minus is matched - the second pattern, not the default "_" at last. Any explanation? Thanks, Andreas (defun foo (arg) (interactive "P") (pcase arg (1 (message "%s" "ARG was `1'")) (- (message "%s" "ARG was minus-sign")) (_ (message "%s" "ARG not minus-sign")))) ;; GNU Emacs 25.1.90.1 (i686-pc-linux-gnu, GTK+ Version 3.14.5) of 2016-11-29