;;; Time-stamp: <2004-12-14 17:47:21 john> ;;; By John Sturdy (setq stack-trace-on-error t message-log-max t max-lisp-eval-depth 3000) ;;; This variable is used in substitute-in-file-name in lots of my elisp, ;;; it points to the stuff I have in common (and try to keep synchronized) ;;; on all the machines I use regularly. (or (stringp (getenv "COMMON")) (setenv "COMMON" (expand-file-name "~/common"))) ;; I would use load-directory here, except that here is where I load load-directory (let ((basics (substitute-in-file-name "$COMMON/emacs/basics"))) (mapcar (function (lambda (basic) (load-file (expand-file-name basic basics)))) '("version-patches.el" "host.el" "add-lispdir.el" "modes.el" "load-directory.el" "startup-messages.el" ))) ;; All these go onto my load-path for loading on demand either by autoload or by require (mapcar 'add-lispdir '("$COMMON/emacs" ; general "stuff", some of it for ; autoloading, will come in from here "$COMMON/emacs/playpen" ; stuff I'm still tinkering with "$COMMON/emacs/misc" "$COMMON/emacs/email" "$COMMON/emacs/editing" "$COMMON/emacs/elisp-dev-tools" "$COMMON/emacs/persistence" "$COMMON/emacs/appearance" "$COMMON/emacs/file-handling" "$COMMON/emacs/well-being" "$COMMON/emacs/natural-language" "$COMMON/emacs/research" "$COMMON/emacs/games" )) (if (string= (system-name) "MAYO") (add-lispdir "$COMMON/tmp")) ; missing file brought across from another system (load-file "$COMMON/emacs/host-setup.el") ; further setup may depend on what this finds (mapcar 'load-directory '("$COMMON/emacs/autoload" ; just lots of autoload stubs "$COMMON/emacs/mode-setups" ; these will typically trigger autoloads "$COMMON/emacs/startup" ; assorted things to start "~/.emacsrestore")) ; re-load saved state (preserve-startup-messages) (setq stack-trace-on-error nil message-log-max 200) (switch-to-buffer "*scratch*") (delete-other-windows) (message "Emacs is ready") ;;; end of ~jcgs/$COMMON/emacs/.emacs