Mercurial > hg > xemacs-beta
annotate tests/automated/keymap-tests.el @ 5793:cf0201de66df
Help buffer behaviour synced with GNU
lisp/ChangeLog:
2014-04-19 Mats Lidell <matsl@xemacs.org>
* help.el: Sync from GNU - Link to customize if applicable and
display version info. Other changes: Remove use of button-2.
return and button-1 use activate-function. Move between
activate-function-extents with tab.
tests/ChangeLog:
2014-04-19 Mats Lidell <matsl@xemacs.org>
* automated/keymap-tests.el: Use
help-activate-function-or-scroll-up.
author | Mats Lidell <mats.lidell@cag.se> |
---|---|
date | Fri, 25 Apr 2014 23:38:16 +0200 |
parents | a81a739181dc |
children | e34c3557e14e |
rev | line source |
---|---|
5679
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
1 ;; Copyright (C) 2012 Free Software Foundation, Inc. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
2 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
3 ;; Author: Aidan Kehoe <kehoea@parhasard.net> |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
4 ;; Maintainers: Aidan Kehoe <kehoea@parhasard.net> |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
5 ;; Created: 2012 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
6 ;; Keywords: tests |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
7 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
8 ;; This file is part of XEmacs. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
9 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
10 ;; XEmacs is free software: you can redistribute it and/or modify it |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
11 ;; under the terms of the GNU General Public License as published by the |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
12 ;; Free Software Foundation, either version 3 of the License, or (at your |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
13 ;; option) any later version. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
14 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
15 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
16 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
17 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
18 ;; for more details. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
19 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
20 ;; You should have received a copy of the GNU General Public License |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
21 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
22 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
23 ;;; Synched up with: Not in FSF. |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
24 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
25 (let* ((map (make-keymap 'help-map-copy)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
26 (parent-map (make-keymap 'help-map-copy-parent)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
27 (help-map-copy t) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
28 (minor-mode-map-alist (acons 'help-map-copy map minor-mode-map-alist))) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
29 (set-keymap-parent map parent-map) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
30 (loop for (keys def) on '((shift tab) help-prev-symbol tab |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
31 help-next-symbol c customize-variable V |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
32 find-variable-at-point q |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
33 help-mode-quit f find-function-at-point d |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
34 describe-function-at-point v |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
35 describe-variable-at-point i Info-elisp-ref F |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
36 find-function-at-point Q help-mode-bury button2 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
37 help-mouse-find-source-or-track p |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
38 help-prev-section n help-next-section return |
5793
cf0201de66df
Help buffer behaviour synced with GNU
Mats Lidell <mats.lidell@cag.se>
parents:
5679
diff
changeset
|
39 help-activate-function-or-scroll-up) |
5679
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
40 by #'cddr |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
41 do (define-key map (vector keys) def)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
42 (loop for (keys def) on '(u view-scroll-some-lines-down % view-goto-percent |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
43 \2 digit-argument p view-goto-percent \? |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
44 view-search-backward - negative-argument k |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
45 view-scroll-lines-down backspace scroll-down G |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
46 view-last-windowful f scroll-up \5 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
47 digit-argument s view-repeat-search \0 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
48 digit-argument n view-repeat-search = what-line |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
49 \\ view-search-backward delete scroll-down \8 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
50 digit-argument E view-file d |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
51 view-scroll-some-lines-up \3 digit-argument q |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
52 view-quit ! shell-command (control j) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
53 view-scroll-lines-up (control m) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
54 view-scroll-lines-up y view-scroll-lines-down |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
55 linefeed view-scroll-lines-up g view-goto-line |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
56 \6 digit-argument t toggle-truncate-lines C |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
57 view-cleanup-backspaces b scroll-down \1 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
58 digit-argument P view-buffer return |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
59 view-scroll-lines-up | shell-command-on-region j |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
60 view-scroll-lines-up \9 digit-argument \' |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
61 register-to-point e view-scroll-lines-up \4 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
62 digit-argument r recenter space scroll-up / |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
63 view-search-forward N view-buffer m |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
64 point-to-register h view-mode-describe \7 |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
65 digit-argument |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
66 find-function-at-point view-mode-describe) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
67 by #'cddr |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
68 do (define-key parent-map (vector keys) def)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
69 (Assert (eq (key-binding [F]) 'find-function-at-point) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
70 "checking normal key lookup works, F") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
71 (Assert (eq (key-binding [c]) 'customize-variable) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
72 "checking normal key lookup works, c") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
73 (Assert (eq (key-binding [\2]) 'digit-argument) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
74 "checking normal key parent lookup works, \\2") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
75 (Assert (eq (key-binding [|]) 'shell-command-on-region) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
76 "checking normal key parent lookup works, |") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
77 (define-key map [remap find-function-at-point] #'find-file) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
78 (Assert (eq (key-binding [F]) 'find-file) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
79 "checking remapped key lookup works, F") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
80 (Assert (eq (key-binding [f]) 'find-file) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
81 "checking remapped key lookup works, f") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
82 (Assert (eq (key-binding [\2]) 'digit-argument) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
83 "checking normal key parent lookup works, \\2") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
84 (Assert (eq (key-binding [|]) 'shell-command-on-region) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
85 "checking normal key parent lookup works, |") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
86 (Assert (eq (key-binding [find-function-at-point]) 'view-mode-describe) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
87 "checking remapped function doesn't affect key name mapping") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
88 (define-key parent-map [remap help-next-symbol] #'find-file) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
89 (Assert (eq (key-binding [tab]) 'find-file) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
90 "checking remapping in parent extends to child") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
91 (Assert (equal (commands-remapped-to 'find-file) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
92 '(help-next-symbol find-function-at-point)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
93 "checking #'commands-remapped-to is sane") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
94 (Check-Error wrong-type-argument (commands-remapped-to pi)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
95 (Check-Error wrong-type-argument (commands-remapped-to 'find-file pi)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
96 (Check-Error wrong-type-argument (commands-remapped-to 'find-file nil pi)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
97 (Assert (eq (command-remapping 'find-function-at-point) 'find-file) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
98 "checking #'command-remapping is sane") |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
99 (Check-Error wrong-type-argument (command-remapping pi)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
100 (Check-Error wrong-type-argument (command-remapping 'find-function-at-point |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
101 pi)) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
102 (Check-Error wrong-type-argument (command-remapping 'find-function-at-point |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
103 nil pi))) |
a81a739181dc
Add command remapping, a more robust alternative to #'substitute-key-definition
Aidan Kehoe <kehoea@parhasard.net>
parents:
diff
changeset
|
104 |