diff options
author | Jonas Bernoulli <jonas@bernoul.li> | 2022-07-14 14:27:28 +0200 |
---|---|---|
committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-07-06 17:37:23 +0200 |
commit | b57fdc8fde91734b34b7ad1c2f1a06b46a1f5822 (patch) | |
tree | 61f3acba6f4f5e5e180e90ca19e8c7eb1631b219 | |
parent | e3dd43e247591e588f530ed15867766aa9cc9482 (diff) | |
download | geiser-b57fdc8fde91734b34b7ad1c2f1a06b46a1f5822.tar.gz geiser-b57fdc8fde91734b34b7ad1c2f1a06b46a1f5822.tar.bz2 |
geiser-elisp-dir: Fallback to buffer-file-name
This makes it possible to `eval-buffer' the buffer defining this
constant. Not that doing so makes all that much sense, but I tried
doing it before reading its content, because generally speaking that
is a sensible thing to do, at least for someone working on the code.
-rw-r--r-- | elisp/geiser.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/elisp/geiser.el b/elisp/geiser.el index b89148a..abcdb94 100644 --- a/elisp/geiser.el +++ b/elisp/geiser.el @@ -54,7 +54,8 @@ ;;; Locations: ;;;###autoload -(defconst geiser-elisp-dir (file-name-directory load-file-name) +(defconst geiser-elisp-dir + (file-name-directory (or load-file-name buffer-file-name)) "Directory containing Geiser's Elisp files.") |