|
From: | Basil L. Contovounesios |
Subject: | bug#32372: [PATCH] Add "uuid" to thing-at-point.el |
Date: | Tue, 07 Aug 2018 20:45:54 +0300 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Ivan Shmakov <ivan@siamics.net> writes: >>>>>> Raimon Grau <raimon@konghq.com> writes: > > + > > +(put 'uuid 'bounds-of-thing-at-point > > + (lambda () > > + (let ((thing (thing-at-point-looking-at > > + thing-at-point-uuid-regexp 36))) > > + (if thing > > + (let ((beginning (match-beginning 0)) > > + (end (match-end 0))) > > + (cons beginning end)))))) > > Why not simplify to (cons (match-beginning 0) (match-end 0))? If you're in the business of simplifying, why not take it all the way: (and (thing-at-point-looking-at thing-at-point-uuid-regexp 36) (cons (match-beginning 0) (match-end 0))) -- Basil
[Prev in Thread] | Current Thread | [Next in Thread] |