[Top][All Lists]

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

Re: file-name-shadow-mode

From: Stefan Monnier
Subject: Re: file-name-shadow-mode
Date: Mon, 21 Mar 2005 11:58:17 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> How 'bout the patch below which makes no assumption (that I know of) about
>> substitute-in-file-name, and will thus correctly even with weird
>> magic file name handlers.

> Um, I should note that the original code was designed to be fast and
> not cons unnecessarily, because it runs on every keystroke -- that's
> the reason it uses just a regexp match and a move-overlay.  Your
> suggested replacement looks ... less careful.

I'm fully aware of it, of course.  Given the binary search, it should around
the loop about 5-7 times, and substitute-in-file-name shouldn't do that much
consing itself, so I figured it was worth trying.

Also we could easily optimize the common case (where the overlay is not
moved) using a total of 3 calls to substitute-in-file-name in the
common case.

But given the fact that icomplete.el has been usable for a long time
already, I suspect that the performance issue is only in our heads,


reply via email to

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