[Top][All Lists]

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

Re: pcase and minus-sign

From: Joost Kremers
Subject: Re: pcase and minus-sign
Date: Wed, 30 Nov 2016 16:48:25 +0100
User-agent: mu4e 0.9.17; emacs

On Wed, Nov 30 2016, Andreas Röhler wrote:
But what make the char `a' so special WRT char `1'?:

(defun foo (arg)
   (interactive "P")
   (pcase arg
     (1 (message "%s" "ARG was `1'"))
     (a (message "%s" "ARG was `a'"))
     ('- (message "%s" "ARG was minus-sign"))
     (_ (message "%s" "ARG not minus-sign"))))

The same thing that makes it different in "normal" Lisp code. 1 is read as an integer, not as a symbol.

Joost Kremers
Life has its moments

reply via email to

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