# HG changeset patch # User Lucas Levrel # Date 1452201204 -3600 # Node ID 11ab1ba10fc3b9a41be296c61768cfb3433a048e # Parent 427ce0d8b0568c63478fab7953151d2e93da12a7 emacs: improve site-start.el diff -r 427ce0d8b056 -r 11ab1ba10fc3 emacs/receipt --- a/emacs/receipt Thu Jan 07 00:53:23 2016 +0000 +++ b/emacs/receipt Thu Jan 07 22:13:24 2016 +0100 @@ -164,9 +164,10 @@ # Install specific site file echo -n "Installing specific SliTaz file" cp -a $install/usr/share/$PACKAGE/$VERSION/site-lisp \ - $fs/usr/share/$PACKAGE && \ + $fs/usr/share/$PACKAGE && \ mkdir -p $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \ - cp -a $stuff/default.el $fs/usr/share/$PACKAGE/site-lisp && \ + cp -a $stuff/default.el $stuff/site-start.el \ + $fs/usr/share/$PACKAGE/site-lisp && \ cp -a $stuff/90-slitaz.el \ $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \ status @@ -184,21 +185,6 @@ post_install() { - cd "$1/usr/share/$PACKAGE/$VERSION/site-lisp" - cat <<-EOF >site-start.el - ;; site-start.el for SliTaz -*- no-byte-compile: t -*- - ;; - ;; (C) GNU gpl v3 - SliTaz GNU/Linux 2009. - ;; - ;; This default site startup file for Emacs was created by tazpkg - ;; reconfigure emacs. You may modify this file, replace it by your - ;; own site initialisation, or even remove it completely. - ;; - EOF - START_FILES="$(ls site-start.d/ | sort)" - for file in $START_FILES; do - cat site-start.d/$file >> site-start.el - done # linking /usr/bin/emacs to new version [ -h "$1/usr/bin/emacs" ] && rm -f "$1/usr/bin/emacs" ln -s /usr/bin/emacs-$VERSION "$1/usr/bin/emacs" @@ -209,4 +195,4 @@ rm -rf "$1/usr/share/emacs" rm -rf "$1/usr/lib/emacs" rm -f "$1/usr/bin/emacs" -} \ No newline at end of file +} diff -r 427ce0d8b056 -r 11ab1ba10fc3 emacs/stuff/site-start.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emacs/stuff/site-start.el Thu Jan 07 22:13:24 2016 +0100 @@ -0,0 +1,12 @@ +;; site-start.el for SliTaz -*- no-byte-compile: t -*- +;; +;; (C) GNU gpl v3 - SliTaz GNU/Linux 2009. +;; +;; Default site startup file for Emacs. You may modify this file, replace it by +;; your own site initialisation, or even remove it completely. +;; +;; Load package startups in this site-start.d folder +(if (file-accessible-directory-p "/usr/share/emacs/site-lisp/site-start.d") + (let ((dir (directory-files "/usr/share/emacs/site-lisp/site-start.d/" t + ".\\.el$"))) + (while dir (load (car dir) nil t t) (setq dir (cdr dir)))))