emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/hyperdrive a15b96fe62 119/123: Remove: (hyperdrive-dir-del


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive a15b96fe62 119/123: Remove: (hyperdrive-dir-delete)
Date: Fri, 6 Oct 2023 01:01:14 -0400 (EDT)

branch: elpa/hyperdrive
commit a15b96fe620f37b6c5f61337b6ee994405480087
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Remove: (hyperdrive-dir-delete)
    
    Replaced by hyperdrive-delete.
---
 hyperdrive-dir.el | 25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 702497164a..e36e24219e 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -247,7 +247,8 @@ With point on header, returns directory entry."
   "w"   #'hyperdrive-dir-copy-url
   "d"   #'hyperdrive-download
   "^"   #'hyperdrive-up
-  "D"   #'hyperdrive-dir-delete
+  ;; TODO(doc): hyperdrive-dir-delete replaced by hyperdrive-delete
+  "D"   #'hyperdrive-delete
   "H"   #'hyperdrive-dir-history
   "o"   #'hyperdrive-dir-sort
   "?"   #'hyperdrive-menu
@@ -291,28 +292,6 @@ Interactively, opens file or directory at point in
   (interactive (list (hyperdrive-dir--entry-at-point)))
   (hyperdrive-copy-url entry))
 
-(defun hyperdrive-dir-delete (entry)
-  "Delete ENTRY."
-  (declare (modes hyperdrive-dir-mode))
-  (interactive (list (hyperdrive-dir--entry-at-point)))
-  (when (or (eq entry hyperdrive-current-entry)
-            (string= ".." (alist-get 'display-name
-                                     (hyperdrive-entry-etc entry))))
-    (hyperdrive-user-error "Won't delete from within"))
-  (pcase-let (((cl-struct hyperdrive-entry name) entry)
-              (buffer (current-buffer)))
-    (when (and (yes-or-no-p (format "Delete %S? " name))
-               (or (not (hyperdrive--entry-directory-p entry))
-                   (yes-or-no-p (format "Recursively delete %S? " name))))
-      (hyperdrive-delete entry
-        :then (lambda (_)
-                (when (buffer-live-p buffer)
-                  (with-current-buffer buffer
-                    (revert-buffer)))
-                (hyperdrive-message "Deleted: %S (Deleted files can be 
accessed from prior versions of the hyperdrive.)" name))
-        :else (lambda (plz-error)
-                (hyperdrive-message "Unable to delete: %S: %S" name 
plz-error))))))
-
 (declare-function hyperdrive-history "hyperdrive-history")
 
 (defun hyperdrive-dir-history (entry)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]