commit:     778477df4be714c3dc02e04cb7e116b15167e83e
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 25 17:33:31 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Feb 25 17:33:31 2021 +0000
URL:        https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=778477df

Add subdirectories of the modules directory to load-path

* subdirs.el.in: Renamed from subdirs.el. Check for subdirectories
of the modules directory too.
* Makefile (DISTFILES): Update.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 ChangeLog     | 6 ++++++
 Makefile      | 4 ++--
 subdirs.el    | 3 ---
 subdirs.el.in | 8 ++++++++
 4 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d0cbd4a..55f4563 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-02-25  Ulrich Müller  <[email protected]>
+
+       * subdirs.el.in: Renamed from subdirs.el. Check for subdirectories
+       of the modules directory too.
+       * Makefile (DISTFILES): Update.
+
 2017-02-04  Ulrich Müller  <[email protected]>
 
        * Version 1.6 released.

diff --git a/Makefile b/Makefile
index 6fb696a..7c5bc2e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 2007-2017 Gentoo Authors
+# Copyright 2007-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2 or later
 
 PN = emacs-common-gentoo
@@ -13,7 +13,7 @@ ICONFILES = sink.png \
        emacs23_128.png emacs23.svg \
        emacs25_16.png emacs25_24.png emacs25_32.png emacs25_48.png \
        emacs25_128.png emacs25.svg
-DISTFILES = site-start.el site-gentoo.el subdirs.el $(DESKTOPFILES) \
+DISTFILES = site-start.el site-gentoo.el subdirs.el.in $(DESKTOPFILES) \
        $(addprefix icons/,COPYRIGHT.icons $(ICONFILES))
 
 

diff --git a/subdirs.el b/subdirs.el
deleted file mode 100644
index ee1c123..0000000
--- a/subdirs.el
+++ /dev/null
@@ -1,3 +0,0 @@
-;; -*- no-byte-compile: t -*-
-(if (fboundp 'normal-top-level-add-subdirs-to-load-path)
-    (normal-top-level-add-subdirs-to-load-path))

diff --git a/subdirs.el.in b/subdirs.el.in
new file mode 100644
index 0000000..3432bf0
--- /dev/null
+++ b/subdirs.el.in
@@ -0,0 +1,8 @@
+;; -*- no-byte-compile: t -*-
+(when (fboundp 'normal-top-level-add-subdirs-to-load-path)
+  (normal-top-level-add-subdirs-to-load-path)
+  ;; We install dynamic modules in a more FHS compliant location,
+  ;; so add its subdirectories to the load-path, too
+  (let ((default-directory "/usr/@libdir@/emacs/modules/"))
+    (if (file-directory-p default-directory)
+       (normal-top-level-add-subdirs-to-load-path))))

Reply via email to