help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: DWIM region


From: Emanuel Berg
Subject: Re: DWIM region
Date: Tue, 09 Jan 2018 05:11:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Stefan Monnier wrote:
          
>> `pcase' doesn't seem to do that?
>
> What makes you think so? It is not like CL's
> `case`.

Because I still don't get it to work!
Actually it doesn't even eval (see below).
For strings with the otherwise exact same
syntax, as far as my programmer's eyes can see
anyway, it does work.

(setq dummy-list '(4))
(pcase dummy-list
  ('(4)  1)
  ('(16) 2) ) ; (error "Unknown upattern `(quote (4))'") in pcase--u1

(setq dummy-string "Shamen knocking on the door")
(pcase dummy-string
  ("One two three four"          1)
  ("Shamen knocking on the door" 2) ) ; 2

> current-prefix-arg can also be a plain
> integer, so (car justify) can crash and burn.

(or (when (listp justify) (car justify)) justify)

?

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

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