mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
* 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.
This commit is contained in:
parent
d3517de4b4
commit
d7f62ce0cd
2 changed files with 95 additions and 37 deletions
|
|
@ -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")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue