X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/e0e2aca3a66ce69153d52e2c0625dd5be58bcbd0..2c49e0816cc0cbf93d5763f962cc46f07eb70ffb:/el/dot-emacs.el diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 3372556..c51803b 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -1940,8 +1940,7 @@ strip numbers instead." ;;;-------------------------------------------------------------------------- ;;; Erlang configuration. -(setq erlang-electric-commannds - '(erlang-electric-newline erlang-electric-semicolon)) +(setq erlang-electric-commands nil) (defun mdw-fontify-erlang () @@ -2136,13 +2135,21 @@ strip numbers instead." (save-match-data (replace-regexp-in-string "\\..*$" "" (system-name))) " " - (eshell/pwd) + (let* ((pwd (eshell/pwd)) (npwd (length pwd)) + (home (expand-file-name "~")) (nhome (length home))) + (if (and (>= npwd nhome) + (or (= nhome npwd) + (= (elt pwd nhome) ?/) + (string= (substring pwd 0 nhome) home))) + (concat "~" (substring pwd (length home))) + pwd)) right))) (setq eshell-prompt-function 'mdw-eshell-prompt) (setq eshell-prompt-regexp "^\\[[^]>]+\\(\\]\\|>>?\\)") -(defalias 'eshell/e 'find-file) -(defalias 'eshell/w3m 'w3m-goto-url) +(defun eshell/e (file) (find-file file) nil) +(defun eshell/ee (file) (find-file-other-window file) nil) +(defun eshell/w3m (url) (w3m-goto-url url) nil) (mdw-define-face eshell-prompt (t :weight bold)) (mdw-define-face eshell-ls-archive (t :weight bold :foreground "red"))