mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-16 05:21:26 +00:00
Also Numerous small amendments. * lisp/emacs-lisp/byte-run.el (byte-run-pull-lambda-source) (byte-run--posify-def-form, byte-run-format-read-stream): New functions. (byte-run--posify-list): Small corrections to functionality. (byte-run-posify-all-lambdas-etc): Renamed from name without "-etc". Strip a lambda off position when it doesn't open a form. (byte-run-get-position-vec): Renamed from byte-run-position-vec. (byte-run-posify-doc-string): New argument READ-STREAM, and its addition to the ;POS structure as a fifth element. (byte-run-posify-lambda-form): New optional argument LAMBDA-READ-STREAM, which is passed to the above function. The original arguments are no longer changed, new ones are created. (byte-run--set-compiler-macro): Remove unneeded entry from lambda-source-alist. (byte-run--posify-defining-form): New variable DOC-INDEX, the position in the generated macro's arguments of the doc string. (defmacro): Move the stripping of a lambda's position to earlier in the function. Adapt to the new form of the byte-run-defined-form property. (byte-run-posify-existing-lambdas): Use the new byte-run-pull-lambda-source function. (eval-when-compile, eval-and-compile): Process the argument with byte-run-posify-all-lambdas-etc before calling eval. * lisp/emacs-lisp/bytecomp.el (byte-extrude-byte-code-vectors): Amend the macro so that it can be run twice without adverse effect. * lisp/emacs-lisp/cl-generic.el (cl-generic-define-context-rewriter): Bind symbols-with-pos-enabled to t for the benefit of pcase. (cl-defmethod): Set the cdr of the byte-run-defined-form property to a function which handles the non-constant position of the doc string of generated defining functions. * lisp/emacs-lisp/cl-macs.el (cl-function): Preserve the positioned lambda. * lisp/emacs-lisp/gv.el (gv--expander-defun-declaration) (gv--setter-defun-declaration): Wrap the expansion in byte-run-position-lambda-form where appropriate. * lisp/emacs-lisp/macroexp.el (macroexp--funcall-if-compiled): Bind symbols-with-pos-enabled to t. (macroexp--strip-lambda): New function. (macroexp--expand-all): Handle eval-when-compile and eval-and-compile by expanding their arguments first, then expanding the forms. Sometimes wrap a byte-run-posify-lambda-form around the expansion of a backquote-list* form. Add in a pcase arm for vectors. In the \#'(lambda ...) arm, handle function args which are called "lambda". Separate the (quote ...) form from the (function ...) form, and call byte-run-posify-all-lambdas-etc on its arg. Remove a superfluous arm involving lambda. Add an arm to handle backquote expansions of "complicated" lambda forms. Remove the final guard arm which stripped symbols of their positions. * lisp/emacs-lisp/pcase.el (pcase--subtype-bitsets): don't create and eval-after-load form before the macro machinery is fully working. * lisp/help.el (help-strip-pos-info): Renamed to byte-run-strip-pos-info and moved to byte-run.el. * lisp/progmodes/elisp-mode.el (elisp--preceding-sexp): Use the current value of load-read-function rather than `read'. (elisp--eval-defun): Bind defining-symbol to nil. Expand macros eagerly by calling macroexpand-all rather than macroexpand. * src/data.c (Fdefalias): Strip the position from the symbol being defalias'd. Call byte-run-posify-doc-string for its doc string. Adapt the value of its byte-run-defined-form property to the new convention. * src/eval.c (top level): Adapt defvar's and defconst's values of the byte-run-defined-form property to the new convention. * src/lread.c (Fload): Amend the bindings of read-stream and load-read-function. (readevalloop_early_eval): Preserve original list parameters rather than changing them with nconc. (readevalloop_eager_expand_eval): In the non-progn case, macro expand the form in one go, rather than first the top level then the rest. Remove the call to byte-run-strip-symbols-positions. (Feval_buffer, Feval_region, Fread, Fread_position_symbols) (Fread_positioning_defined_symbols, Fread_from_string): Regularize the settings of read-stream and byte-compile-in-progress. (set_read_stream): New function superseding get_read_stream. (quote_second_on_stack): New inline function for read0. (ADJUST_LOCATE_SYMS): Amend. (read0): New value 2 for locate_syms meaning "Position next form if it's a quoted symbol". Amend the state machine accordingly. Adjust the settings of the local variables to reflect the new convention for the byte-run-defined-symbol property. (lambda-source-alist): New alist variable holding the source buffers of each lambda positioned by read0. * test/lisp/emacs-lisp/bytecomp-tests.el (test-byte-comp-compile-and-load, bytecomp-tests-function-put): Use print-symbols-bare. * test/lisp/erc/erc-tests.el (erc--with-dependent-type-match): Use byte-run-strip-lambda-doc. (erc--restore-initialize-priors): Comment out entirely. * test/lisp/use-package/use-package-tests (use-package-test-normalize-function): Use byte-run-strip-lambda-doc. (use-package-test/:hook-5, use-package-test/:hook-7): Bind symbols-with-pos-enabled to t. |
||
|---|---|---|
| .. | ||
| ChangeLog.1 | ||
| ChangeLog.2 | ||
| erc-autoaway.el | ||
| erc-backend.el | ||
| erc-button.el | ||
| erc-capab.el | ||
| erc-common.el | ||
| erc-compat.el | ||
| erc-dcc.el | ||
| erc-desktop-notifications.el | ||
| erc-ezbounce.el | ||
| erc-fill.el | ||
| erc-goodies.el | ||
| erc-ibuffer.el | ||
| erc-identd.el | ||
| erc-imenu.el | ||
| erc-join.el | ||
| erc-lang.el | ||
| erc-list.el | ||
| erc-log.el | ||
| erc-match.el | ||
| erc-menu.el | ||
| erc-netsplit.el | ||
| erc-networks.el | ||
| erc-nicks.el | ||
| erc-notify.el | ||
| erc-page.el | ||
| erc-pcomplete.el | ||
| erc-replace.el | ||
| erc-ring.el | ||
| erc-sasl.el | ||
| erc-services.el | ||
| erc-sound.el | ||
| erc-speedbar.el | ||
| erc-spelling.el | ||
| erc-stamp.el | ||
| erc-status-sidebar.el | ||
| erc-track.el | ||
| erc-truncate.el | ||
| erc-xdcc.el | ||
| erc.el | ||