emacs package setup hook: Fix Fix

A trailing separator in emacs load paths has semantics

cc @Ericson2314 @adisbladis https://github.com/NixOS/nixpkgs/pull/73287

This partially reverts commit ca782498a9
This commit is contained in:
Herwig Hochleitner 2019-11-23 19:41:24 +01:00
parent c3a0db00aa
commit 42eeca722c

View File

@ -1,6 +1,8 @@
addEmacsVars () {
if [[ -d "$1/share/emacs/site-lisp" ]]; then
export EMACSLOADPATH="$1/share/emacs/site-lisp${EMACSLOADPATH:+:}${EMACSLOADPATH-}"
if test -d $1/share/emacs/site-lisp; then
# it turns out, that the trailing : is actually required
# see https://www.gnu.org/software/emacs/manual/html_node/elisp/Library-Search.html
export EMACSLOADPATH="$1/share/emacs/site-lisp:${EMACSLOADPATH-}"
fi
}