wok-6.x rev 18794
emacs: improve site-start.el
author | Lucas Levrel <llevrel@yahoo.fr> |
---|---|
date | Thu Jan 07 22:13:24 2016 +0100 (2016-01-07) |
parents | 427ce0d8b056 |
children | 4464f66eb0d2 |
files | emacs/receipt emacs/stuff/site-start.el |
line diff
1.1 --- a/emacs/receipt Thu Jan 07 00:53:23 2016 +0000 1.2 +++ b/emacs/receipt Thu Jan 07 22:13:24 2016 +0100 1.3 @@ -164,9 +164,10 @@ 1.4 # Install specific site file 1.5 echo -n "Installing specific SliTaz file" 1.6 cp -a $install/usr/share/$PACKAGE/$VERSION/site-lisp \ 1.7 - $fs/usr/share/$PACKAGE && \ 1.8 + $fs/usr/share/$PACKAGE && \ 1.9 mkdir -p $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \ 1.10 - cp -a $stuff/default.el $fs/usr/share/$PACKAGE/site-lisp && \ 1.11 + cp -a $stuff/default.el $stuff/site-start.el \ 1.12 + $fs/usr/share/$PACKAGE/site-lisp && \ 1.13 cp -a $stuff/90-slitaz.el \ 1.14 $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \ 1.15 status 1.16 @@ -184,21 +185,6 @@ 1.17 1.18 post_install() 1.19 { 1.20 - cd "$1/usr/share/$PACKAGE/$VERSION/site-lisp" 1.21 - cat <<-EOF >site-start.el 1.22 - ;; site-start.el for SliTaz -*- no-byte-compile: t -*- 1.23 - ;; 1.24 - ;; (C) GNU gpl v3 - SliTaz GNU/Linux 2009. 1.25 - ;; 1.26 - ;; This default site startup file for Emacs was created by tazpkg 1.27 - ;; reconfigure emacs. You may modify this file, replace it by your 1.28 - ;; own site initialisation, or even remove it completely. 1.29 - ;; 1.30 - EOF 1.31 - START_FILES="$(ls site-start.d/ | sort)" 1.32 - for file in $START_FILES; do 1.33 - cat site-start.d/$file >> site-start.el 1.34 - done 1.35 # linking /usr/bin/emacs to new version 1.36 [ -h "$1/usr/bin/emacs" ] && rm -f "$1/usr/bin/emacs" 1.37 ln -s /usr/bin/emacs-$VERSION "$1/usr/bin/emacs" 1.38 @@ -209,4 +195,4 @@ 1.39 rm -rf "$1/usr/share/emacs" 1.40 rm -rf "$1/usr/lib/emacs" 1.41 rm -f "$1/usr/bin/emacs" 1.42 -} 1.43 \ No newline at end of file 1.44 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/emacs/stuff/site-start.el Thu Jan 07 22:13:24 2016 +0100 2.3 @@ -0,0 +1,12 @@ 2.4 +;; site-start.el for SliTaz -*- no-byte-compile: t -*- 2.5 +;; 2.6 +;; (C) GNU gpl v3 - SliTaz GNU/Linux 2009. 2.7 +;; 2.8 +;; Default site startup file for Emacs. You may modify this file, replace it by 2.9 +;; your own site initialisation, or even remove it completely. 2.10 +;; 2.11 +;; Load package startups in this site-start.d folder 2.12 +(if (file-accessible-directory-p "/usr/share/emacs/site-lisp/site-start.d") 2.13 + (let ((dir (directory-files "/usr/share/emacs/site-lisp/site-start.d/" t 2.14 + ".\\.el$"))) 2.15 + (while dir (load (car dir) nil t t) (setq dir (cdr dir)))))