summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-12-01 23:59:21 -0500
committerKyle Meyer <kyle@kyleam.com>2016-12-01 23:59:21 -0500
commit9383d7d979ab0f0cbf96a1522e3fb15d1ecc8b56 (patch)
treeff12acad43baec746b41f1c02181dae021c79525
parent9c77245b84463b647526ba75d9d89bc3159b1fea (diff)
downloademacs.d-9383d7d979ab0f0cbf96a1522e3fb15d1ecc8b56.tar.gz
Remove find-file-as-root command
helm-find-files has an action for this.
-rw-r--r--init.el1
-rw-r--r--lisp/km-files.el10
2 files changed, 0 insertions, 11 deletions
diff --git a/init.el b/init.el
index 1a841c0..1743f67 100644
--- a/init.el
+++ b/init.el
@@ -659,7 +659,6 @@
(bind-keys :map km/file-map
("j" . km/dired-jump-file-at-point)
("n" . km/rename-current-buffer-file)
- ("R" . km/find-file-as-root)
("t" . km/touch-buffer-file))
(bind-keys :map ctl-x-4-map
("r" . km/recentf-find-file-other-window)
diff --git a/lisp/km-files.el b/lisp/km-files.el
index 8c1f679..f342191 100644
--- a/lisp/km-files.el
+++ b/lisp/km-files.el
@@ -51,16 +51,6 @@
(delete-file (buffer-file-name))
(kill-this-buffer)))
-;; http://emacs-fu.blogspot.com/2013/03/editing-with-root-privileges-once-more.html
-;;;###autoload
-(defun km/find-file-as-root ()
- "Automatically edit file with root-privileges."
- (interactive)
- (let ((file (read-file-name "Edit as root: ")))
- (unless (file-writable-p file)
- (setq file (concat "/sudo:root@localhost:" file)))
- (find-file file)))
-
(declare-function dired-jump (&optional other-window file-name))
;;;###autoload
(defun km/dired-jump-file-at-point ()