From 670c5126a094f6c7d7043db62db36ed30fef84af Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 17 May 2019 06:21:37 +0200 Subject: [PATCH] Remove unused internal function completion-pcm--optimize-pattern * lisp/minibuffer.el (completion-pcm--optimize-pattern): Remove unused internal function (that signalled a compilation warning). --- lisp/minibuffer.el | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index d11a5cf574d..ed610c16ee3 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2971,28 +2971,6 @@ or a symbol, see `completion-pcm--merge-completions'." ;; It should be avoided properly, but it's so easy to remove it here. (delete "" (nreverse pattern))))) -(defun completion-pcm--optimize-pattern (p) - ;; Remove empty strings in a separate phase since otherwise a "" - ;; might prevent some other optimization, as in '(any "" any). - (setq p (delete "" p)) - (let ((n '())) - (while p - (pcase p - (`(,(and s1 (pred stringp)) ,(and s2 (pred stringp)) . ,rest) - (setq p (cons (concat s1 s2) rest))) - (`(,(and p1 (pred symbolp)) ,(and p2 (guard (eq p1 p2))) . ,_) - ;; Unused lexical variable warning due to body not using p1, p2. - ;; https://debbugs.gnu.org/16771 - (setq p (cdr p))) - (`(star ,(pred symbolp) . ,rest) (setq p `(star . ,rest))) - (`(,(pred symbolp) star . ,rest) (setq p `(star . ,rest))) - (`(point ,(or 'any 'any-delim) . ,rest) (setq p `(point . ,rest))) - (`(,(or 'any 'any-delim) point . ,rest) (setq p `(point . ,rest))) - (`(any ,(or 'any 'any-delim) . ,rest) (setq p `(any . ,rest))) - (`(,(pred symbolp)) (setq p nil)) ;Implicit terminating `any'. - (_ (push (pop p) n)))) - (nreverse n))) - (defun completion-pcm--pattern->regex (pattern &optional group) (let ((re (concat "\\`" -- 2.39.2