-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* seq.el: Update to version 1.8. * test/seq.el-test.el (test-seq-let): Update to version 1.8.
- Loading branch information
1 parent
ca6cb4f
commit ddbde5c
Showing
2 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
;; Author: Nicolas Petton <[email protected]> | ||
;; Keywords: sequences | ||
;; Version: 1.7 | ||
;; Version: 1.8 | ||
;; Package: seq | ||
|
||
;; Maintainer: [email protected] | ||
|
@@ -279,7 +279,7 @@ Equality is defined by TESTFN if non-nil or by `equal' if nil." | |
'())) | ||
|
||
(defun seq-difference (seq1 seq2 &optional testfn) | ||
"Return a list of th elements that appear in SEQ1 but not in SEQ2. | ||
"Return a list of the elements that appear in SEQ1 but not in SEQ2. | ||
Equality is defined by TESTFN if non-nil or by `equal' if nil." | ||
(seq-reduce (lambda (acc elt) | ||
(if (not (seq-contains-p seq2 elt testfn)) | ||
|
@@ -325,6 +325,16 @@ TYPE can be one of the following symbols: vector, string or list." | |
(`list (append seq nil)) | ||
(t (error "Not a sequence type name: %S" type)))) | ||
|
||
(defun seq-min (seq) | ||
"Return the smallest element of SEQ. | ||
SEQ must be a sequence of numbers or markers." | ||
(apply #'min (seq-into seq 'list))) | ||
|
||
(defun seq-max (seq) | ||
"Return the largest element of SEQ. | ||
SEQ must be a sequence of numbers or markers." | ||
(apply #'max (seq-into seq 'list))) | ||
|
||
(defun seq--drop-list (list n) | ||
"Return a list from LIST without its first N elements. | ||
This is an optimization for lists in `seq-drop'." | ||
|
@@ -442,7 +452,7 @@ If no element is found, return nil." | |
(unless (fboundp 'elisp--font-lock-flush-elisp-buffers) | ||
;; In Emacs≥25, (via elisp--font-lock-flush-elisp-buffers and a few others) | ||
;; we automatically highlight macros. | ||
(add-to-list 'emacs-lisp-mode-hook #'seq--activate-font-lock-keywords)) | ||
(add-hook 'emacs-lisp-mode-hook #'seq--activate-font-lock-keywords)) | ||
|
||
(provide 'seq) | ||
;;; seq.el ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters