X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/be325acf70bdbded6d86aa491720d39657fd2e73..c60cbbe8c902c3bd56a093e5479de4f7855e464f:/dot/emacs diff --git a/dot/emacs b/dot/emacs index 5aa8918..faae519 100644 --- a/dot/emacs +++ b/dot/emacs @@ -23,6 +23,7 @@ (setq load-path (nconc load-path (list "~/lib/emacs"))) (require 'dot-emacs) +(require 'cl) ;;;-------------------------------------------------------------------------- ;;; Some random initialisation. @@ -126,10 +127,11 @@ ;; ---- Some mail and news configuration --- -(setq mail-from-style 'parens) -(setq mail-signature t) -(setq mail-yank-prefix "> ") -(setq mail-archive-file-name "~/Mail/sent") +(setq mail-from-style 'parens + mail-signature t + mail-yank-prefix "> " + mail-archive-file-name "~/Mail/sent" + compose-mail-user-agent-warnings nil) (setq rmail-display-summary t) (setq rmail-file-name "~/Mail/rmail") @@ -141,6 +143,7 @@ (setq message-signature-separator "^-- \\(\\|\\[mdw\\]\\)$" message-yank-prefix "> " message-yank-cited-prefix "> " + message-send-mail-function 'message-send-mail-with-sendmail message-indent-citation-function '(message-indent-citation mdw-trim-spaces-after-citing)) @@ -240,6 +243,9 @@ (setq ispell-program-name "aspell-hack" ispell-local-dictionary "en_GB-ize-w_accents" flyspell-default-dictionary "en_GB-ize-w_accents" + ispell-local-dictionary-alist + '(("en_GB-ize-w_accents" "[[:alpha:]]" "[^[:alpha:]]" "'" t + ("-d" "en_GB-ize-w_accents") nil utf-8)) ispell-silently-savep t) (trap (require 'uniquify) @@ -595,11 +601,21 @@ (tramp-remote-sh "/bin/sh")) ,@tramp-methods))) (setq tramp-default-method "ssh") - (setq tramp-default-method-alist - `(("\\`\\(localhost\\|\\)\\'" "" - ,(cond ((executable-find "become") "become") - ((executable-find "really") "really") - (t "su"))))))) + (let ((rootlyness (cond ((executable-find "really") "really") + ((executable-find "become") "become") + ((executable-find "sudo") "sudo") + (t "su"))) + (this-host (concat "\\`\\(localhost\\|" + (system-name) "\\|\\)\\'")) + (this-user (concat "\\`\\(" (user-login-name) "\\|" + (user-real-login-name) "\\|\\)\\'"))) + (setq tramp-default-method-alist + `((,this-host nil ,rootlyness) + (nil ,this-user "ssh") + (nil "." ,rootlyness))) + (setq tramp-default-proxies-alist + `((,this-host nil nil) + (nil "." "/ssh:%h:")))))) ;;;-------------------------------------------------------------------------- ;;; General fontification.