chiark / gitweb /
Merge branch 'master' of vampire:etc/profile
authorMark Wooding <mdw@distorted.org.uk>
Sun, 5 Jun 2011 10:47:36 +0000 (11:47 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 5 Jun 2011 10:47:36 +0000 (11:47 +0100)
* 'master' of vampire:etc/profile:
  dot/xinitrc: Shut down the Gnome session properly on exit.
  dot/xinitrc: Fiddle with window manager selection.
  dot/xinitrc: Run an early user hook script.
  setup: Modify URL for the FTP repository.
  mdw.conf: Use rĂ´le address for the default web cache.
  dot/bash_profile: Use `kbd_mode' to check for UTF-8 console.
  bin/sendmail-hack: Grim hack for Emacs to invoke sendmail.

dot/emacs

index 5081daf7201ebd3e39694f8c17f0f54dfead745f..d9b10358684bfde0f3f67056e04d17a6ee3d9908 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
      (let ((rootlyness (cond ((executable-find "really") "really")
                             ((executable-find "become") "become")
                             ((executable-find "sudo") "sudo")
-                            (t "su"))))
+                            (t "su")))
+          (this-host (concat "\\`\\(localhost\\|"
+                             (system-name) "\\|\\)\\'"))
+          (this-user (concat "\\`\\(" (user-login-name) "\\|"
+                             (user-real-login-name) "\\|\\)\\'")))
        (setq tramp-default-method-alist
-            `(("\\`\\(localhost\\|\\)\\'" "" ,rootlyness)
-              (nil "." ,rootlyness))))
-     (setq tramp-default-proxies-alist
-          `(("\\`\\(localhost\\|\\)\\'" nil nil)
-            (nil "\\`root\\'" "/ssh:%h:")))))
+            `((,this-host nil ,rootlyness)
+              (nil ,this-user "ssh")
+              (nil "." ,rootlyness)))
+       (setq tramp-default-proxies-alist
+            `((,this-host nil nil)
+              (nil "." "/ssh:%h:"))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; General fontification.