diff options
author | Glenn Morris <rgm@gnu.org> | 2020-10-27 08:18:05 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2020-10-27 08:18:05 -0700 |
commit | 30ba1fcd1bb54d22e60a29f57c1e40b887b62562 (patch) | |
tree | a21bf21768271c82850c82805078b29426b71773 /doc/lispref/tips.texi | |
parent | d34082671a03e0567a903a9d683e4fa5836c00a6 (diff) | |
parent | 8b87ea6844036c168c9ec67dd318ee3ba8dab5ae (diff) | |
download | emacs-30ba1fcd1bb54d22e60a29f57c1e40b887b62562.tar.gz emacs-30ba1fcd1bb54d22e60a29f57c1e40b887b62562.tar.bz2 emacs-30ba1fcd1bb54d22e60a29f57c1e40b887b62562.zip |
Merge from origin/emacs-27
8b87ea6844 Recommend lexical-binding in Coding Conventions
e29cace60a Avoid rare crashes while producing line numbers
Diffstat (limited to 'doc/lispref/tips.texi')
-rw-r--r-- | doc/lispref/tips.texi | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index aaef85897e8..32836639a01 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -95,6 +95,11 @@ If one prefix is insufficient, your package can use two or three alternative common prefixes, so long as they make sense. @item +We recommend enabling @code{lexical-binding} in new code, and +converting existing Emacs Lisp code to enable @code{lexical-binding} +if it doesn't already. @xref{Using Lexical Binding}. + +@item Put a call to @code{provide} at the end of each separate Lisp file. @xref{Named Features}. @@ -990,7 +995,7 @@ explains these conventions, starting with an example: @smallexample @group -;;; foo.el --- Support for the Foo programming language +;;; foo.el --- Support for the Foo programming language -*- lexical-binding: t; -*- ;; Copyright (C) 2010-2020 Your Name @end group @@ -1013,14 +1018,14 @@ explains these conventions, starting with an example: The very first line should have this format: @example -;;; @var{filename} --- @var{description} +;;; @var{filename} --- @var{description} -*- lexical-binding: t; -*- @end example @noindent -The description should be contained in one line. If the file -needs a @samp{-*-} specification, put it after @var{description}. -If this would make the first line too long, use a Local Variables -section at the end of the file. +The description should be contained in one line. If the file needs to +set more variables in the @samp{-*-} specification, add it after +@code{lexical-binding}. If this would make the first line too long, use +a Local Variables section at the end of the file. The copyright notice usually lists your name (if you wrote the file). If you have an employer who claims copyright on your work, you |