base.scm 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. (define-module (lang elisp base)
  2. ;; Be pure. Nothing in this module requires symbols that map to the
  3. ;; standard Guile builtins, and it creates a problem if this module
  4. ;; has access to them, as @bind can dynamically change their values.
  5. ;; Transformer output always uses the values of builtin procedures
  6. ;; and macros directly.
  7. #:pure
  8. ;; {Elisp Primitives}
  9. ;;
  10. ;; In other words, Scheme definitions of elisp primitives. This
  11. ;; should (ultimately) include everything that Emacs defines in C.
  12. #:use-module (lang elisp primitives buffers)
  13. #:use-module (lang elisp primitives char-table)
  14. #:use-module (lang elisp primitives features)
  15. #:use-module (lang elisp primitives format)
  16. #:use-module (lang elisp primitives fns)
  17. #:use-module (lang elisp primitives guile)
  18. #:use-module (lang elisp primitives keymaps)
  19. #:use-module (lang elisp primitives lists)
  20. #:use-module (lang elisp primitives load)
  21. #:use-module (lang elisp primitives match)
  22. #:use-module (lang elisp primitives numbers)
  23. #:use-module (lang elisp primitives pure)
  24. #:use-module (lang elisp primitives read)
  25. #:use-module (lang elisp primitives signal)
  26. #:use-module (lang elisp primitives strings)
  27. #:use-module (lang elisp primitives symprop)
  28. #:use-module (lang elisp primitives syntax)
  29. #:use-module (lang elisp primitives system)
  30. #:use-module (lang elisp primitives time)
  31. ;; Now switch into Emacs Lisp syntax.
  32. #:use-syntax (lang elisp transform))
  33. ;;; Everything below here is written in Elisp.
  34. (defun load-emacs (&optional new-load-path debug)
  35. (if debug (message "load-path: %s" load-path))
  36. (cond (new-load-path
  37. (message "Setting load-path to: %s" new-load-path)
  38. (setq load-path new-load-path)))
  39. (if debug (message "load-path: %s" load-path))
  40. (scheme (read-set! keywords 'prefix))
  41. (message "Calling loadup.el to clothe the bare Emacs...")
  42. (load "loadup.el")
  43. (message "Guile Emacs now fully clothed"))