* lisp/emacs-lisp/inline.el (define-inline): Add `noinline` declaration.
* doc/lispref/functions.texi (Inline Functions): Mention it.
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Avoid %s for lists in
format string.
(cl-dolist, cl-dotimes): Remove obsolete optimization.
(cl-defstruct): Use `define-inline` instead of `cl-defsubst` for accessors.
Currently, a hard-coded set of macros is automatically expanded
during generation of autoloads. To allow user macros to request
such expansion, this implements a new declare form
`autoload-macro' (Bug#78995), with supported value `expand'.
For example, macros which wrap `define-minor-mode', can declare
`(autoload-macro expand)' to request that ;;;###autoload-adorned
calls to the macro are expanded during generation, such that an
autoload for the resulting function is created.
* lisp/emacs-lisp/byte-run.el (byte-run--set-autoload-macro):
Handle autoload-macro declare forms.
(macro-declarations-alist) Add handler for 'autoload-macro
declare forms.
(defmacro, defun):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric, cl-defun)
(cl-iter-defun, cl-defmacro, cl-defstruct):
* lisp/emacs-lisp/easy-mmode.el
(define-minor-mode, define-globalized-minor-mode, iter-defun):
* lisp/emacs-lisp/inline.el (define-inline):
* lisp/emacs-lisp/pcase.el (pcase-defmacro):
Declare (autoload-macro expand) to request expansion of the
macro during autoload generation.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Handle the `autoload-macro=expand' property for macros. Load
the ;;;###autoload-containing file if an unknown symbol is
encountered in the car of the following form, to give packages a
chance to define their macros and request expansion. Factor
list of special function-defining macros out as a constant
variable: `loaddefs--defining-macros'.
* doc/lispref/functions.texi (Declare Form):
* doc/lispref/loading.texi (Autoload): Document `autoload-macro'.
Instead of warning about unused vars during the analysis phase of
closure conversion, do it in the actual closure conversion by
annotating the code with "unused" warnings, so that the warnings
get emitted later by the bytecomp phase, like all other warnings,
at which point the line-number info is a bit less imprecise.
Take advantage of this change to wrap the expressions of unused
let-bound vars inside (ignore ...) so the byte-compiler can better
optimize them away.
Finally, promote `macroexp--warn-and-return` to "official" status
by removing its "--" marker.
(cconv-captured+mutated, cconv-lambda-candidates): Remove vars.
(cconv-var-classification): New var to replace them.
(cconv-warnings-only): Delete function.
(cconv--warn-unused-msg, cconv--var-classification): New functions.
(cconv--convert-funcbody): Add warnings for unused args.
(cconv-convert): Add warnings for unused vars in `let` and `condition-case`.
(cconv--analyze-use): Don't emit an "unused var" warning any more,
but instead remember the fact in `cconv-var-classification`.
* lisp/emacs-lisp/bytecomp.el (byte-compile-force-lexical-warnings):
Remove variable.
(byte-compile-preprocess): Remove corresponding case.
* lisp/emacs-lisp/pcase.el (pcase--if): Don't throw away `test` effects.
(\`):
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Use `car-safe` instead
of `car`, so it can more easily be removed by the optimizer if the
result is not used.
* lisp/emacs-lisp/macroexp.el (macroexp--warn-wrap): New function.
(macroexp-warn-and-return): Rename from `macroexp--warn-and-return`.
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November. Change these FTP URLs to https://ftp.gnu.org
instead. Make similar changes for URLs to other organizations moving
away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.