Mercurial > emacs
changeset 2039:e062b4567dc6
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 07 Mar 1993 07:32:47 +0000 |
parents | dd9ab1e9467e |
children | aa926beb4caa |
files | lisp/emacs-lisp/levents.el |
diffstat | 1 files changed, 2 insertions(+), 116 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/levents.el Sun Mar 07 04:25:47 1993 +0000 +++ b/lisp/emacs-lisp/levents.el Sun Mar 07 07:32:47 1993 +0000 @@ -23,125 +23,11 @@ ;; It is not possible to emulate current-mouse-event as a variable, ;; though it is not hard to obtain the data from (this-command-keys). -;; We don't have variables last-command-event and last-input-event; -;; instead, we made last-...-char have these values. - ;; We do not have a variable unread-command-event; ;; instead, we have the more general unread-command-events. -;; We could support those variables with C code as part of a merge. - -;;current-mouse-event - -;;The mouse-button event which invoked this command, or nil. -;;This is what (interactive "e") returns. - -;;------------------------------ -;;last-command-event - -;;Last keyboard or mouse button event that was part of a command. This -;;variable is off limits: you may not set its value or modify the event that -;;is its value, as it is destructively modified by read-key-sequence. If -;;you want to keep a pointer to this value, you must use copy-event. - -;;------------------------------ -;;last-input-event - -;;Last keyboard or mouse button event recieved. This variable is off -;;limits: you may not set its value or modify the event that is its value, as -;;it is destructively modified by next-event. If you want to keep a pointer -;;to this value, you must use copy-event. - -;;------------------------------ -;;unread-command-event - -;;Set this to an event object to simulate the reciept of an event from -;;the user. Normally this is nil. - -;;[The variable unread-command-char no longer exists, because with the new event -;; model, it is incorrect for code to do (setq unread-command-char (read-char)), -;; because all user-input can't be represented as ASCII characters. - -;; A compatibility hack could be added to check unread-command-char as well as -;; unread-command-event; or to only use unread-command-char and allow it to be -;; an ASCII code or an event, but I think that's a bad idea because it would -;; allow incorrect code to work so long as someone didn't type a character -;; without an ASCII equivalent, making it likely that such code would not get -;; fixed.] - - -;;Other related functions: -;;============================== - -;;read-char () - -;;Read a character from the command input (keyboard or macro). -;;If a mouse click is detected, an error is signalled. The character typed -;;is returned as an ASCII value. This is most likely the wrong thing for you -;;to be using: consider using the `next-command-event' function instead. - -;;------------------------------ -;;read-key-sequence (prompt) - -;;Read a sequence of keystrokes or mouse clicks and return a vector of the -;;event objects read. The vector is newly created, but the event objects are -;;reused: if you want to hold a pointer to them beyond the next call to this -;;function, you must copy them first. - -;;The sequence read is sufficient to specify a non-prefix command starting -;;from the current local and global keymaps. A C-g typed while in this -;;function is treated like any other character, and quit-flag is not set. -;;One arg, PROMPT, is a prompt string, or nil meaning do not prompt specially. - -;;If the user selects a menu item while we are prompting for a key-sequence, -;;the returned value will be a vector of a single menu-selection event. -;;An error will be signalled if you pass this value to lookup-key or a -;;related function. - -;;------------------------------ -;;recent-keys () - -;;Return vector of last 100 keyboard or mouse button events read. -;;This copies 100 event objects and a vector; it is safe to keep and modify -;;them. -;;------------------------------ - - -;;Other related variables: -;;============================== - -;;executing-kbd-macro - -;;Currently executing keyboard macro (a vector of events); -;;nil if none executing. - -;;------------------------------ -;;executing-macro - -;;Currently executing keyboard macro (a vector of events); -;;nil if none executing. - -;;------------------------------ -;;last-command-char - -;;If the value of last-command-event is a keyboard event, then -;;this is the nearest ASCII equivalent to it. This the the value that -;;self-insert-command will put in the buffer. Remember that there is -;;NOT a 1:1 mapping between keyboard events and ASCII characters: the set -;;of keyboard events is much larger, so writing code that examines this -;;variable to determine what key has been typed is bad practice, unless -;;you are certain that it will be one of a small set of characters. - -;;------------------------------ -;;last-input-char - -;;If the value of last-input-event is a keyboard event, then -;;this is the nearest ASCII equivalent to it. Remember that there is -;;NOT a 1:1 mapping between keyboard events and ASCII characters: the set -;;of keyboard events is much larger, so writing code that examines this -;;variable to determine what key has been typed is bad practice, unless -;;you are certain that it will be one of a small set of characters. - +;; Our read-key-sequence and read-char are not precisely +;; compatible with those in Lucid Emacs, but they should work ok. ;;; Code: