* etc/NEWS: Document `delayed-warnings-list' and `delayed-warnings-hook'.
* lisp/subr.el (display-delayed-warnings): New function.
(delayed-warnings-hook): New variable.
* src/keyboard.c (Qdelayed_warnings_hook): Define.
(command_loop_1): Run `delayed-warnings-hook' if Vdelayed_warnings_list
is non-nil.
(syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
(syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
(--dolist-tail--, --dotimes-limit--): Don't declare dynamically bound.
(dolist): Use a more efficient form for lexical-binding.
(dotimes): Use a cleaner semantics for lexical-binding.
* lisp/emacs-lisp/edebug.el (edebug-eval-top-level-form):
Use eval-sexp-add-defvars.
standard-output while running the body.
* lisp/Makefile.in (COMPILE_FIRST): Remove pcase; it's not so important.
* lisp/startup.el: Fix up warnings, move lambda expressions
outside of quote.
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Make it work to
inline lexbind interpreted functions into lexbind code.
(bytedecomp-bytes): Not a dynamic var any more.
(disassemble-offset): Get the bytes via an argument instead.
(byte-decompile-bytecode-1): Use push.
* lisp/emacs-lisp/bytecomp.el: Remove the bytecomp- prefix now that we use
lexical-binding.
(byte-compile-outbuffer): Rename from bytecomp-outbuffer.
* lisp/emacs-lisp/cl-macs.el (load-time-value):
* lisp/emacs-lisp/cl.el (cl-compiling-file): Adjust to new name.
* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Add byte-code-function-p.
(pcase--u1): Remove left-over code from early development.
Fix case of variable shadowing in guards and predicates.
(pcase--u1): Add a new `let' pattern.
* src/image.c (parse_image_spec): Use Ffunctionp.
* src/lisp.h: Declare Ffunctionp.
* lisp/subr.el (apply-partially): Move from subr.el; don't use lexical-let.
(eval-after-load): Obey lexical-binding.
* lisp/simple.el (apply-partially): Move to subr.el.
* lisp/makefile.w32-in: Match changes in Makefile.in.
(BIG_STACK_DEPTH, BIG_STACK_OPTS, BYTE_COMPILE_FLAGS): New vars.
(.el.elc, compile-CMD, compile-SH, compile-always-CMD)
(compile-always-SH, compile-calc-CMD, compile-calc-SH): Use them.
(COMPILE_FIRST): Add pcase, macroexp, and cconv.
* lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Silence warning about
calling CL's `compiler-macroexpand'.
* lisp/emacs-lisp/bytecomp.el (byte-compile-preprocess): New function.
(byte-compile-initial-macro-environment)
(byte-compile-toplevel-file-form, byte-compile, byte-compile-sexp): Use it.
(byte-compile-eval, byte-compile-eval-before-compile): Obey lexical-binding.
(byte-compile--for-effect): Rename from `for-effect'.
(display-call-tree): Use case.
* lisp/emacs-lisp/byte-opt.el (for-effect): Don't declare as dynamic.
(byte-optimize-form-code-walker, byte-optimize-form):
Revert to old arg name.
* lisp/Makefile.in (BYTE_COMPILE_FLAGS): New var.
(compile-onefile, .el.elc, compile-calc, recompile): Use it.
(byte-recompile-directory): Remove unused var `bytecomp-dest'.
(byte-recompile-file): Use derived-mode-p.
(byte-compile-from-buffer): Remove arg `bytecomp-filename'.
Use byte-compile-current-file instead.
(byte-compile-file): Adjust call accordingly.
(bytecomp-outbuffer): Move declaration before first use.
(for-effect): Declare dynamic.
(byte-compile-file-form-defmumble): Use byte-compile-current-file.
(byte-compile-top-level, byte-compile-out-toplevel, byte-compile-form):
Move dyn-binding of for-effect from function argument to let binding.
(byte-compile-out-toplevel): Don't both passing for-effect to
byte-optimize-lapcode.
(byte-compile-top-level-body, byte-compile-body):
Rename for-effect -> for-effect-arg so it's lexical.
* lisp/subr.el (functionp): Remove, now that it's in src/eval.c.
* lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-and-error-free-ops):
Remove interactive-p.
(byte-optimize-lapcode): Update optimizations now that stack-refs are
relative to the top rather than to the bottom.
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode):
Turn stack-ref-0 into dup.
(byte-compile-form): Don't indirect-function since it can signal
errors.
(byte-compile-stack-ref, byte-compile-stack-set): Adjust to stack-refs
being relative to top rather than to bottom in the byte-code.
(with-output-to-temp-buffer): Remove.
(byte-compile-with-output-to-temp-buffer): Remove.
* lisp/emacs-lisp/cconv.el: Use lexical-binding.
(cconv--lookup-let): Rename from cconv-lookup-let.
(cconv-closure-convert-rec): Fix handling of captured+mutated
arguments in defun/defmacro.
* lisp/emacs-lisp/eieio-comp.el (eieio-byte-compile-file-form-defmethod):
Rename from byte-compile-file-form-defmethod.
Don't byte-compile-lambda.
(eieio-byte-compile-defmethod-param-convert): Rename from
byte-compile-defmethod-param-convert.
* lisp/emacs-lisp/eieio.el (eieio-defgeneric-form-primary-only-one):
Call byte-compile rather than byte-compile-lambda.
* src/alloc.c (Fgarbage_collect): Don't mark the byte-stack redundantly.
* src/bytecode.c (exec_byte_code): Change stack_ref and stack_set to use
offsets relative to top rather than to bottom.
* lisp/subr.el (with-output-to-temp-buffer): New macro.
* lisp/simple.el (count-words-region): Don't use interactive-p.
* lisp/emacs-lisp/lisp-mode.el (save-window-excursion): Don't touch.
* lisp/emacs-lisp/cconv.el (cconv-closure-convert-rec, cconv-analyse-form):
Don't handle save-window-excursion any more.
* lisp/emacs-lisp/bytecomp.el (interactive-p, save-window-excursion):
Don't use the byte-code any more.
(byte-compile-form): Check macro expansion was done.
(byte-compile-save-window-excursion): Remove.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Ignore save-window-excursion. Don't macroepand any more.
* src/window.c (Fsave_window_excursion): Remove. Moved to Lisp.
(syms_of_window): Don't defsubr it.
* src/window.h (Fsave_window_excursion): Don't declare it.
* src/bytecode.c (exec_byte_code): Inline Fsave_window_excursion.
* lisp/files.el (backup-buffer): Make last-resort backup file in
.emacs.d.
* lisp/subr.el (locate-user-emacs-file): If .emacs.d does not exist,
make it with permission 700.
* doc/emacs/files.texi (Backup Names): Document the new location of the
last-resort backup file.
* lisp/subr.el (read-char-choice): New function, factored out from
dired-query and hack-local-variables-confirm.
* lisp/dired-aux.el (dired-query):
* lisp/files.el (hack-local-variables-confirm): Use it.