lispref says var `auto-mode-alist' uses first match, so pseudo var `auto-mode-alist' in _dir-locals.el should also do that, for consistency. Here is a problem caused by the original behavior when Emacs handles _dir-locals file: . -- shynur