X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/10598d75fc286e5662949aabb1c743b924a60ce2..27b6787d466dad36ec9b06cc1fa86c6e646e5350:/el/dot-emacs.el diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 1827993..d2eba21 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -358,6 +358,9 @@ so that it can be used for convenient filtering." (setenv "REAL_MOVEMAIL" try)) (setq path (cdr path))))) +(eval-after-load "erc" + '(load "~/.ercrc.el")) + ;;;-------------------------------------------------------------------------- ;;; Utility functions. @@ -2474,6 +2477,20 @@ strip numbers instead." (define-key term-raw-map [M-left] 'term-send-meta-left) (define-key term-raw-map [?\e ?\M-O ?D] 'term-send-meta-left))) +(defadvice term-exec (before program-args-list compile activate) + "If the PROGRAM argument is a list, interpret it as (PROGRAM . SWITCHES). +This allows you to pass a list of arguments through `ansi-term'." + (let ((program (ad-get-arg 2))) + (if (listp program) + (progn + (ad-set-arg 2 (car program)) + (ad-set-arg 4 (cdr program)))))) + +(defun ssh (host) + "Open a terminal containing an ssh session to the HOST." + (interactive "sHost: ") + (ansi-term (list "ssh" host) (format "ssh@%s" host))) + ;;;-------------------------------------------------------------------------- ;;; Inferior Emacs Lisp.