diff options
| author | Lars Ingebrigtsen | 2021-10-19 05:07:51 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-10-19 05:07:51 +0200 |
| commit | f3aa648093a70c8ed15e764863a16fdf7126cdc4 (patch) | |
| tree | 5ae07cc4cdf169764733939c64052a5feb7b5c68 /test/src | |
| parent | 5c996471babfca2ac54591f7182d31fe7df151f0 (diff) | |
| download | emacs-f3aa648093a70c8ed15e764863a16fdf7126cdc4.tar.gz emacs-f3aa648093a70c8ed15e764863a16fdf7126cdc4.zip | |
Make `lookup-key' understand the new key sequence syntax
* src/keymap.c (possibly_translate_key_sequence): Factored out
into own function.
(Fdefine_key):
(Flookup_key): Use it.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/keymap-tests.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/src/keymap-tests.el b/test/src/keymap-tests.el index 68b42c346c9..13f47b45f81 100644 --- a/test/src/keymap-tests.el +++ b/test/src/keymap-tests.el | |||
| @@ -317,6 +317,13 @@ g .. h foo | |||
| 317 | (should (equal (single-key-description 'C-s-home) | 317 | (should (equal (single-key-description 'C-s-home) |
| 318 | "C-s-<home>"))) | 318 | "C-s-<home>"))) |
| 319 | 319 | ||
| 320 | (ert-deftest keymap-test-lookups () | ||
| 321 | (should (eq (lookup-key (current-global-map) "\C-x\C-f") 'find-file)) | ||
| 322 | (should (eq (lookup-key (current-global-map) [(control x) (control f)]) | ||
| 323 | 'find-file)) | ||
| 324 | (should (eq (lookup-key (current-global-map) ["C-x C-f"]) 'find-file)) | ||
| 325 | (should (eq (lookup-key (current-global-map) [?\C-x ?\C-f]) 'find-file))) | ||
| 326 | |||
| 320 | (provide 'keymap-tests) | 327 | (provide 'keymap-tests) |
| 321 | 328 | ||
| 322 | ;;; keymap-tests.el ends here | 329 | ;;; keymap-tests.el ends here |