emacs-31 3660bd3eb4f: vc-dir-delete-file: Call vc-delete-file on FILESET-ONLY-FILES

Sean Whitton <[email protected]>
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: emacs-31
commit 3660bd3eb4f1e0d3865c35f4b4f0b9b57f9c8f16
Author: Sean Whitton <[email protected]>
Commit: Sean Whitton <[email protected]>

    vc-dir-delete-file: Call vc-delete-file on FILESET-ONLY-FILES
    
    * lisp/vc/vc-dir.el (vc-dir-delete-file): Call vc-delete-file on
    FILESET-ONLY-FILES.  See bug#80998.
---
 lisp/vc/vc-dir.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 5d5aafac389..5408a89799e 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1100,7 +1100,10 @@ tracked by a VCS."
 The files will also be marked as deleted in the version control
 system."
   (interactive)
-  (vc-delete-file (or (vc-dir-marked-files) (vc-dir-current-file))))
+  (if-let* ((fileset-only-files
+             (nth 2 (vc-dir-deduce-fileset 'state-model-only-files))))
+      (vc-delete-file fileset-only-files)
+    (user-error "Nothing to delete here")))
 
 (defun vc-dir-find-file ()
   "Find the file on the current line."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.