emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 23ee54e 44/60: Use destructive list functions in yas--s-a-


From: João Távora
Subject: [elpa] master 23ee54e 44/60: Use destructive list functions in yas--s-a-p
Date: Thu, 21 Jan 2016 22:36:04 +0000

branch: master
commit 23ee54e10fd85a78921173395177809c0b5c6108
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    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)))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]