aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2015-06-10 16:38:18 -0400
committerGlenn Morris2015-06-10 16:38:18 -0400
commit6bf9bdb4b155f3f330c0e2b6eb00c45c8e01f54b (patch)
treeccdb45f17b8a4ce454d8788006fbbb6381bb4d73
parentd9d04bfa49514692b752072d9e6559a05d24f336 (diff)
downloademacs-6bf9bdb4b155f3f330c0e2b6eb00c45c8e01f54b.tar.gz
emacs-6bf9bdb4b155f3f330c0e2b6eb00c45c8e01f54b.zip
* lisp/files-x.el (add-file-local-variable):
Special-case 'lexical-binding'. (Bug#20641)
-rw-r--r--lisp/files-x.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/files-x.el b/lisp/files-x.el
index 248c3073307..a130ffcf928 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -247,7 +247,14 @@ then this function adds the first line containing the string
247`Local Variables:' and the last line containing the string `End:'." 247`Local Variables:' and the last line containing the string `End:'."
248 (interactive 248 (interactive
249 (let ((variable (read-file-local-variable "Add file-local variable"))) 249 (let ((variable (read-file-local-variable "Add file-local variable")))
250 ;; Error before reading value.
251 (if (equal variable 'lexical-binding)
252 (user-error "The `%s' variable must be set at the start of the file"
253 variable))
250 (list variable (read-file-local-variable-value variable) t))) 254 (list variable (read-file-local-variable-value variable) t)))
255 (if (equal variable 'lexical-binding)
256 (user-error "The `%s' variable must be set at the start of the file"
257 variable))
251 (modify-file-local-variable variable value 'add-or-replace interactive)) 258 (modify-file-local-variable variable value 'add-or-replace interactive))
252 259
253;;;###autoload 260;;;###autoload