branch: master
commit 23ee54e10fd85a78921173395177809c0b5c6108
Author: Noam Postavsky <[email protected]>
Commit: Noam Postavsky <[email protected]>
Use destructive list functions in yas--s-a-p
`mapcar' already create a fresh list so there is no need to preserve it.
* yasnippet.el (yas--snippets-at-point): Use `delq' and `delete-dups'
instead of `remove' and `remove-duplicates`, respectively.
---
yasnippet.el | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index 9389719..b670aea 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -3044,11 +3044,11 @@ through the field's start point"
The most recently-inserted snippets are returned first."
(sort
- (remove nil (remove-duplicates (mapcar #'(lambda (ov)
- (overlay-get ov 'yas--snippet))
- (if all-snippets
- (overlays-in (point-min)
(point-max))
- (nconc (overlays-at (point))
(overlays-at (1- (point))))))))
+ (delq nil (delete-dups
+ (mapcar (lambda (ov) (overlay-get ov 'yas--snippet))
+ (if all-snippets (overlays-in (point-min) (point-max))
+ (nconc (overlays-at (point))
+ (overlays-at (1- (point))))))))
#'(lambda (s1 s2)
(<= (yas--snippet-id s2) (yas--snippet-id s1)))))