1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

New functions window-state-buffers and tab-bar-get-buffer-tab (bug#38354)

* lisp/window.el (window-state-buffers): New function.
* lisp/tab-bar.el (tab-bar-get-buffer-tab): New function.

* lisp/emacs-lisp/seq.el (seq-some): Add autoload cookie.

* lisp/desktop.el (desktop-buffers-not-to-save-function): New variable.
(desktop-save-buffer-p): Use it.
This commit is contained in:
Juri Linkov 2019-12-03 01:40:12 +02:00
parent 91762e49e1
commit 9a911b4af5
4 changed files with 59 additions and 2 deletions

View file

@ -946,7 +946,9 @@ which means to truncate VAR's value to at most MAX-SIZE elements
")\n"))))
;; ----------------------------------------------------------------------------
(defun desktop-save-buffer-p (filename bufname mode &rest _dummy)
(defvar desktop-buffers-not-to-save-function nil)
(defun desktop-save-buffer-p (filename bufname mode &rest rest)
"Return t if buffer should have its state saved in the desktop file.
FILENAME is the visited file name, BUFNAME is the buffer name, and
MODE is the major mode.
@ -970,6 +972,9 @@ MODE is the major mode.
(and (null filename)
(null dired-skip) ; bug#5755
(with-current-buffer bufname desktop-save-buffer)))
(or (null desktop-buffers-not-to-save-function)
(funcall desktop-buffers-not-to-save-function
filename bufname mode rest))
t)))
;; ----------------------------------------------------------------------------