wisp
 
(Arne Babenhauserheide)
2013-03-22: added function with single-definition let.

added function with single-definition let.

diff --git a/tests/emacs-customization.w b/tests/emacs-customization.w
--- a/tests/emacs-customization.w
+++ b/tests/emacs-customization.w
@@ -16,3 +16,16 @@ add-hook 'outline-mode-hook
           lambda :
              require 'outline-magic
 
+
+defun find-file-as-root :
+  . "Like `ido-find-file, but automatically edit the file with
+root-privileges (using tramp/sudo), if the file is not writable by
+user."
+  interactive
+  let : : file : ido-read-file-name "Edit as root: "
+    unless : file-writable-p file
+      setq file : concat find-file-root-prefix file
+    find-file file
+
+;; or some other keybinding...
+;; (global-set-key (kbd "C-x F") 'djcb-find-file-as-root)