aboutsummaryrefslogtreecommitdiff
path: root/chime.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-02-23 19:48:02 -0600
committerCraig Jennings <c@cjennings.net>2026-02-23 19:48:02 -0600
commit5ad1afe641f603cabdf9897349c102d9038fe82f (patch)
tree856fceb8914dc2bf0a43c050b002f99fe3213bc4 /chime.el
parente15b085a553f2b7799cb3a9d82e2977a64577b40 (diff)
downloadchime-5ad1afe641f603cabdf9897349c102d9038fe82f.tar.gz
chime-5ad1afe641f603cabdf9897349c102d9038fe82f.zip
Use locate-library fallback for sound file path resolution
Adds locate-library as a fallback between load-file-name and buffer-file-name for more robust path resolution in MELPA installs.
Diffstat (limited to 'chime.el')
-rw-r--r--chime.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/chime.el b/chime.el
index 7007fe0..6463ba9 100644
--- a/chime.el
+++ b/chime.el
@@ -492,7 +492,10 @@ When non-nil, plays the sound file specified in `chime-sound-file'."
(defcustom chime-sound-file
(expand-file-name "sounds/chime.wav"
- (file-name-directory (or load-file-name buffer-file-name)))
+ (file-name-directory
+ (or load-file-name
+ (locate-library "chime")
+ buffer-file-name)))
"Path to sound file to play when notifications are displayed.
Defaults to the bundled chime.wav file.
Set to nil to disable sound completely (no sound file, no beep).