From 28e8745b579da5f83afc7f9eb5b5ed2df2f3204e Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Sat, 26 Aug 2023 00:50:28 -0700 Subject: [PATCH] Pass PRED to each of save-some-buffers-functions * lisp/abbrev.el (abbrev--possibly-save): Ignore PRED * lisp/files.el (save-some-buffers-functions): Fix documentation (save-some-buffers): Pass PRED to each of save-some-buffers-functions --- lisp/abbrev.el | 2 +- lisp/files.el | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/abbrev.el b/lisp/abbrev.el index e1311dbc83b..43e7c7e5e5d 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -1242,7 +1242,7 @@ which see." '(edit-abbrevs-mode-font-lock-keywords nil nil ((?_ . "w")))) (setq font-lock-multiline nil)) -(defun abbrev--possibly-save (query &optional arg) +(defun abbrev--possibly-save (query &optional arg _pred) ;; Query mode. (if (eq query 'query) (and save-abbrevs abbrevs-changed) diff --git a/lisp/files.el b/lisp/files.el index 29d109ab385..6ab10cc3310 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6003,8 +6003,8 @@ function should return non-nil if there is something to be saved (but it should not actually save anything). If the first argument is something else, then the function should -save according to the value of the second argument, which is the -ARG argument from `save-some-buffers'.") +save according to the values of the second and third arguments, +which are the ARG and PRED arguments from `save-some-buffers'.") (defun save-some-buffers (&optional arg pred) "Save some modified file-visiting buffers. Asks user about each one. @@ -6099,7 +6099,7 @@ after saving the buffers." save-some-buffers-action-alist)) ;; Allow other things to be saved at this time, like abbrevs. (dolist (func save-some-buffers-functions) - (setq inhibit-message (or (funcall func nil arg) inhibit-message))) + (setq inhibit-message (or (funcall func nil arg pred) inhibit-message))) (or queried (> files-done 0) inhibit-message (cond ((null autosaved-buffers) -- 2.41.0