Ralf Angeli <[EMAIL PROTECTED]> writes:
> * David Kastrup (2005-08-13) writes:
>
>> Maybe we should have some variable that tells us whether we already
>> ran AC_SHELL_QUOTIFY?
>
> Yes. And even more convenient would be a wrapper for
> AC_SHELL_QUOTIFY, let's call it AC_SHELL_QUOTIFY_ONCE, which ensures
> that a certain variable is quoted only once. AC_SHELL_QUOTIFY_ONCE
> could maintain a variable holding all variable names which were
> already quotified and only quotify a given variable value if the name
> of the variable is not in the list.
>
> It could look something like this (I know this is ugly as hell; so
> maybe somebody with better shell coding skills can beautify it):
>
> AC_DEFUN(AC_SHELL_QUOTIFY_ONCE,
> [var_quotified="no"
> for var in $quotified_vars; do
> if [[ $var == $1 ]]; then
> var_quotified="yes"
> break
> fi
> done
> if [[ $var_quotified == "no" ]]; then
> AC_SHELL_QUOTIFY($1)
> export quotified_vars=$quotified_vars" "$1
> fi])
[[ is bash-only. Don't use it. And iteration seems like overkill.
AC_DEFUN(AC_SHELL_QUOTIFY_ONCE,
[
case :$1: in $quotified_vars) ;;
*) AC_SHELL_QUOTIFY([$1])
export quotified_vars=$quotified_vars:$1:
esac
]
> Using AC_SHELL_QUOTIFY_ONCE instead of AC_SHELL_QUOTIFY for
> `packagelispdir' and `packagedatadir' in both top-level configure.ac
> and preview/configure.ac suppressed the double quoting in my case.
> The problem with `EMACS' persists.
Perhaps we should make something like
AC_EXPORT_QUOTIFIED
which will export and protect the variable? AC_SHELL_QUOTIFY would
then always check whether there is a protection active.
I mean, we don't have to protect against multiple quotification except
in the export case, right?
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
_______________________________________________
auctex-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex-devel