Files
emacs/test/lisp
Stefan Monnier c75f65442d kmacro: Represent it as an OClosure
Merge the old lambda+list into a single OClosure object which plays
both roles at the same time.  Take advantage of it to provide a
`cl-print-object` method so kmacro objects print nicely using the
`key-parse` syntax.
Also replace the old `kmacro-lambda-form` with a new `kmacro` constructor
which takes a `key-parse` syntax, so that the code inserted with
`insert-kbd-macro` is now more readable.

* lisp/kmacro.el (kmacro): New OClosure type.
(kmacro-ring-head): Use `kmacro` constructor.
(kmacro-push-ring): Convert `elt` from old representation if needed.
(kmacro-split-ring-element, kmacro-view-ring-2nd, kmacro-view-macro):
Adapt to new representation.
(kmacro-exec-ring-item): Turn into obsolete alias.
(kmacro-call-ring-2nd, kmacro-end-or-call-macro): Adjust accordingly.
(kmacro-start-macro): Simplify call to `kmacro-push-ring`.
(kmacro): New constructor function.  Replaces `kmacro-lambda-form`.
(kmacro-lambda-form): Use it and declare obsolete.
(kmacro-extract-lambda): Rewrite and declare obsolete.
(kmacro-p): Rewrite.
(cl-print-object): New method.
(kmacro-bind-to-key, kmacro-name-last-macro): Simplify.

* lisp/macros.el (macro--string-to-vector): New function.
(insert-kbd-macro): Use it.  Generate code using the `kmacro` constructor.

* test/lisp/kmacro-tests.el (kmacro-tests-kmacro-bind-to-single-key):
Silence warning.
(kmacro-tests-name-last-macro-bind-and-rebind): Strengthen the test a bit.
(kmacro-tests--cl-print): New test.
2022-04-01 20:07:33 -04:00
..
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-25 09:38:50 -08:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:07:15 -05:00
2022-03-30 13:16:54 +02:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00
2022-01-27 09:45:49 +01:00
2022-01-01 02:45:51 -05:00
2022-01-18 16:42:19 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-03-22 15:28:02 +01:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-14 12:10:46 +01:00
2022-01-01 07:03:03 -05:00
2022-02-17 16:30:42 +02:00
2022-03-23 20:25:33 +08:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:07:15 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00
2022-01-22 15:13:27 +01:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 07:03:03 -05:00
2022-01-01 02:45:51 -05:00
2022-01-01 02:45:51 -05:00