diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2016-01-30 16:14:52 +0000 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2016-01-30 19:54:41 +0000 |
commit | 71b20b31c8ee25bcd0de1a954c9ca7b49140b3b2 (patch) | |
tree | 687f518360ec65ff3d03639a33589720913d729c /lisp/help-fns.el | |
parent | ae26c8a7a46ffa6266a4efce592827cf47e85170 (diff) | |
download | emacs-71b20b31c8ee25bcd0de1a954c9ca7b49140b3b2.tar.gz |
Backport: * lisp/files.el: Remove support for extra .dir-locals file
(dir-locals-file-2, dir-locals--all-files): Remove.
(dir-locals-collect-variables, dir-locals-file, dir-locals-find-file)
(dir-locals-read-from-file, hack-dir-local-variables): Revert changes.
* lisp/files-x.el (modify-dir-local-variable): Revert changes.
* lisp/help-fns.el (describe-variable): Revert changes.
* doc/emacs/custom.texi (Directory Variables): Revert changes.
* etc/NEWS: Revert changes.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 2021885e996..547bc7ee63a 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -911,35 +911,29 @@ if it is given a local binding.\n")))) (buffer-file-name buffer))) (dir-locals-find-file (buffer-file-name buffer)))) - (is-directory nil)) + (dir-file t)) (princ (substitute-command-keys " This variable's value is directory-local")) - (when (consp file) ; result from cache - ;; If the cache element has an mtime, we - ;; assume it came from a file. - (if (nth 2 file) - ;; (car file) is a directory. - (setq file (dir-locals--all-files (car file))) - ;; Otherwise, assume it was set directly. - (setq file (car file) - is-directory t))) - (if (null file) - (princ ".\n") - (princ ", set ") - (princ (substitute-command-keys - (cond - (is-directory "for the directory\n `") - ;; Many files matched. - ((and (consp file) (cdr file)) - (setq file (file-name-directory (car file))) - (format "by one of the\n %s files in the directory\n `" - dir-locals-file)) - (t (setq file (car file)) - "by the file\n `")))) + (if (null file) + (princ ".\n") + (princ ", set ") + (if (consp file) ; result from cache + ;; If the cache element has an mtime, we + ;; assume it came from a file. + (if (nth 2 file) + (setq file (expand-file-name + dir-locals-file (car file))) + ;; Otherwise, assume it was set directly. + (setq file (car file) + dir-file nil))) + (princ (substitute-command-keys + (if dir-file + "by the file\n `" + "for the directory\n `"))) (with-current-buffer standard-output (insert-text-button file 'type 'help-dir-local-var-def - 'help-args (list variable file))) + 'help-args (list variable file))) (princ (substitute-command-keys "'.\n")))) (princ (substitute-command-keys " This variable's value is file-local.\n")))) |