Skip to content

Commit

Permalink
emacs package setup hook: Fix Fix
Browse files Browse the repository at this point in the history
A trailing separator in emacs load paths has semantics

cc @Ericson2314 @adisbladis NixOS#73287

This partially reverts commit ca78249

(cherry picked from commit 42eeca7)
  • Loading branch information
bendlas authored and rycee committed Mar 30, 2020
1 parent 9f51146 commit 38081a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/build-support/emacs/setup-hook.sh
Original file line number Diff line number Diff line change
@@ -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
}

Expand Down

0 comments on commit 38081a1

Please sign in to comment.