diff --git a/emacs.changes b/emacs.changes index 831f741..164e3ca 100644 --- a/emacs.changes +++ b/emacs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 5 18:32:53 CEST 2010 - ro@suse.de + +- make emacs wrapper script a little more smart + check if default toolkit is installed, else use fallbacks + ------------------------------------------------------------------- Sun Apr 4 15:39:02 CEST 2010 - ro@suse.de diff --git a/emacs.spec b/emacs.spec index 277310f..589bb06 100644 --- a/emacs.spec +++ b/emacs.spec @@ -457,7 +457,16 @@ cat > %{buildroot}/usr/bin/emacs <<-"EOF" #!/bin/bash # Possible values are nox, gtk, or x11 : ${EMACS_TOOLKIT:=gtk} - exec -a ${0} ${0}-${EMACS_TOOLKIT} ${1+"$@"} + if test -e ${0}-${EMACS_TOOLKIT} ; then + exec -a ${0} ${0}-${EMACS_TOOLKIT} ${1+"$@"} + elif test -e ${0}-x11 ; then + exec -a ${0} ${0}-x11 ${1+"$@"} + elif test -e ${0}-nox ; then + exec -a ${0} ${0}-nox ${1+"$@"} + else + echo "no emacs binary found" + exit 1 + fi EOF %endif chmod 0755 %{buildroot}/usr/bin/emacs