diff options
| author | Richard M. Stallman | 1993-05-22 20:25:08 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-05-22 20:25:08 +0000 |
| commit | e74865eeac7b7b0a190ead5908adc91eb5111ad7 (patch) | |
| tree | eb35e6b2e387962999039950a5739222e654411e /lisp | |
| parent | 1dfdf9e28e83d6c6c8aa887b011275562b3d39bc (diff) | |
| download | emacs-e74865eeac7b7b0a190ead5908adc91eb5111ad7.tar.gz emacs-e74865eeac7b7b0a190ead5908adc91eb5111ad7.zip | |
(event-modifiers): Function deleted.
(read-command-event): For switch-frame event, call select-frame.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/levents.el | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/lisp/emacs-lisp/levents.el b/lisp/emacs-lisp/levents.el index 1c67ba946fb..af96a07a2a7 100644 --- a/lisp/emacs-lisp/levents.el +++ b/lisp/emacs-lisp/levents.el | |||
| @@ -139,52 +139,6 @@ The value is an ASCII printing character (not upper case) or a symbol." | |||
| 139 | (let ((base (logand event (1- (lsh 1 18))))) | 139 | (let ((base (logand event (1- (lsh 1 18))))) |
| 140 | (downcase (if (< base 32) (logior base 64) base))))) | 140 | (downcase (if (< base 32) (logior base 64) base))))) |
| 141 | 141 | ||
| 142 | (defun event-modifiers (event) | ||
| 143 | "Returns a list of symbols representing the modifier keys in event EVENT. | ||
| 144 | The elements of the list may include `meta', `control', | ||
| 145 | `shift', `hyper', `super', `alt'. | ||
| 146 | See also the function `event-modifier-bits'." | ||
| 147 | (let ((type event)) | ||
| 148 | (if (listp type) | ||
| 149 | (setq type (car type))) | ||
| 150 | (if (symbolp type) | ||
| 151 | (cdr (get type 'event-symbol-elements)) | ||
| 152 | (let ((list nil)) | ||
| 153 | (or (zerop (logand type (lsh 1 23))) | ||
| 154 | (setq list (cons 'meta list))) | ||
| 155 | (or (and (zerop (logand type (lsh 1 22))) | ||
| 156 | (>= (logand type 127) 32)) | ||
| 157 | (setq list (cons 'control list))) | ||
| 158 | (or (and (zerop (logand type (lsh 1 21))) | ||
| 159 | (= (logand type 255) (downcase (logand type 255)))) | ||
| 160 | (setq list (cons 'shift list))) | ||
| 161 | (or (zerop (logand type (lsh 1 20))) | ||
| 162 | (setq list (cons 'hyper list))) | ||
| 163 | (or (zerop (logand type (lsh 1 19))) | ||
| 164 | (setq list (cons 'super list))) | ||
| 165 | (or (zerop (logand type (lsh 1 18))) | ||
| 166 | (setq list (cons 'alt list))) | ||
| 167 | list)))) | ||
| 168 | |||
| 169 | (defun event-modifier-bits (event) | ||
| 170 | "Returns a number representing the modifier keys in event EVENT. | ||
| 171 | See also the function `event-modifiers'." | ||
| 172 | (let ((type event)) | ||
| 173 | (if (listp type) | ||
| 174 | (setq type (car type))) | ||
| 175 | (if (symbolp type) | ||
| 176 | (logand (lsh 63 18) | ||
| 177 | (nth 1 (get type 'event-symbol-element-mask))) | ||
| 178 | (let ((bits (logand type (lsh 63 18))) | ||
| 179 | (base (logand type 127))) | ||
| 180 | ;; Put in Control and Shift bits | ||
| 181 | ;; in the cases where the basic code expresses them. | ||
| 182 | (if (< base 32) | ||
| 183 | (setq bits (logior (lsh 1 22) bits))) | ||
| 184 | (if (/= base (downcase base)) | ||
| 185 | (setq bits (logior (lsh 1 21) bits))) | ||
| 186 | bits)))) | ||
| 187 | |||
| 188 | (defun event-object (event) | 142 | (defun event-object (event) |
| 189 | "Returns the function argument of the given timeout, menu, or eval event." | 143 | "Returns the function argument of the given timeout, menu, or eval event." |
| 190 | (nth 2 event)) | 144 | (nth 2 event)) |
| @@ -276,7 +230,7 @@ an existing event object." | |||
| 276 | (cond ((eq type 'eval) | 230 | (cond ((eq type 'eval) |
| 277 | (funcall (nth 1 event) (nth 2 event))) | 231 | (funcall (nth 1 event) (nth 2 event))) |
| 278 | ((eq type 'switch-frame) | 232 | ((eq type 'switch-frame) |
| 279 | (internal-select-frame (nth 1 event)))))) | 233 | (select-frame (nth 1 event)))))) |
| 280 | event)) | 234 | event)) |
| 281 | 235 | ||
| 282 | (defun process-event-p (obj) | 236 | (defun process-event-p (obj) |