Hello! I have been working on blog posts about keyboard macros and found that it would be useful to have comparison functions for the keyboard macro counter. I implemented two functions to load and save macro counter values from and to number registers; three comparison functions of the macro counter with a number register that conditionally increment the counter; three comparison functions of the macro counter with a prefix that terminate the macro execution. This simplifies handling multiple counters and conditional macro termination. I am attaching the changes to: emacs.texi kmacro.texi NEWS kmacro.el kmacro-tests.el I hope this functionality is useful and that I followed the coding and style standards. Thanks! Advanced keyboard macro counter commands for register integration and conditional macro termination * doc/emacs/emacs.texi (Top): Document advanced keyboard macro counter commands. * doc/emacs/kmacro.texi (Keyboard Macros, Keyboard Macro Counter): Document advanced keyboard macro counter commands. * etc/NEWS: Document advanced keyboard macro counter commands. * lisp/kmacro.el (kmacro-keymap, kmacro-reg-load-counter) (kmacro-reg-save-counter, kmacro-reg-add-counter-equal) (kmacro-reg-add-counter-equal, kmacro-reg-add-counter-less) (kmacro-reg-add-counter-greater, kmacro-reg-add-counter) (kmacro-quit-counter-equal, kmacro-quit-counter-less) (kmacro-quit-counter-greater, kmacro-quit-counter): Add advanced keyboard macro counter commands to kmacro keymap. Implement advanced keyboard macro counter commands. * test/lisp/kmacro-tests.el (kmacro-tests-test-reg-load) (kmacro-tests-test-reg-save) (kmacro-tests-test-reg-add-counter-equal-01) (kmacro-tests-test-reg-add-counter-equal-02) (kmacro-tests-test-reg-add-counter-equal-03) (kmacro-tests-test-reg-add-counter-equal-04) (kmacro-tests-test-reg-add-counter-less) (kmacro-tests-test-reg-add-counter-greater) (kmacro-tests-test-quit-counter-equal-01) (kmacro-tests-test-quit-counter-equal-02) (kmacro-tests-test-quit-counter-equal-03) (kmacro-tests-test-quit-counter-equal-04) (kmacro-tests-test-quit-counter-less) (kmacro-tests-test-quit-counter-greater): Implement unit tests for advanced keyboard macro counter commands.