diff options
| author | Glenn Morris | 2011-02-24 00:26:25 -0800 |
|---|---|---|
| committer | Glenn Morris | 2011-02-24 00:26:25 -0800 |
| commit | 303f9ae0146c9bc42985e98a07b86be0cb1c6eca (patch) | |
| tree | 32549acad8ede71e4d5c62ecbf852d6e31290868 | |
| parent | 07915ed93c1a21776f7371e615b43d0d79eaebfd (diff) | |
| download | emacs-303f9ae0146c9bc42985e98a07b86be0cb1c6eca.tar.gz emacs-303f9ae0146c9bc42985e98a07b86be0cb1c6eca.zip | |
Fix for another bit of bug#8095, re dir-locals.
* lisp/help-fns.el (describe-variable): Return consistent results when a
dir-local from a file came from the cache or did not.
If a dir-local has no associated file, say it came from a "directory".
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/help-fns.el | 20 |
2 files changed, 18 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb0708aa0fa..05bddd0a7d9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,11 +1,15 @@ | |||
| 1 | 2011-02-24 Glenn Morris <rgm@gnu.org> | 1 | 2011-02-24 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * help-fns.el (describe-variable): Return consistent results when a | ||
| 4 | dir-local from a file came from the cache or did not. (Bug#8095) | ||
| 5 | If a dir-local has no associated file, say it came from a "directory". | ||
| 6 | |||
| 3 | * files.el (hack-dir-local-variables): Fix setting of `dir-name'. | 7 | * files.el (hack-dir-local-variables): Fix setting of `dir-name'. |
| 4 | (hack-local-variables-confirm, hack-local-variables-filter): Doc fix. | 8 | (hack-local-variables-confirm, hack-local-variables-filter): Doc fix. |
| 5 | 9 | ||
| 6 | * files.el (dir-locals-find-file): Doc fix. | 10 | * files.el (dir-locals-find-file): Doc fix. |
| 7 | Fix the check for cache elements that have no associated file, | 11 | Fix the check for cache elements that have no associated file, |
| 8 | and the mtime check for those that do. | 12 | and the mtime check for those that do. (Bug#8095) |
| 9 | 13 | ||
| 10 | * dired-x.el (dired-hack-local-variables): | 14 | * dired-x.el (dired-hack-local-variables): |
| 11 | Handle interrupts during hacking local variables. (Bug#5216) | 15 | Handle interrupts during hacking local variables. (Bug#5216) |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 1cd5526fcff..38e331dc992 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -748,15 +748,21 @@ it is displayed along with the global value." | |||
| 748 | (setq extra-line t) | 748 | (setq extra-line t) |
| 749 | (if (member (cons variable val) dir-local-variables-alist) | 749 | (if (member (cons variable val) dir-local-variables-alist) |
| 750 | (let ((file (and (buffer-file-name) | 750 | (let ((file (and (buffer-file-name) |
| 751 | (not (file-remote-p (buffer-file-name))) | 751 | (not (file-remote-p (buffer-file-name))) |
| 752 | (dir-locals-find-file (buffer-file-name))))) | 752 | (dir-locals-find-file |
| 753 | (buffer-file-name)))) | ||
| 754 | (type "file")) | ||
| 753 | (princ " This variable is a directory local variable") | 755 | (princ " This variable is a directory local variable") |
| 754 | (when file | 756 | (when file |
| 755 | (princ (concat "\n from the file \"" | 757 | (if (consp file) ; result from cache |
| 756 | (if (consp file) | 758 | ;; If the cache element has an mtime, we |
| 757 | (car file) | 759 | ;; assume it came from a file. |
| 758 | file) | 760 | (if (nth 2 file) |
| 759 | "\""))) | 761 | (setq file (expand-file-name |
| 762 | dir-locals-file (car file))) | ||
| 763 | ;; Otherwise, assume it was set directly. | ||
| 764 | (setq type "directory"))) | ||
| 765 | (princ (format "\n from the %s \"%s\"" type file))) | ||
| 760 | (princ ".\n")) | 766 | (princ ".\n")) |
| 761 | (princ " This variable is a file local variable.\n"))) | 767 | (princ " This variable is a file local variable.\n"))) |
| 762 | 768 | ||