(completion-pcm--optimize-pattern): Turn multiple consecutive
occurrences of `any` into just a single one.
Suggested by Dario Gjorgjevski <dario.gjorgjevski@gmail.com>.
(let ((n '()))
(while p
(pcase p
- (`(,(or 'any 'any-delim) point . ,rest) (setq p `(point . ,rest)))
+ (`(,(or 'any 'any-delim) ,(or 'any 'point) . ,rest)
+ (setq p (cdr p)))
;; This is not just a performance improvement: it turns a
;; terminating `point' into an implicit `any', which affects
;; the final position of point (because `point' gets turned