branch: externals/orderless
commit ac12bc4d54ea5ba9f909aaf3c2534b2968dcc745
Author: Omar Antolín <[email protected]>
Commit: Omar Antolín <[email protected]>
Unify calls to save-match-data
---
orderless.el | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/orderless.el b/orderless.el
index 0edb2bcfb4..08a2f41cd3 100644
--- a/orderless.el
+++ b/orderless.el
@@ -55,24 +55,24 @@
t))
(defun orderless-all-completions (string table pred _point)
- (let* ((limit (car (completion-boundaries string table pred "")))
- (prefix (substring string 0 limit))
- (all (all-completions prefix table pred))
- (regexps (save-match-data (split-string (substring string limit)))))
- (when minibuffer-completing-file-name
- (setq all (completion-pcm--filename-try-filter all)))
- (condition-case nil
- (progn
- (setq all
- (save-match-data
- (cl-loop for original in all
- for candidate = (copy-sequence original)
- when (cl-loop for regexp in regexps
- always (orderless-highlight-match
- regexp candidate))
- collect candidate)))
- (when all (nconc all (length prefix))))
- (invalid-regexp nil))))
+ (save-match-data
+ (let* ((limit (car (completion-boundaries string table pred "")))
+ (prefix (substring string 0 limit))
+ (all (all-completions prefix table pred))
+ (regexps (split-string (substring string limit))))
+ (when minibuffer-completing-file-name
+ (setq all (completion-pcm--filename-try-filter all)))
+ (condition-case nil
+ (progn
+ (setq all
+ (cl-loop for original in all
+ for candidate = (copy-sequence original)
+ when (cl-loop for regexp in regexps
+ always (orderless-highlight-match
+ regexp candidate))
+ collect candidate))
+ (when all (nconc all (length prefix))))
+ (invalid-regexp nil)))))
(defun orderless-try-completion (string table pred point &optional _metadata)
(let* ((limit (car (completion-boundaries string table pred "")))