summaryrefslogtreecommitdiff
path: root/lisp/help-fns.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2016-01-16 08:50:46 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2016-01-16 08:53:33 +0000
commitf0b82b34536e6bafbecbd642eee0cb0f534f8647 (patch)
treec717d188a43e9166507111451700bff13194a551 /lisp/help-fns.el
parent86e45139698fe773ffb4efbe59387f90201b80c8 (diff)
downloademacs-f0b82b34536e6bafbecbd642eee0cb0f534f8647.tar.gz
* lisp/files.el (dir-locals--all-files): Use completion instead of wildcards
(dir-locals-file) * lisp/files-x.el (modify-dir-local-variable) * lisp/dos-fns.el (dosified-file-name) * lisp/help-fns.el (describe-variable): Change accordingly.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r--lisp/help-fns.el25
1 files changed, 12 insertions, 13 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index bc96601a45c..13daafb0f20 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -918,25 +918,24 @@ if it is given a local binding.\n"))))
;; 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)))
+ ;; (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 ")
- (let ((files (file-expand-wildcards file)))
- (princ (substitute-command-keys
- (cond
- (is-directory "for the directory\n `")
- ;; Many files matched.
- ((cdr files)
- (setq file (file-name-directory (car files)))
- (format "by a file\n matching `%s' in the directory\n `"
- dir-locals-file))
- (t (setq file (car files))
- "by the file\n `"))))
+ (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 `"))))
(with-current-buffer standard-output
(insert-text-button
file 'type 'help-dir-local-var-def