[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103415: Fix for another bit of bug#8
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103415: Fix for another bit of bug#8095, re dir-locals. |
Date: |
Thu, 24 Feb 2011 00:26:25 -0800 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103415
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2011-02-24 00:26:25 -0800
message:
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".
modified:
lisp/ChangeLog
lisp/help-fns.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-02-24 08:02:45 +0000
+++ b/lisp/ChangeLog 2011-02-24 08:26:25 +0000
@@ -1,11 +1,15 @@
2011-02-24 Glenn Morris <address@hidden>
+ * help-fns.el (describe-variable): Return consistent results when a
+ dir-local from a file came from the cache or did not. (Bug#8095)
+ If a dir-local has no associated file, say it came from a "directory".
+
* files.el (hack-dir-local-variables): Fix setting of `dir-name'.
(hack-local-variables-confirm, hack-local-variables-filter): Doc fix.
* files.el (dir-locals-find-file): Doc fix.
Fix the check for cache elements that have no associated file,
- and the mtime check for those that do.
+ and the mtime check for those that do. (Bug#8095)
* dired-x.el (dired-hack-local-variables):
Handle interrupts during hacking local variables. (Bug#5216)
=== modified file 'lisp/help-fns.el'
--- a/lisp/help-fns.el 2011-02-22 18:22:04 +0000
+++ b/lisp/help-fns.el 2011-02-24 08:26:25 +0000
@@ -748,15 +748,21 @@
(setq extra-line t)
(if (member (cons variable val) dir-local-variables-alist)
(let ((file (and (buffer-file-name)
- (not (file-remote-p (buffer-file-name)))
- (dir-locals-find-file
(buffer-file-name)))))
+ (not (file-remote-p (buffer-file-name)))
+ (dir-locals-find-file
+ (buffer-file-name))))
+ (type "file"))
(princ " This variable is a directory local variable")
(when file
- (princ (concat "\n from the file \""
- (if (consp file)
- (car file)
- file)
- "\"")))
+ (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 type "directory")))
+ (princ (format "\n from the %s \"%s\"" type file)))
(princ ".\n"))
(princ " This variable is a file local variable.\n")))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103415: Fix for another bit of bug#8095, re dir-locals.,
Glenn Morris <=