projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
643e0b8
)
* lisp/emacs-lisp/seq.el (seq-drop): Better list implementation
author
Nicolas Petton
<nicolas@petton.fr>
Sun, 12 Jun 2016 10:37:16 +0000
(12:37 +0200)
committer
Nicolas Petton
<nicolas@petton.fr>
Sun, 12 Jun 2016 10:41:42 +0000
(12:41 +0200)
lisp/emacs-lisp/seq.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/seq.el
b/lisp/emacs-lisp/seq.el
index 92f0ad78566c78cfa46f38cd77b8c09f6bdb6ae3..166e886fd80b5145ed59414abad73e752f9e13da 100644
(file)
--- a/
lisp/emacs-lisp/seq.el
+++ b/
lisp/emacs-lisp/seq.el
@@
-4,7
+4,7
@@
;; Author: Nicolas Petton <nicolas@petton.fr>
;; Keywords: sequences
-;; Version: 2.1
4
+;; Version: 2.1
6
;; Package: seq
;; Maintainer: emacs-devel@gnu.org
@@
-471,10
+471,7
@@
If no element is found, return nil."
(cl-defmethod seq-drop ((list list) n)
"Optimized implementation of `seq-drop' for lists."
- (while (and list (> n 0))
- (setq list (cdr list)
- n (1- n)))
- list)
+ (nthcdr n list))
(cl-defmethod seq-take ((list list) n)
"Optimized implementation of `seq-take' for lists."