Add scouts honor escape hatch for source embedding

This commit is contained in:
Justine Tunney 2020-06-15 19:01:28 -07:00
parent c91b3c5006
commit b4269930f7
547 changed files with 1516 additions and 944 deletions

17
tool/scripts/configure-emacs.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
if ! [ -e ape/ape.S ]; then
echo please cd to cosmopolitan root directory >&2
exit 1
fi
COSMOPOLITAN="$PWD"
EMACSCONFIGS="$HOME/.emacs.d/init.el"
[ -e "$EMACSCONFIGS" ] || EMACSCONFIGS="$HOME/.emacs"
cat >>"$EMACSCONFIGS" <<EOF # idempotent
(let ((path "$COSMOPOLITAN/tool/emacs"))
(when (file-directory-p path)
(add-to-list 'load-path path)
(require 'cosmo)))
EOF