mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 05:03:04 +00:00
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.
This commit is contained in:
parent
6c46878882
commit
23ee54e10f
10
yasnippet.el
10
yasnippet.el
@ -3044,11 +3044,11 @@ through the field's start point"
|
|||||||
|
|
||||||
The most recently-inserted snippets are returned first."
|
The most recently-inserted snippets are returned first."
|
||||||
(sort
|
(sort
|
||||||
(remove nil (remove-duplicates (mapcar #'(lambda (ov)
|
(delq nil (delete-dups
|
||||||
(overlay-get ov 'yas--snippet))
|
(mapcar (lambda (ov) (overlay-get ov 'yas--snippet))
|
||||||
(if all-snippets
|
(if all-snippets (overlays-in (point-min) (point-max))
|
||||||
(overlays-in (point-min) (point-max))
|
(nconc (overlays-at (point))
|
||||||
(nconc (overlays-at (point)) (overlays-at (1- (point))))))))
|
(overlays-at (1- (point))))))))
|
||||||
#'(lambda (s1 s2)
|
#'(lambda (s1 s2)
|
||||||
(<= (yas--snippet-id s2) (yas--snippet-id s1)))))
|
(<= (yas--snippet-id s2) (yas--snippet-id s1)))))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user