diff options
author | Juri Linkov <juri@linkov.net> | 2019-12-03 01:40:12 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2019-12-03 01:40:12 +0200 |
commit | 9a911b4af50fdfef308aab8e2492392f0986580b (patch) | |
tree | a1a6b21e9065936f12d479b61c76bed89e22065d /lisp/desktop.el | |
parent | 91762e49e10949a1f54a1bab78555e196e75d9ea (diff) | |
download | emacs-9a911b4af50fdfef308aab8e2492392f0986580b.tar.gz |
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.
Diffstat (limited to 'lisp/desktop.el')
-rw-r--r-- | lisp/desktop.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el index 498f769bd32..6f45278218c 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -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))) ;; ---------------------------------------------------------------------------- |