| 1030 | | (interactive (list (viper-read-key-sequence "Describe key: ")) |
|---|
| 1031 | | )) |
|---|
| | 1030 | (interactive (let (key) |
|---|
| | 1031 | (setq key (viper-read-key-sequence |
|---|
| | 1032 | "Describe key (or click or menu item): ")) |
|---|
| | 1033 | (list key |
|---|
| | 1034 | (prefix-numeric-value current-prefix-arg) |
|---|
| | 1035 | ;; If KEY is a down-event, read also the |
|---|
| | 1036 | ;; corresponding up-event. |
|---|
| | 1037 | (and (vectorp key) |
|---|
| | 1038 | (let ((last-idx (1- (length key)))) |
|---|
| | 1039 | (and (eventp (aref key last-idx)) |
|---|
| | 1040 | (memq 'down (event-modifiers |
|---|
| | 1041 | (aref key last-idx))))) |
|---|
| | 1042 | (or (and (eventp (aref key 0)) |
|---|
| | 1043 | (memq 'down (event-modifiers |
|---|
| | 1044 | (aref key 0))) |
|---|
| | 1045 | ;; For the C-down-mouse-2 popup |
|---|
| | 1046 | ;; menu, there is no subsequent up-event. |
|---|
| | 1047 | (= (length key) 1)) |
|---|
| | 1048 | (and (> (length key) 1) |
|---|
| | 1049 | (eventp (aref key 1)) |
|---|
| | 1050 | (memq 'down (event-modifiers (aref key 1))))) |
|---|
| | 1051 | (read-event)))))) |
|---|
| 1036 | | (interactive (list (viper-read-key-sequence "Describe key briefly: ")))) |
|---|
| 1037 | | |
|---|
| | 1056 | (interactive (let (key) |
|---|
| | 1057 | (setq key (viper-read-key-sequence |
|---|
| | 1058 | "Describe key (or click or menu item): ")) |
|---|
| | 1059 | ;; If KEY is a down-event, read and discard the |
|---|
| | 1060 | ;; corresponding up-event. |
|---|
| | 1061 | (and (vectorp key) |
|---|
| | 1062 | (let ((last-idx (1- (length key)))) |
|---|
| | 1063 | (and (eventp (aref key last-idx)) |
|---|
| | 1064 | (memq 'down (event-modifiers (aref key last-idx))))) |
|---|
| | 1065 | (read-event)) |
|---|
| | 1066 | (list key |
|---|
| | 1067 | (if current-prefix-arg |
|---|
| | 1068 | (prefix-numeric-value current-prefix-arg)) |
|---|
| | 1069 | 1)))) |
|---|