diff options
| author | Michael Kifer | 1996-02-16 19:01:53 +0000 |
|---|---|---|
| committer | Michael Kifer | 1996-02-16 19:01:53 +0000 |
| commit | f8169b5e8f3864b6e620cc7f9ca776110750f554 (patch) | |
| tree | aaf2514090c48c359f6f5afa8bbb21167db65d17 | |
| parent | ad3f069e2dd4119b38bb5e5739a3d73ebb2be32c (diff) | |
| download | emacs-f8169b5e8f3864b6e620cc7f9ca776110750f554.tar.gz emacs-f8169b5e8f3864b6e620cc7f9ca776110750f554.zip | |
(vip-event-key): ignore consp events.
| -rw-r--r-- | lisp/emulation/viper-util.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index e1e87102bfc..f486b661796 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el | |||
| @@ -776,7 +776,7 @@ that Viper doesn't know about.") | |||
| 776 | 776 | ||
| 777 | 777 | ||
| 778 | ;; Emacs has a bug in eventp, which causes (eventp nil) to return (nil) | 778 | ;; Emacs has a bug in eventp, which causes (eventp nil) to return (nil) |
| 779 | ;; instead of nil, if '(nil) was previously inadvertantly assigned to | 779 | ;; instead of nil, if '(nil) was previously inadvertently assigned to |
| 780 | ;; unread-command-events | 780 | ;; unread-command-events |
| 781 | (defun vip-event-key (event) | 781 | (defun vip-event-key (event) |
| 782 | (or (and event (eventp event)) | 782 | (or (and event (eventp event)) |
| @@ -801,10 +801,17 @@ that Viper doesn't know about.") | |||
| 801 | event event)) | 801 | event event)) |
| 802 | ;; Emacs has the oddity whereby characters 128+char | 802 | ;; Emacs has the oddity whereby characters 128+char |
| 803 | ;; represent M-char *if* this appears inside a string. | 803 | ;; represent M-char *if* this appears inside a string. |
| 804 | ;; So, we convert them manually into (mata char). | 804 | ;; So, we convert them manually to (meta char). |
| 805 | ((and (numberp event) (< ?\C-? event) (<= event 255)) | 805 | ((and (numberp event) (< ?\C-? event) (<= event 255)) |
| 806 | (setq mod '(meta) | 806 | (setq mod '(meta) |
| 807 | event (- event ?\C-? 1))) | 807 | event (- event ?\C-? 1))) |
| 808 | ;; If EVENT is a list, e.g., (switch-frame frame), we | ||
| 809 | ;; ignore it, since we can't save this kind of events in a | ||
| 810 | ;; textual form. In most cases, such events are created | ||
| 811 | ;; unintentionally, and ignoring them is the right thing. | ||
| 812 | ;; If an event of this kind was created intentionally during | ||
| 813 | ;; macro definition---too bad. | ||
| 814 | ((consp event) nil) | ||
| 808 | (t (event-basic-type event))) | 815 | (t (event-basic-type event))) |
| 809 | ))) | 816 | ))) |
| 810 | 817 | ||