From 8619e0de6bdfcd9344fd96b0346672e6681411e8 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 15 Mar 2025 16:03:38 +0800 Subject: [PATCH] New project-save-some-buffers command * lisp/progmodes/project.el (project-save-some-buffers): New command. (project-prefix-map): Bind it to C-x p C-x s. * etc/NEWS: Announce the new command and binding. (cherry picked from commit db0bed7a68cd2308eba61247a6a77f73533ffef6) --- lisp/progmodes/project.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index a0edb177584..169f6156f5c 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -902,6 +902,7 @@ DIRS must contain directory names." (define-key map "o" 'project-any-command) (define-key map "\C-b" 'project-list-buffers) (define-key map "`" 'project-go-to-diagnostic) + (define-key map "\C-xs" 'project-save-some-buffers) map) "Keymap for project commands.") @@ -1755,6 +1756,12 @@ Also see the `project-kill-buffers-display-buffer-list' variable." ((funcall query-user) (mapc #'kill-buffer bufs))))) +;;;###autoload +(defun project-save-some-buffers (arg) + "Like `save-some-buffers', but only for this project's buffers." + (interactive "P") + (save-some-buffers arg (save-some-buffers-root))) + ;;; Project list -- 2.39.5