public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Peter Oliver <git@mavit.org.uk>
To: git-commits@fedoraproject.org
Subject: [rpms/emacs] rawhide: Provide a `default.d` directory, similar to `site-start.d`.
Date: Wed, 11 Nov 2026 13:30:44 GMT [thread overview]
Message-ID: <179440384411.1.7303480672333017586.rpms-emacs-7ff4b4d503e6@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/emacs
Branch : rawhide
Commit : 7ff4b4d503e6128ec6323fe1ade128999d7b9a3f
Author : Peter Oliver <git@mavit.org.uk>
Date : 2026-11-11T13:14:07+00:00
Stats : +57/-19 in 5 file(s)
URL : https://src.fedoraproject.org/rpms/emacs/c/7ff4b4d503e6128ec6323fe1ade128999d7b9a3f?branch=rawhide
Log:
Provide a `default.d` directory, similar to `site-start.d`.
---
diff --git a/default.el b/default.el
deleted file mode 100644
index 39b8141..0000000
--- a/default.el
+++ /dev/null
@@ -1,11 +0,0 @@
-;;; default.el --- loaded after ".emacs" on startup -*- lexical-binding: t -*-
-
-;;; Commentary:
-;;
-;; Setting `inhibit-default-init' non-nil in "~/.emacs"
-;; prevents loading of this file. Also the "-q" option to "emacs"
-;; prevents both "~/.emacs" and this file from being loaded at startup.
-
-;;; Code:
-
-;;; default.el ends here
diff --git a/default.el.in b/default.el.in
new file mode 100644
index 0000000..58d65ec
--- /dev/null
+++ b/default.el.in
@@ -0,0 +1,22 @@
+;;; default.el --- loaded after ".emacs" on startup -*- lexical-binding: t -*-
+
+;;; Commentary:
+;;
+;; Load *.el and *.elc in @_emacs_defaultdir@ on startup.
+;;
+;; Setting `inhibit-default-init' non-nil in "~/.emacs"
+;; prevents loading of this file. Also the "-q" option to "emacs"
+;; prevents both "~/.emacs" and this file from being loaded at startup.
+
+;;; Code:
+
+(dolist
+ (file
+ (delete-dups
+ (mapcar 'file-name-sans-extension
+ (directory-files
+ "@_emacs_defaultdir@" t "\\.elc?\\'"))))
+ (let ((inhibit-message t))
+ (load file nil nil nil t)))
+
+;;; default.el ends here
diff --git a/emacs.spec b/emacs.spec
index a955616..5a0435a 100644
--- a/emacs.spec
+++ b/emacs.spec
@@ -38,8 +38,8 @@ Source102: https://keys.openpgp.org/vks/v1/by-fingerprint/12BB9B400EE3F77282
Source103: https://keys.openpgp.org/vks/v1/by-fingerprint/8DC2487E51ABDD90B5C4753F0F56D0553B6D411B
Source4: dotemacs.el
-Source5: site-start.el
-Source6: default.el
+Source5: site-start.el.in
+Source6: default.el.in
Source9: emacs-desktop.sh.in
Source10: emacs_lisp.attr
@@ -156,6 +156,7 @@ BuildRequires: util-linux
%define site_lisp %{_datadir}/emacs/site-lisp
%define site_start_d %{site_lisp}/site-start.d
+%define default_d %{site_lisp}/default.d
%define pkgconfig %{_datadir}/pkgconfig
%define emacs_libexecdir %{_libexecdir}/emacs/%{version}/%{_host}
%define native_lisp %{_libdir}/emacs/%{version}/native-lisp
@@ -292,7 +293,7 @@ License: GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND BSD-3-Cl
Requires(preun): /usr/sbin/alternatives
Requires(posttrans): /usr/sbin/alternatives
Requires: /usr/bin/readlink
-Requires: %{name}-filesystem >= 1:30.2
+Requires: %{name}-filesystem >= 1:31.2
Requires: emacsclient
Requires: libgccjit
Recommends: emacs = %{epoch}:%{version}-%{release}
@@ -507,6 +508,7 @@ cd ..
cat > emacs.pc << EOF
sitepkglispdir=%{site_lisp}
sitestartdir=%{site_start_d}
+defaultdir=%{default_d}
Name: emacs
Description: GNU Emacs text editor
@@ -521,6 +523,7 @@ cat > macros.emacs << EOF
%%_emacs_archsitelispdir %%{_libdir}/emacs/site-lisp
%%_emacs_sitelispdir %{site_lisp}
%%_emacs_sitestartdir %{site_start_d}
+%%_emacs_defaultdir %{default_d}
%%_emacs_bytecompile(W) /usr/bin/emacs --batch --no-site-file --eval '(push nil load-path)' %%{-W:--eval '(setq byte-compile-error-on-warn t)' }-f batch-byte-compile %%*
%%_emacs_package_install /usr/bin/emacs --batch --eval '(let ((package-user-dir "%%{buildroot}%%{_emacs_sitelispdir}/elpa")) (package-install-file (or (pop argv) default-directory)))'
EOF
@@ -551,6 +554,8 @@ cat > 10-source-directory.el << 'EOF'
;;; 10-source-directory.el ends here
EOF
+sed -e 's|@_emacs_sitestartdir@|%{site_start_d}|' %SOURCE5 > site-start.el
+sed -e 's|@_emacs_defaultdir@|%{default_d}|' %SOURCE6 > default.el
sed -e 's|@bindir@|%{_bindir}|' %SOURCE9 > emacs-desktop.sh
@@ -610,11 +615,12 @@ chmod 755 %{buildroot}%{emacs_libexecdir}/movemail
mkdir -p \
%{buildroot}%{_datadir}/%{name}/%{version}/site-lisp/elpa \
%{buildroot}%{site_lisp} \
- %{buildroot}%{site_start_d}
-install -p -m 0644 %SOURCE5 %{buildroot}%{site_lisp}/site-start.el
-install -p -m 0644 %SOURCE6 %{buildroot}%{site_lisp}
+ %{buildroot}%{site_start_d} \
+ %{buildroot}%{default_d}
+install -p -m 0644 site-start.el %{buildroot}%{site_lisp}/
install -p -m 0644 00-dynamic-module-dir.el %{buildroot}%{site_start_d}/
install -p -m 0644 10-source-directory.el %{buildroot}%{site_start_d}/
+install -p -m 0644 default.el %{buildroot}%{site_lisp}/
# Default initialization file
mkdir -p %{buildroot}%{_sysconfdir}/skel
diff --git a/site-start.el b/site-start.el
index 1065ba0..ea90582 100644
--- a/site-start.el
+++ b/site-start.el
@@ -2,7 +2,10 @@
;;; Commentary:
;;
-;; Load *.el and *.elc in /usr/share/emacs/site-lisp/site-start.d on startup
+;; Load *.el and *.elc in @_emacs_sitestartdir@ on startup.
+;;
+;; The -Q option to "emacs" prevents this and other files from being
+;; loaded at startup.
;;; Code:
@@ -11,7 +14,7 @@
(delete-dups
(mapcar 'file-name-sans-extension
(directory-files
- "/usr/share/emacs/site-lisp/site-start.d" t "\\.elc?\\'"))))
+ "@_emacs_sitestartdir@" t "\\.elc?\\'"))))
(let ((inhibit-message t))
(load file nil nil nil t)))
diff --git a/site-start.el.in b/site-start.el.in
new file mode 100644
index 0000000..2a99de9
--- /dev/null
+++ b/site-start.el.in
@@ -0,0 +1,18 @@
+;;; site-start.el --- loaded before user's ".emacs" file and default.el -*- lexical-binding: t -*-
+
+;;; Commentary:
+;;
+;; Load *.el and *.elc in @_emacs_sitestartdir@ on startup
+
+;;; Code:
+
+(dolist
+ (file
+ (delete-dups
+ (mapcar 'file-name-sans-extension
+ (directory-files
+ "@_emacs_sitestartdir@" t "\\.elc?\\'"))))
+ (let ((inhibit-message t))
+ (load file nil nil nil t)))
+
+;;; site-start.el ends here
reply other threads:[~2026-11-11 13:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179440384411.1.7303480672333017586.rpms-emacs-7ff4b4d503e6@fedoraproject.org \
--to=git@mavit.org.uk \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox