emacs/lisp/emacs-lisp
Mattias Engdegård 3217ae6e05 Add aid for finding missing dynamic variable declarations
Find lexical use of variables that are dynamically declared in other
files by recording 'defvar' declarations in files that can be read
in by the compiler in a second compilation.  This is particularly
useful when converting code to use lexical-binding.

The facility is controlled by setting environment variables:

 EMACS_GENERATE_DYNVARS -- set to non-empty to generate a .dynvars file
                           corresponding to each .elc.
 EMACS_DYNVARS_FILE     -- set to the name of a .dynvars file to use
                           as defvar information during compilation,
                           enabling the new warnings.

* lisp/emacs-lisp/bytecomp.el (byte-compile--known-dynamic-vars)
(byte-compile--seen-defvars): New variables.
(byte-compile-warning-types): Add lexical-dynamic warning.
(byte-compile--load-dynvars, byte-compile--warn-lexical-dynamic):
New functions.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file, byte-compile--declare-var)
(byte-compile-lambda, byte-compile-bind): Add dynamic variable loads,
dumps and checks.
* doc/lispref/variables.texi (Converting to Lexical Binding): Document.
2020-10-17 16:57:38 +02:00
..
advice.el Use `format-prompt' when prompting with default values 2020-09-06 16:56:54 +02:00
autoload.el Make update-file-autoloads respect generated-autoload-file 2020-10-04 16:32:16 +02:00
avl-tree.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
backquote.el * lisp/emacs-lisp/backquote.el: Use lexical binding. 2020-10-16 14:03:57 +02:00
backtrace.el Restore some public debugging functions removed in Emacs 27 2020-10-01 20:00:19 +02:00
benchmark.el Revert last change in benchmark.el 2020-06-21 19:01:40 +01:00
bindat.el Add new tests to bindat-tests.el 2020-04-29 09:52:34 +02:00
byte-opt.el Handle single-argument `apply' consistently (bug#40968) 2020-09-27 16:59:00 +02:00
byte-run.el Make 'byte-compile-info*' functions more logical 2020-08-06 08:12:31 +02:00
bytecomp.el Add aid for finding missing dynamic variable declarations 2020-10-17 16:57:38 +02:00
cconv.el Remove generation of old bytecodes for catch/unwind 2020-01-05 11:19:52 +01:00
chart.el Remove some compat code from chart.el 2020-08-18 23:19:09 +02:00
check-declare.el ; Maintainer header updates 2020-07-31 09:09:39 -07:00
checkdoc.el Use format-prompt in calls to completing-read with a default value 2020-09-06 20:35:11 +02:00
cl-extra.el Make cl-concatenate an alias of seq-concatenate 2020-03-23 18:58:21 -04:00
cl-generic.el Improve Edebug symbols for inlined secondary methods (Bug#42671) 2020-08-02 22:07:27 +02:00
cl-indent.el Remove redundant :groups args missed in last commit 2020-05-03 16:21:51 +02:00
cl-lib.el Fix compilation warning in cl-lib.el 2020-09-12 15:06:58 +02:00
cl-macs.el Don't quote lambdas in several places 2020-10-01 15:28:14 +02:00
cl-preloaded.el Fix copyright years by hand 2020-01-01 01:01:53 +00:00
cl-print.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
cl-seq.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
copyright.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
crm.el Remove many items obsolete since Emacs 23.1 2020-08-14 13:07:26 +02:00
cursor-sensor.el * lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Change last fix 2020-02-24 09:55:09 -05:00
debug.el Merge from origin/emacs-27 2020-10-02 09:33:53 -07:00
derived.el Make Emacs 20 compat code in derived.el obsolete 2020-08-14 13:07:26 +02:00
disass.el Use `format-prompt' when prompting with default values 2020-09-06 16:56:54 +02:00
easy-mmode.el * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Doc tweak 2020-10-10 11:07:28 -04:00
easymenu.el Remove many items obsolete since Emacs 23.1 2020-08-14 13:07:26 +02:00
edebug.el Remove some references to Emacs 18 and 19 2020-10-16 15:27:25 +02:00
eieio-base.el Merge from origin/emacs-27 2020-10-02 09:38:24 -07:00
eieio-compat.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
eieio-core.el Un-deprecate oset and oset-default 2020-06-06 17:24:00 +01:00
eieio-custom.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
eieio-datadebug.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
eieio-opt.el Replace add-hook load-hook with with-eval-after-load 2020-01-16 21:21:29 -08:00
eieio-speedbar.el Replace add-hook load-hook with with-eval-after-load 2020-01-16 21:21:29 -08:00
eieio.el ; Fix typos 2020-09-21 14:26:42 +02:00
eldoc.el Fix off-by-one error in eldoc--handle-docs 2020-09-22 16:20:05 +02:00
elint.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
elp.el Use format-prompt in calls to completing-read with a default value 2020-09-06 20:35:11 +02:00
ert-x.el Add ert macros to get resource file names (Bug#43792) 2020-10-16 11:18:38 +02:00
ert.el Merge from origin/emacs-27 2020-10-02 09:38:24 -07:00
ewoc.el Save and restore point in ewoc-invalidate 2020-09-18 11:53:32 -04:00
faceup.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
find-func.el Document and extend menu-bar-make-toggle some 2020-09-19 18:23:27 +02:00
float-sup.el Use lexical-binding in float-sup.el and add tests 2020-04-29 09:25:02 +02:00
generator.el Band-aid for edebugging generator bodies (Bug#40434). 2020-06-14 20:01:28 +02:00
generic.el Minor fixes of recent changes 2020-09-30 16:56:08 +03:00
gv.el Add gv-define-expander for plist-get 2020-09-09 13:50:05 -04:00
helper.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
hierarchy.el Add the new library hierarchy.el 2020-08-09 14:48:22 +02:00
inline.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
let-alist.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
lisp-mnt.el Globally sanitize single-file package long descriptions (Bug#37548) 2020-01-23 22:57:23 +01:00
lisp-mode.el Change how #:uninterned symbols are font-locked in Lisp mode 2020-08-24 14:34:42 +02:00
lisp.el ; * lisp/emacs-lisp/lisp.el: rename parameter in last change 2020-09-23 18:08:32 +02:00
macroexp.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
map-ynp.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
map.el * lisp/emacs-lisp/map.el: Add keyword-only pattern abbreviation 2020-02-04 12:30:31 -05:00
nadvice.el ; Fix license statements. 2020-08-27 02:53:25 +02:00
package-x.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
package.el Make package-install-from-buffer maybe refresh the quickstart file 2020-10-16 09:10:05 +02:00
pcase.el ; Fix typos 2020-09-21 14:26:42 +02:00
pp.el Make C-x C-e' work more like C-M-x' on defvar etc 2020-10-15 16:26:45 +02:00
radix-tree.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
re-builder.el Merge from origin/emacs-27 2020-10-02 09:38:24 -07:00
regexp-opt.el Remove the optional KEEP-ORDER argument to regexp-opt 2020-02-13 20:43:42 +01:00
regi.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
ring.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
rmc.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
rx.el Merge from origin/emacs-27 2020-08-18 07:51:05 -07:00
seq.el ; Bump seq version to 2.22 2020-08-29 00:42:36 +02:00
shadow.el Remove many items obsolete since Emacs 23.2 and 23.3 2020-08-24 04:09:47 +02:00
shortdoc.el Fix error in file shortdoc group 2020-10-11 23:51:26 +02:00
smie.el Use `format-prompt' when prompting with default values 2020-09-06 16:56:54 +02:00
subr-x.el Give better error feedback on wrong password in .gpg files 2020-09-30 03:47:47 +02:00
syntax.el ; * lisp/emacs-lisp/syntax.el (syntax-propertize-function): Doc fix. 2020-09-20 17:20:08 -07:00
tabulated-list.el Move “Fix some broken conditional forms” to master 2020-01-05 11:50:31 -08:00
tcover-ses.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
testcover.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
text-property-search.el Fix NOT-CURRENT behaviour in text-property-search-backward 2020-07-17 18:44:49 +02:00
thunk.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
timer-list.el Support sorting timer-list-mode by column (Bug#40854) 2020-05-12 19:10:20 +02:00
timer.el Simplify run-at-time 2020-03-08 00:25:38 -08:00
tq.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
trace.el Use `format-prompt' when prompting with default values 2020-09-06 16:56:54 +02:00
unsafep.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
warnings.el * lisp/emacs-lisp/warnings.el (display-warning): Don't be so negative 2020-10-15 14:34:12 -04:00