emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: substitute-in-file-name and "$"


From: Kim F. Storm
Subject: Re: substitute-in-file-name and "$"
Date: 06 Jul 2003 14:07:42 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Miles Bader <address@hidden> writes:

> On Sun, Jul 06, 2003 at 01:16:44AM +0200, Michael Albinus wrote:
> > At least the examples in the Elisp manual give the feeling that
> > substitute-in-file-name could be called without special attention. The
> > trap with the "$" char isn't obvious.
> 
> Consider that the environment-variable's _value_ could contain a `$', so it
> seems actually fairly obvious that you should only call
> substitute-in-file-name once...

Maybe substitute-in-file-name could put a `substitute-in-file-name'
property on the return value and check for that property on its
argument (and do nothing if it is present).

A later call to substitute-in-file-name should then skip over parts of
its argument string which has that property (and only substitute in
parts which are not previously substituted.

That is still not completely fool-proof if the result of
substitute-in-file-name is manipulated in some way which removes the
property and then later passed to substitute-in-file-name again.


-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]