diff options
| author | Richard M. Stallman | 1993-03-07 07:32:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-03-07 07:32:47 +0000 |
| commit | ecc71b7f7d22cc90df74678375f54645c007f96b (patch) | |
| tree | a4efe8711398dbbe26389cbbbbcb16d2d6a3fb8f | |
| parent | a3b75b3f69fccbd279c0f1f32478c80346829b4d (diff) | |
| download | emacs-ecc71b7f7d22cc90df74678375f54645c007f96b.tar.gz emacs-ecc71b7f7d22cc90df74678375f54645c007f96b.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/emacs-lisp/levents.el | 118 |
1 files changed, 2 insertions, 116 deletions
diff --git a/lisp/emacs-lisp/levents.el b/lisp/emacs-lisp/levents.el index c4c787521e5..b2a91f8dc1e 100644 --- a/lisp/emacs-lisp/levents.el +++ b/lisp/emacs-lisp/levents.el | |||
| @@ -23,125 +23,11 @@ | |||
| 23 | ;; It is not possible to emulate current-mouse-event as a variable, | 23 | ;; It is not possible to emulate current-mouse-event as a variable, |
| 24 | ;; though it is not hard to obtain the data from (this-command-keys). | 24 | ;; though it is not hard to obtain the data from (this-command-keys). |
| 25 | 25 | ||
| 26 | ;; We don't have variables last-command-event and last-input-event; | ||
| 27 | ;; instead, we made last-...-char have these values. | ||
| 28 | |||
| 29 | ;; We do not have a variable unread-command-event; | 26 | ;; We do not have a variable unread-command-event; |
| 30 | ;; instead, we have the more general unread-command-events. | 27 | ;; instead, we have the more general unread-command-events. |
| 31 | 28 | ||
| 32 | ;; We could support those variables with C code as part of a merge. | 29 | ;; Our read-key-sequence and read-char are not precisely |
| 33 | 30 | ;; compatible with those in Lucid Emacs, but they should work ok. | |
| 34 | ;;current-mouse-event | ||
| 35 | |||
| 36 | ;;The mouse-button event which invoked this command, or nil. | ||
| 37 | ;;This is what (interactive "e") returns. | ||
| 38 | |||
| 39 | ;;------------------------------ | ||
| 40 | ;;last-command-event | ||
| 41 | |||
| 42 | ;;Last keyboard or mouse button event that was part of a command. This | ||
| 43 | ;;variable is off limits: you may not set its value or modify the event that | ||
| 44 | ;;is its value, as it is destructively modified by read-key-sequence. If | ||
| 45 | ;;you want to keep a pointer to this value, you must use copy-event. | ||
| 46 | |||
| 47 | ;;------------------------------ | ||
| 48 | ;;last-input-event | ||
| 49 | |||
| 50 | ;;Last keyboard or mouse button event recieved. This variable is off | ||
| 51 | ;;limits: you may not set its value or modify the event that is its value, as | ||
| 52 | ;;it is destructively modified by next-event. If you want to keep a pointer | ||
| 53 | ;;to this value, you must use copy-event. | ||
| 54 | |||
| 55 | ;;------------------------------ | ||
| 56 | ;;unread-command-event | ||
| 57 | |||
| 58 | ;;Set this to an event object to simulate the reciept of an event from | ||
| 59 | ;;the user. Normally this is nil. | ||
| 60 | |||
| 61 | ;;[The variable unread-command-char no longer exists, because with the new event | ||
| 62 | ;; model, it is incorrect for code to do (setq unread-command-char (read-char)), | ||
| 63 | ;; because all user-input can't be represented as ASCII characters. | ||
| 64 | |||
| 65 | ;; A compatibility hack could be added to check unread-command-char as well as | ||
| 66 | ;; unread-command-event; or to only use unread-command-char and allow it to be | ||
| 67 | ;; an ASCII code or an event, but I think that's a bad idea because it would | ||
| 68 | ;; allow incorrect code to work so long as someone didn't type a character | ||
| 69 | ;; without an ASCII equivalent, making it likely that such code would not get | ||
| 70 | ;; fixed.] | ||
| 71 | |||
| 72 | |||
| 73 | ;;Other related functions: | ||
| 74 | ;;============================== | ||
| 75 | |||
| 76 | ;;read-char () | ||
| 77 | |||
| 78 | ;;Read a character from the command input (keyboard or macro). | ||
| 79 | ;;If a mouse click is detected, an error is signalled. The character typed | ||
| 80 | ;;is returned as an ASCII value. This is most likely the wrong thing for you | ||
| 81 | ;;to be using: consider using the `next-command-event' function instead. | ||
| 82 | |||
| 83 | ;;------------------------------ | ||
| 84 | ;;read-key-sequence (prompt) | ||
| 85 | |||
| 86 | ;;Read a sequence of keystrokes or mouse clicks and return a vector of the | ||
| 87 | ;;event objects read. The vector is newly created, but the event objects are | ||
| 88 | ;;reused: if you want to hold a pointer to them beyond the next call to this | ||
| 89 | ;;function, you must copy them first. | ||
| 90 | |||
| 91 | ;;The sequence read is sufficient to specify a non-prefix command starting | ||
| 92 | ;;from the current local and global keymaps. A C-g typed while in this | ||
| 93 | ;;function is treated like any other character, and quit-flag is not set. | ||
| 94 | ;;One arg, PROMPT, is a prompt string, or nil meaning do not prompt specially. | ||
| 95 | |||
| 96 | ;;If the user selects a menu item while we are prompting for a key-sequence, | ||
| 97 | ;;the returned value will be a vector of a single menu-selection event. | ||
| 98 | ;;An error will be signalled if you pass this value to lookup-key or a | ||
| 99 | ;;related function. | ||
| 100 | |||
| 101 | ;;------------------------------ | ||
| 102 | ;;recent-keys () | ||
| 103 | |||
| 104 | ;;Return vector of last 100 keyboard or mouse button events read. | ||
| 105 | ;;This copies 100 event objects and a vector; it is safe to keep and modify | ||
| 106 | ;;them. | ||
| 107 | ;;------------------------------ | ||
| 108 | |||
| 109 | |||
| 110 | ;;Other related variables: | ||
| 111 | ;;============================== | ||
| 112 | |||
| 113 | ;;executing-kbd-macro | ||
| 114 | |||
| 115 | ;;Currently executing keyboard macro (a vector of events); | ||
| 116 | ;;nil if none executing. | ||
| 117 | |||
| 118 | ;;------------------------------ | ||
| 119 | ;;executing-macro | ||
| 120 | |||
| 121 | ;;Currently executing keyboard macro (a vector of events); | ||
| 122 | ;;nil if none executing. | ||
| 123 | |||
| 124 | ;;------------------------------ | ||
| 125 | ;;last-command-char | ||
| 126 | |||
| 127 | ;;If the value of last-command-event is a keyboard event, then | ||
| 128 | ;;this is the nearest ASCII equivalent to it. This the the value that | ||
| 129 | ;;self-insert-command will put in the buffer. Remember that there is | ||
| 130 | ;;NOT a 1:1 mapping between keyboard events and ASCII characters: the set | ||
| 131 | ;;of keyboard events is much larger, so writing code that examines this | ||
| 132 | ;;variable to determine what key has been typed is bad practice, unless | ||
| 133 | ;;you are certain that it will be one of a small set of characters. | ||
| 134 | |||
| 135 | ;;------------------------------ | ||
| 136 | ;;last-input-char | ||
| 137 | |||
| 138 | ;;If the value of last-input-event is a keyboard event, then | ||
| 139 | ;;this is the nearest ASCII equivalent to it. Remember that there is | ||
| 140 | ;;NOT a 1:1 mapping between keyboard events and ASCII characters: the set | ||
| 141 | ;;of keyboard events is much larger, so writing code that examines this | ||
| 142 | ;;variable to determine what key has been typed is bad practice, unless | ||
| 143 | ;;you are certain that it will be one of a small set of characters. | ||
| 144 | |||
| 145 | 31 | ||
| 146 | ;;; Code: | 32 | ;;; Code: |
| 147 | 33 | ||