X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/63efcc268635dea78c6bd80749eae4ee2c72d717..44caa96dc5c16cbc4ee1bb26ec880af2e2ecf9f8:/lisp/dired-x.el diff --git a/lisp/dired-x.el b/lisp/dired-x.el index e8cea85d98..be762e6e30 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -816,12 +816,11 @@ If in a Dired buffer, reverts it." (interactive) (if (file-exists-p dired-local-variables-file) (error "Old-style dired-local-variables-file `./%s' found; -replace it with a dir-locals-file `./%s.el'" +replace it with a dir-locals-file `./%s'" dired-local-variables-file dir-locals-file)) - (if (dir-locals--all-files default-directory) - (message "File `./%s' already exists." - (car (dir-locals--all-files default-directory))) + (if (file-exists-p dir-locals-file) + (message "File `./%s' already exists." dir-locals-file) (add-dir-local-variable 'dired-mode 'subdirs nil) (add-dir-local-variable 'dired-mode 'dired-omit-mode t) ;; Run extra-hooks and revert directory.