My attempt to optimize my emacs load time <1 second
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
821 B

5 years ago
5 years ago
5 years ago
5 years ago
  1. ;;; 03-custom-binds --- A set of custom key bindings
  2. ;;; Commentary:
  3. ;;; Code:
  4. (defvar my-term-shell "/bin/bash" "My preferred choice of shell.")
  5. (defadvice ansi-term (before force-bash)
  6. "Open an interactive ansi-terminal that defaults to bash."
  7. (interactive (list my-term-shell)))
  8. ;; (ad-activate 'ansi-term)
  9. ;; Get shell env vars.
  10. (let ((path (shell-command-to-string ". /home/leothelocust/.bashrc; echo -n $PATH")))
  11. (setenv "PATH" (concat path ":/usr/local/bin"))
  12. (setq exec-path
  13. (append
  14. (split-string-and-unquote (concat path ":/usr/local/bin") ":")
  15. exec-path)))
  16. (bind-key "<M-return>" 'eshell)
  17. (bind-key "<C-M-return>" 'ansi-term)
  18. (bind-key "C-c R" '(lambda () (interactive) (load-file user-init-file)))
  19. (provide '03-custom-binds)
  20. ;;; 03-custom-binds.el ends here