summaryrefslogtreecommitdiff
path: root/test/lisp/repeat-tests.el
AgeCommit message (Collapse)Author
2026-01-01; Add 2026 to copyright years.Sean Whitton
2025-06-19Fix repeat-echo-message-string for keys with hints (bug#78797).Juri Linkov
* lisp/repeat.el (repeat-echo-message-string): For one character use it to format hints. For multi-key sequence first print it, then use the last character to format hints in parenthesis. * test/lisp/repeat-tests.el (repeat-tests-another-repeat-map): Add hints. (repeat-tests-hints): Add test.
2025-06-11* test/lisp/repeat-tests.el: Add a command for global continue.Juri Linkov
(repeat-tests-call-g): New command (bug#78742). Put 'repeat-continue' with t on this symbol. (repeat-tests-global-map): Bind it to 'C-M-g'. (repeat-tests-continue-another): Add 'C-M-g' that should continue.
2025-06-11Improve repeat-continue property handlingPaul Nelson
* lisp/repeat.el (repeat-get-map-sym): Support 'repeat-continue' property value of t to continue any active repeat map (suggested by Karthik Chikmagalur <karthikchikmagalur@gmail.com>). Simplify logic so that repeat-continue does not interfere with repeat-map activation. (repeat-check-map): Allow commands with 'repeat-continue' property value of t to continue without checking the key. (repeat-mode): Update and tweak docstring. * lisp/bind-key.el (bind-keys-form): Update handling of ':continue-only' keyword: only add keymap to 'repeat-continue' if current value is a list. (bind-keys): Update documentation, mirroring bind-keys-form. * lisp/keymap.el (defvar-keymap): Update handling of ':continue' keyword: only add keymap to 'repeat-continue' if current value is a list. * test/lisp/repeat-tests.el (repeat-tests-continue) (repeat-tests-continue-another): Enable previously commented tests that now work correctly. * etc/NEWS: Update announcement of 'repeat-continue' (bug#78742).
2025-06-10* test/lisp/repeat-tests.el: Add a command to continue but not activate.Juri Linkov
(repeat-tests-call-e): New command. (repeat-tests-global-map): Bind it to 'C-M-e'. (repeat-tests-another-repeat-map, repeat-tests-repeat-map): Add 'repeat-tests-call-e' to :continue. (repeat-tests-continue, repeat-tests-continue-another): Add 'C-M-e' that should continue but not activate.
2025-02-27Add :continue-only directive to bind-keys and use-packagePaul Nelson
* lisp/bind-key.el (bind-keys-form): Add :continue-only binding. Fix indentation. * lisp/use-package/use-package-bind-key.el (use-package-normalize-binder): Add check for :continue-only. * test/lisp/repeat-tests.el (repeat-tests-bind-keys): Enable (and correct) test for :continue-only (bug#74140).
2025-01-14Fix repeat-mode to keep the same map symbol for repeat-continueJuri Linkov
* lisp/repeat.el (repeat-get-map-sym): New function refactored from 'repeat-get-map'. (repeat-get-map): Move continue-related code to 'repeat-get-map-sym'. (repeat-pre-hook): Use 'repeat-get-map-sym' and 'repeat-get-map'. Set 'repeat-map' to 'map-sym'. (repeat-post-hook): Use 'repeat-get-map-sym'. * test/lisp/repeat-tests.el (repeat-tests-continue-another): Improve to invoke double key 'C-M-o C-M-o' that should not switch between maps (bug#74140).
2025-01-01Update copyright year to 2025Paul Eggert
Run "TZ=UTC0 admin/update-copyright".
2024-12-17Rename the property 'repeat-continue-only' to 'repeat-continue'Juri Linkov
* doc/lispref/keymaps.texi (Creating Keymaps): * lisp/keymap.el (defvar-keymap): * lisp/repeat.el (repeat-get-map, describe-repeat-maps): * test/lisp/repeat-tests.el (repeat-tests-another-repeat-map) (repeat-tests-repeat-map): Replace 'repeat-continue-only' with 'repeat-continue' (bug#74140).
2024-12-17Improve support of property repeat-continue-only in repeat-mode (bug#74140)Juri Linkov
* lisp/repeat.el (repeat-get-map): Add optional arg 'rep-map'. Move the check for 'repeat-continue-only' from 'repeat-pre-hook'. Improve its logic to check if the current map 'repeat-in-progress' exists in the list from the 'repeat-continue-only' property. (repeat-post-hook): Set 'repeat-in-progress' to the symbol from the property 'repeat-map'. * test/lisp/repeat-tests.el (repeat-tests-another-repeat-map): Add new keymap to test multiple parallel repeat-maps. (repeat-tests-continue-another): New test that uses commands from 'repeat-tests-another-repeat-map' shared with 'repeat-tests-repeat-map'.
2024-12-03Add new keyword :continue-only to defvar-keymap for repeat-mode (bug#74140)Juri Linkov
* doc/lispref/keymaps.texi (Creating Keymaps): Add :continue-only to :repeat part of defvar-keymap. * lisp/keymap.el (defvar-keymap): Add support for new :repeat keyword :continue-only. * lisp/repeat.el (repeat-post-hook): The property 'repeat-continue-only' is handled as a list of repeat-maps. * test/lisp/repeat-tests.el (repeat-tests-repeat-map): Use new :repeat keyword :continue-only.
2024-11-27Add command symbol property 'repeat-continue-only' for 'repeat-mode'Juri Linkov
* lisp/repeat.el: (repeat-post-hook): Ignore commands with 'repeat-continue-only' symbol property when repeat was not in progress (bug#74140). * test/lisp/repeat-tests.el (repeat-tests-continue-only): New test. (repeat-tests-bind-keys): Prepare for :continue-only.
2024-11-27* test/lisp/repeat-tests.el: Improve using new key mnemonics (bug#74140).Juri Linkov
(repeat-tests-repeat-map): Use :repeat keywords with :enter and :exit for 'defvar-keymap'. (with-repeat-mode): Add new arg 'map' to defmacro. (repeat-tests-check-key, repeat-tests-exit-key) (repeat-tests-keep-prefix): Use new key mnemonics. (repeat-tests-exit-command): New test. (repeat-tests-bind-keys): New test for 'bind-keys' from 'use-package'.
2024-01-02; Add 2024 to copyright yearsPo Lu
2023-01-01; Add 2023 to copyright years.Eli Zaretskii
2022-12-20* lisp/repeat.el: Fix repeat-keep-prefix to allow customizing it to non-nil.Juri Linkov
* lisp/repeat.el (repeat-keep-prefix): Add or remove 'repeat-pre-hook' depending on the customized value. (repeat-mode): Add or remove 'repeat-pre-hook' to/from 'pre-command-hook' when 'repeat-keep-prefix' is non-nil. (repeat-pre-hook): New function. (repeat-get-map, repeat-check-map): New function refactored from 'repeat-post-hook'. (repeat-post-hook): Move some code to smaller functions. (describe-repeat-maps): Set outline-regexp without ^L. * test/lisp/repeat-tests.el (repeat-tests-keep-prefix): Uncomment test case that is fixed now in bug#51281 and bug#55986.
2022-01-01Merge from origin/emacs-28Eli Zaretskii
836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
2022-01-01; Add 2022 to copyright years.Eli Zaretskii
2021-12-26Use defvar-keymap in testsStefan Kangas
* test/lisp/button-tests.el (button-tests--map): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-keymap): * test/lisp/help-tests.el (help-tests-remap-map) (help-tests-major-mode-map, help-tests-minor-mode-map): * test/lisp/kmacro-tests.el (kmacro-tests-keymap): * test/lisp/repeat-tests.el (repeat-tests-map) (repeat-tests-repeat-map): * test/src/keymap-tests.el (keymap-tests-minor-mode-map) (keymap-tests-major-mode-map): Use defvar-keymap.
2021-11-30* lisp/repeat.el: Fix long-standing problem when a random key activates mapJuri Linkov
* lisp/repeat.el (repeat-check-key): New defcustom (bug#51390). (repeat--command-property): New internal function. (repeat-check-key): New function. (repeat-post-hook): Use repeat--command-property and repeat-check-key. * test/lisp/repeat-tests.el (repeat-tests-check-key): New test.
2021-11-30* test/lisp/repeat-tests.el (repeat-tests-call-b): Test for commit 588caf0b27.Juri Linkov
This tests for 'repeat-map' as a variable instead of a symbol.
2021-10-24* test/lisp/repeat-tests.el: New file.Juri Linkov