diff options
author | Juri Linkov <juri@linkov.net> | 2019-10-30 00:31:11 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2019-10-30 00:31:11 +0200 |
commit | d7f62ce0cd58f6275bbf88925f3abbbd1db212a8 (patch) | |
tree | 4750df4d47ea051bdc4e5a99a4bc74d53fc4f19f /lisp/emacs-lisp/seq.el | |
parent | d3517de4b472ede7abaf3a552c5064be979e6eff (diff) | |
download | emacs-d7f62ce0cd58f6275bbf88925f3abbbd1db212a8.tar.gz emacs-d7f62ce0cd58f6275bbf88925f3abbbd1db212a8.tar.bz2 emacs-d7f62ce0cd58f6275bbf88925f3abbbd1db212a8.zip |
* lisp/tab-bar.el: Store point position and frame buffer-lists in tab.
* lisp/tab-bar.el (tab-bar--tab): Store additionally point-marker,
frame parameters buffer-list and buried-buffer-list, both for wc and ws.
Use seq-filter.
(tab-bar-select-tab): Restore point-marker after restoring
window-configuration. Also restore frame parameters buffer-list
and buried-buffer-list both for window-configuration and window-state.
(tab-bar-history-limit, tab-bar-history--minibuffer-depth): New variables.
(tab-bar-history-current): Rename from tab-bar-history--pre-change.
(tab-bar-history--pre-change): Set tab-bar-history-current.
(tab-bar--history-change): Use seq-take for tab-bar-history-limit.
(tab-bar-history-back, tab-bar-history-forward): Restore point-marker.
(tab-bar-list-noselect): Use seq-remove.
* lisp/emacs-lisp/seq.el (seq-take, seq-filter): Add autoload cookie.
Diffstat (limited to 'lisp/emacs-lisp/seq.el')
-rw-r--r-- | lisp/emacs-lisp/seq.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index 9a5872c094b..810b4792b2b 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el @@ -223,6 +223,7 @@ If N is a negative integer or zero, SEQUENCE is returned." (let ((length (seq-length sequence))) (seq-subseq sequence (min n length) length)))) +;;;###autoload (cl-defgeneric seq-take (sequence n) "Take the first N elements of SEQUENCE and return the result. The result is a sequence of the same type as SEQUENCE. @@ -306,6 +307,7 @@ list." (`list (seq--into-list sequence)) (_ (error "Not a sequence type name: %S" type)))) +;;;###autoload (cl-defgeneric seq-filter (pred sequence) "Return a list of all the elements for which (PRED element) is non-nil in SEQUENCE." (let ((exclude (make-symbol "exclude"))) |