summaryrefslogtreecommitdiff
blob: 5cb498015791346d64d7355be40bfa48dfa9e6f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 3c0aa84130e07cf69219adce8a3494e76977fc26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@gentoo.org>
Date: Tue, 18 Apr 2023 01:29:55 +0200
Subject: [PATCH] Try searching the whole load-path for jinx-mod

* jinx.el (jinx--load-module): Try to (locate-library module)
before trying to look for a sibling file of jinx.el.
---
https://github.com/minad/jinx/pull/42

 jinx.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/jinx.el b/jinx.el
index d0cf56d..e829d50 100644
--- a/jinx.el
+++ b/jinx.el
@@ -472,6 +472,11 @@ If VISIBLE is non-nil, only include visible overlays."
     (let ((default-directory
            (file-name-directory (locate-library "jinx.el" t)))
           (module (file-name-with-extension "jinx-mod" module-file-suffix)))
+
+      (let ((located-module (locate-library module)))
+            (when located-module
+              (setq module located-module)))
+
       (unless (file-exists-p module)
         (let ((command
                `("cc" "-I." "-O2" "-Wall" "-Wextra" "-fPIC" "-shared"
-- 
2.40.0