Mailing List Archive

New eclasses for XEmacs lisp
I'm about to commit two new eclasses to support the compilation,
configuration, and installation of XEmacs lisp classes. In a desperate
attempt not to re-invent the wheel the interface and structure of the
classes has been shamelessly copied from the Emacs lisp classes.

Currently the implementation is not complete yet, and I intend to fill
in more of the blanks as I actually need them for specific packages,
again following the emacs lisp eclasses where appropriate.

The eclasses have been in the Emacs overlay for some time now in support
of the forthcoming app-xemacs/gentoo-syntax package:

http://overlays.gentoo.org/proj/emacs/browser/emacs-overlay/eclass/xemacs-elisp.eclass
http://overlays.gentoo.org/proj/emacs/browser/emacs-overlay/eclass/xemacs-elisp-common.eclass

Bring on the comments, improvements, and most importantly: approval to
put this in the tree.

Kind regards,

Hans
Re: New eclasses for XEmacs lisp [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hans de Graaff wrote:
> I'm about to commit two new eclasses to support the compilation,
> The eclasses have been in the Emacs overlay for some time now in support
> of the forthcoming app-xemacs/gentoo-syntax package:
>
> http://overlays.gentoo.org/proj/emacs/browser/emacs-overlay/eclass/xemacs-elisp.eclass

I think it would be good to add a string argument to the call to die on line 22.

> http://overlays.gentoo.org/proj/emacs/browser/emacs-overlay/eclass/xemacs-elisp-common.eclass

You use $* and $@ here which are the same when unquoted. They should probably
be quoted and that means that all instances would become the four characters "$@".

Marijn

- --
Marijn Schouten (hkBst), Gentoo Lisp project
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG4nP2p/VmCx0OL2wRAuSDAJ4zq1I35NKJDWc6VBkb48NODfsoGgCfTkpI
ZpQqOsjF5BjItbN+Ymuh1vU=
=KF2I
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
Re: New eclasses for XEmacs lisp [ In reply to ]
Hans de Graaff <graaff@gentoo.org>:

> Bring on the comments, improvements, and most importantly: approval to
> put this in the tree.

Thumbs up from me. All other flaws I were able to find have already
been spotted.

V-Li

--
Christian Faulhammer, Gentoo Lisp project
<URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

<URL:http://www.faulhammer.org/>
Re: New eclasses for XEmacs lisp [ In reply to ]
Hans de Graaff kirjoitti:
> I'm about to commit two new eclasses to support the compilation,
> configuration, and installation of XEmacs lisp classes. In a desperate
> attempt not to re-invent the wheel the interface and structure of the
> classes has been shamelessly copied from the Emacs lisp classes.
>

Would it be possible to have one set of eclasses that handles both
XEmacs and Emacs?

>
> The eclasses have been in the Emacs overlay for some time now in support
> of the forthcoming app-xemacs/gentoo-syntax package:
>
> http://overlays.gentoo.org/proj/emacs/browser/emacs-overlay/eclass/xemacs-elisp.eclass
> http://overlays.gentoo.org/proj/emacs/browser/emacs-overlay/eclass/xemacs-elisp-common.eclass

xemacs-elisp-install () { insinto etc should be wrapper in a subshell so
that it can't change the env of the caller.

Regards,
Petteri
Re: New eclasses for XEmacs lisp [ In reply to ]
On Sat, 2007-09-08 at 17:33 +0300, Petteri Räty wrote:

> Would it be possible to have one set of eclasses that handles both
> XEmacs and Emacs?

Possible, yes, but I don't think it is practical. Even though the
general steps to compile and install elisp are the same for GNU Emacs
and XEmacs, there are also a lot of finicky little implementation
details that are different. There would not be a lot of joined code, I
think.

> xemacs-elisp-install () { insinto etc should be wrapper in a subshell so
> that it can't change the env of the caller.

While looking for some examples I found that not many eclasses currently
do this, so perhaps this is good advice for others as well? Petteri's
own java-utils-2.eclass does support this, obviously, and so will the
xemacs eclass.

Kind regards,

Hans
Re: New eclasses for XEmacs lisp [ In reply to ]
Hans de Graaff kirjoitti:
> On Sat, 2007-09-08 at 17:33 +0300, Petteri Räty wrote:
>
>> Would it be possible to have one set of eclasses that handles both
>> XEmacs and Emacs?
>
> Possible, yes, but I don't think it is practical. Even though the
> general steps to compile and install elisp are the same for GNU Emacs
> and XEmacs, there are also a lot of finicky little implementation
> details that are different. There would not be a lot of joined code, I
> think.
>
>> xemacs-elisp-install () { insinto etc should be wrapper in a subshell so
>> that it can't change the env of the caller.
>
> While looking for some examples I found that not many eclasses currently
> do this, so perhaps this is good advice for others as well? Petteri's
> own java-utils-2.eclass does support this, obviously, and so will the
> xemacs eclass.
>
> Kind regards,
>
> Hans

Yeah you can usually get away with it.

Regards,
Petteri
Re: New eclasses for XEmacs lisp [ In reply to ]
Marijn Schouten (hkBst) wrote:
>>
http://overlays.gentoo.org/proj/emacs/browser/emacs-overlay/eclass/xemacs-elisp-common.eclass
>
> You use $* and $@ here which are the same when unquoted. They should
> probably be quoted and that means that all instances would become the four
> characters "$@".
>
Yeah, that's definitely how to pass thru parameters in function calls.

<greybot> The difference between $@ and $*: without double quotes, none at
all: both equal $1 $2 .... With double quotes, "$@" is "$1" "$2" ...,
while "$*" is "$1c$2c..." (where c is the first character of $IFS). You
almost always want "$@".

So using "$*" maps to one string parameter. If you're calling a shell
function you might not notice the difference (until you use a parameter
with a space) using plain $* since the shell splits parameters to commands
on characters in IFS. The point is, to deal with spaces in strings you need
to use "$@".

#bash is your friend (although some of the ops are way too grumpy ;)


--
gentoo-dev@gentoo.org mailing list