Apply directory-local variables to a non-file buffer. For non-file buffers, such as Dired buffers, directory-local variables are looked for in `default-directory' and its parent directories.