[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 670c512: Remove unused internal function completion
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 670c512: Remove unused internal function completion-pcm--optimize-pattern |
Date: |
Fri, 17 May 2019 00:21:47 -0400 (EDT) |
branch: master
commit 670c5126a094f6c7d7043db62db36ed30fef84af
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
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 d11a5cf..ed610c1 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 "\\`"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 670c512: Remove unused internal function completion-pcm--optimize-pattern,
Lars Ingebrigtsen <=