aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-11-29 14:28:39 -0500
committerGlenn Morris2012-11-29 14:28:39 -0500
commit824eefe427f71a8083bb7163d2033704cfe3606b (patch)
tree14b4a1d11cb06c67beba797ec876b5d4eb4f0517
parentcbf8a8c744ce75d416139b5886dc655d01f89b57 (diff)
downloademacs-824eefe427f71a8083bb7163d2033704cfe3606b.tar.gz
emacs-824eefe427f71a8083bb7163d2033704cfe3606b.zip
Warn if try to set coding in dir-locals (bug#7169)
* lisp/files.el (hack-dir-local-variables): Warn if try to set coding via dir-locals, since it doesn't work.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/files.el11
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0f2a4b0ad5f..419c95114c8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12012-11-29 Glenn Morris <rgm@gnu.org> 12012-11-29 Glenn Morris <rgm@gnu.org>
2 2
3 * files.el (hack-dir-local-variables): Warn if try to set
4 coding via dir-locals, since it doesn't work. (Bug#7169)
5
3 Add desktop support for restoring vc-dir buffers. (Bug#10606) 6 Add desktop support for restoring vc-dir buffers. (Bug#10606)
4 * vc/vc-dir.el (vc-dir-mode): Autoload it (for desktop restore). 7 * vc/vc-dir.el (vc-dir-mode): Autoload it (for desktop restore).
5 Set buffer-local value of desktop-save-buffer. 8 Set buffer-local value of desktop-save-buffer.
diff --git a/lisp/files.el b/lisp/files.el
index c22cfd69549..e03b02193a4 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3682,10 +3682,13 @@ and `file-local-variables-alist', without applying them."
3682 (dir-locals-get-class-variables class) dir-name nil))) 3682 (dir-locals-get-class-variables class) dir-name nil)))
3683 (when variables 3683 (when variables
3684 (dolist (elt variables) 3684 (dolist (elt variables)
3685 (unless (memq (car elt) '(eval mode)) 3685 (if (eq (car elt) 'coding)
3686 (setq dir-local-variables-alist 3686 (display-warning :warning
3687 (assq-delete-all (car elt) dir-local-variables-alist))) 3687 "Coding cannot be specified by dir-locals")
3688 (push elt dir-local-variables-alist)) 3688 (unless (memq (car elt) '(eval mode))
3689 (setq dir-local-variables-alist
3690 (assq-delete-all (car elt) dir-local-variables-alist)))
3691 (push elt dir-local-variables-alist)))
3689 (hack-local-variables-filter variables dir-name))))))) 3692 (hack-local-variables-filter variables dir-name)))))))
3690 3693
3691(defun hack-dir-local-variables-non-file-buffer () 3694(defun hack-dir-local-variables-non-file-buffer ()