+1. I tested this very small patch and could find no trouble at all.
As per Mikael's points elsethread, this also works for non-completion
interactive functions. As per Oliver's note, someone, someday may want
to fiddle with a recent "NO_autonamedirs" addition and this affords that.
No one has advocated in favor of local assignments using AutoNameDirs.