Doc fix for lexical-binding being in line one.

Ref http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00543.html

* doc/lispref/variables.texi (Using Lexical Binding):
Mention that lexical-binding should be set in the first line.

* src/lread.c (syms_of_lread): Doc fix.

* lisp/emacs-lisp/tabulated-list.el, lisp/progmodes/f90.el:
Move lexical-binding file-local to line one.

* etc/NEWS: lexical-binding should be ine the first line.
This commit is contained in:
Glenn Morris 2012-01-25 22:30:49 -08:00
parent e43273eff0
commit 48da739227
7 changed files with 17 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2012-01-26 Glenn Morris <rgm@gnu.org>
* variables.texi (Using Lexical Binding):
Mention that lexical-binding should be set in the first line.
2012-01-26 Lars Ingebrigtsen <larsi@gnus.org>
* macros.texi (Defining Macros): Don't claim that `declare' only

View file

@ -1047,6 +1047,8 @@ binding. (However, special variables are still dynamically bound; see
below.) If @code{nil}, dynamic binding is used for all local
variables. This variable is typically set for a whole Emacs Lisp
file, as a file local variable (@pxref{File Local Variables}).
Note that unlike other such variables, this one must be set in the
first line of a file.
@end defvar
@noindent

View file

@ -1026,8 +1026,8 @@ sc.el, x-menu.el, rnews.el, rnewspost.el
** Code can now use lexical scoping by default instead of dynamic scoping.
The `lexical-binding' variable lets code use lexical scoping for local
variables. It is typically set via file-local variables, in which case it
applies to all the code in that file.
variables. It is typically set via a file-local variable in the first
line of the file, in which case it applies to all the code in that file.
*** `eval' takes a new optional argument `lexical' to choose the new lexical
binding instead of the old dynamic binding mode.

View file

@ -1,4 +1,4 @@
;;; tabulated-list.el --- generic major mode for tabulated lists.
;;; tabulated-list.el --- generic major mode for tabulated lists -*- lexical-binding: t -*-
;; Copyright (C) 2011-2012 Free Software Foundation, Inc.
@ -362,7 +362,6 @@ as the ewoc pretty-printer."
;; Local Variables:
;; coding: utf-8
;; lexical-binding: t
;; End:
;;; tabulated-list.el ends here

View file

@ -1,4 +1,4 @@
;;; f90.el --- Fortran-90 mode (free format)
;;; f90.el --- Fortran-90 mode (free format) -*- lexical-binding: t -*-
;; Copyright (C) 1995-1997, 2000-2012 Free Software Foundation, Inc.
@ -2319,7 +2319,6 @@ escape character."
;; Local Variables:
;; coding: utf-8
;; lexical-binding: t
;; End:
;;; f90.el ends here

View file

@ -1,3 +1,7 @@
2012-01-26 Glenn Morris <rgm@gnu.org>
* lread.c (syms_of_lread): Doc fix.
2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
* coding.c (encode_designation_at_bol): Change return value to

View file

@ -4595,7 +4595,8 @@ to load. See also `load-dangerous-libraries'. */);
Non-nil means that the code in the current buffer should be evaluated
with lexical binding.
This variable is automatically set from the file variables of an
interpreted Lisp file read using `load'. */);
interpreted Lisp file read using `load'. Unlike other file local
variables, this must be set in the first line of a file. */);
Fmake_variable_buffer_local (Qlexical_binding);
DEFVAR_LISP ("eval-buffer-list", Veval_buffer_list,