mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-03 14:10:47 -08:00
* lisp/files-x.el (add-file-local-variable):
Special-case 'lexical-binding'. (Bug#20641)
This commit is contained in:
parent
d9d04bfa49
commit
6bf9bdb4b1
1 changed files with 7 additions and 0 deletions
|
|
@ -247,7 +247,14 @@ then this function adds the first line containing the string
|
|||
`Local Variables:' and the last line containing the string `End:'."
|
||||
(interactive
|
||||
(let ((variable (read-file-local-variable "Add file-local variable")))
|
||||
;; Error before reading value.
|
||||
(if (equal variable 'lexical-binding)
|
||||
(user-error "The `%s' variable must be set at the start of the file"
|
||||
variable))
|
||||
(list variable (read-file-local-variable-value variable) t)))
|
||||
(if (equal variable 'lexical-binding)
|
||||
(user-error "The `%s' variable must be set at the start of the file"
|
||||
variable))
|
||||
(modify-file-local-variable variable value 'add-or-replace interactive))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue