find-file-sudo interactive

This commit is contained in:
MitchMarq42 2023-04-14 11:36:30 -08:00
parent 0f42657983
commit 02e35d83f0

View File

@ -51,6 +51,7 @@
(expand-file-name "tramp-history" backup-directory))
:config
(defun find-file-sudo (&rest throwaway)
(interactive)
(if buffer-file-name
(unless (or (file-writable-p buffer-file-name)
(file-directory-p buffer-file-name))