|
|
@ -265,8 +265,8 @@ buffer is not visiting a file." |
|
|
(defadvice ido-find-file (after find-file-sudo activate) |
|
|
(defadvice ido-find-file (after find-file-sudo activate) |
|
|
"Find file as root if necessary." |
|
|
"Find file as root if necessary." |
|
|
(unless (or (equal major-mode 'dired-mode) |
|
|
(unless (or (equal major-mode 'dired-mode) |
|
|
(and (buffer-file-name) |
|
|
|
|
|
(file-writable-p buffer-file-name))) |
|
|
|
|
|
|
|
|
(and (buffer-file-name) |
|
|
|
|
|
(file-writable-p buffer-file-name))) |
|
|
(find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name)))) |
|
|
(find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name)))) |
|
|
|
|
|
|
|
|
(defun prelude-switch-or-start (function buffer) |
|
|
(defun prelude-switch-or-start (function buffer) |
|
|
|