Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 25 lines 750 B view raw
1addToEmacsLoadPath() { 2 local lispDir="$1" 3 if [[ -d $lispDir && ${EMACSLOADPATH-} != *"$lispDir":* ]] ; then 4 # It turns out, that the trailing : is actually required 5 # see https://www.gnu.org/software/emacs/manual/html_node/elisp/Library-Search.html 6 export EMACSLOADPATH="$lispDir:${EMACSLOADPATH-}" 7 fi 8} 9 10addToEmacsNativeLoadPath() { 11 local nativeDir="$1" 12 if [[ -d $nativeDir && ${EMACSNATIVELOADPATH-} != *"$nativeDir":* ]]; then 13 export EMACSNATIVELOADPATH="$nativeDir:${EMACSNATIVELOADPATH-}" 14 fi 15} 16 17addEmacsVars () { 18 addToEmacsLoadPath "$1/share/emacs/site-lisp" 19 20 if [ -n "${addEmacsNativeLoadPath:-}" ]; then 21 addToEmacsNativeLoadPath "$1/share/emacs/native-lisp" 22 fi 23} 24 25addEnvHooks "$targetOffset" addEmacsVars