aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/repeat-tests.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* Fix repeat-echo-message-string for keys with hints (bug#78797).Juri Linkov2025-06-191-3/+18
| | | | | | | | | * 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.
* * test/lisp/repeat-tests.el: Add a command for global continue.Juri Linkov2025-06-111-0/+12
| | | | | | | (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.
* Improve repeat-continue property handlingPaul Nelson2025-06-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | * 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).
* * test/lisp/repeat-tests.el: Add a command to continue but not activate.Juri Linkov2025-06-101-16/+34
| | | | | | | | | (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.
* Add :continue-only directive to bind-keys and use-packagePaul Nelson2025-02-271-4/+4
| | | | | | | | | | | * 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).
* Fix repeat-mode to keep the same map symbol for repeat-continueJuri Linkov2025-01-141-2/+5
| | | | | | | | | | | | | * 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).
* Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Rename the property 'repeat-continue-only' to 'repeat-continue'Juri Linkov2024-12-171-11/+11
| | | | | | | | | * 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).
* Improve support of property repeat-continue-only in repeat-mode (bug#74140)Juri Linkov2024-12-171-9/+54
| | | | | | | | | | | | | | | * 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'.
* Add new keyword :continue-only to defvar-keymap for repeat-mode (bug#74140)Juri Linkov2024-12-031-7/+4
| | | | | | | | | | | | | | * 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.
* Add command symbol property 'repeat-continue-only' for 'repeat-mode'Juri Linkov2024-11-271-2/+39
| | | | | | | | | * 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.
* * test/lisp/repeat-tests.el: Improve using new key mnemonics (bug#74140).Juri Linkov2024-11-271-77/+151
| | | | | | | | | | (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'.
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* * lisp/repeat.el: Fix repeat-keep-prefix to allow customizing it to non-nil.Juri Linkov2022-12-201-14/+16
| | | | | | | | | | | | | | | * 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.
* Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Use defvar-keymap in testsStefan Kangas2021-12-261-14/+10
|/ | | | | | | | | | | | * 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.
* * lisp/repeat.el: Fix long-standing problem when a random key activates mapJuri Linkov2021-11-301-0/+34
| | | | | | | | | * 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.
* * test/lisp/repeat-tests.el (repeat-tests-call-b): Test for commit 588caf0b27.Juri Linkov2021-11-301-1/+1
| | | | This tests for 'repeat-map' as a variable instead of a symbol.
* * test/lisp/repeat-tests.el: New file.Juri Linkov2021-10-241-0/+111