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

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

[nongnu] elpa/hyperdrive f9e2623048 05/14: Add: (hyperdrive-dir-view-fil


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive f9e2623048 05/14: Add: (hyperdrive-dir-view-file) View file from hyperdrive-dir-mode
Date: Wed, 6 Sep 2023 04:00:02 -0400 (EDT)

branch: elpa/hyperdrive
commit f9e2623048f62917913800e615de15d7a3d7b2e2
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Add: (hyperdrive-dir-view-file) View file from hyperdrive-dir-mode
---
 hyperdrive-dir.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index ce2ba3351b..840597f83e 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -199,6 +199,7 @@ With point on header, returns directory entry."
   :doc "Local keymap for `hyperdrive-dir-mode' buffers."
   "RET" #'hyperdrive-dir-find-file
   "f"   #'hyperdrive-find-file ;; Alternatively, define new function which 
fills in name of entry at point.
+  "v"   #'hyperdrive-dir-view-file
   "j"   #'imenu
   "w"   #'hyperdrive-dir-copy-url
   "d"   #'hyperdrive-dir-download-file
@@ -229,6 +230,15 @@ Interactively, visit file or directory at point in
   (interactive (list (hyperdrive-dir--entry-at-point)))
   (hyperdrive-open entry))
 
+(declare-function hyperdrive-view-file "hyperdrive")
+(defun hyperdrive-dir-view-file (entry)
+  "Open hyperdrive ENTRY at point in `view-mode'.
+Interactively, opens file or directory at point in
+`hyperdrive-dir' buffer."
+  (declare (modes hyperdrive-dir-mode))
+  (interactive (list (hyperdrive-dir--entry-at-point)))
+  (hyperdrive-view-file entry))
+
 (declare-function hyperdrive-copy-url "hyperdrive")
 
 (defun hyperdrive-dir-copy-url (entry)



reply via email to

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