[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5808: 23.1; substitute-in-file-name $NOSUCH vs ${NOSUCH}
From: |
Stefan Monnier |
Subject: |
bug#5808: 23.1; substitute-in-file-name $NOSUCH vs ${NOSUCH} |
Date: |
Tue, 30 Mar 2010 21:29:53 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> Evaluating
> (substitute-in-file-name "$NOSUCHVAR")
> => "$NOSUCHVAR
> but
> (substitute-in-file-name "${NOSUCHVAR}")
> => error
> Substituting nonexistent environment variable "NOSUCHVAR"
[...]
> I'm not sure if this is a bug or a feature. I see they were both errors
> in Emacs 21, but that 22 up forgives the first.
I made the change in Emacs-22 so that most uses of $ in file names can
work without needing the quoting by double-dollars.
It was a fairly easy change which should cover most cases. Admittedly,
the resulting inconsistency is not great, so I guess that the
discrepancy is a misfeature/bug, but it's not very high up the list of
things to fix. Patches welcome,
Stefan