comparison lisp/term/sun-mouse.el @ 1623:bdd72dc49c66

* bytecomp.el: Declare unread-command-char an obsolete variable. * vip.el (vip-escape-to-emacs, vip-prefix-arg-value, vip-prefix-arg-com): Use unread-command-event instead of unread-command-char; respect its new semantics. * sun-mouse.el (mouse-second-hit): Same.
author Jim Blandy <jimb@redhat.com>
date Mon, 16 Nov 1992 01:43:35 +0000
parents acdf9d64d086
children 04fb1d3d6992
comparison
equal deleted inserted replaced
1622:dd7b72d023ad 1623:bdd72dc49c66
316 "Returns the next mouse hit occurring within HIT-WAIT milliseconds." 316 "Returns the next mouse hit occurring within HIT-WAIT milliseconds."
317 (if (sit-for-millisecs hit-wait) nil ; No input within hit-wait millisecs. 317 (if (sit-for-millisecs hit-wait) nil ; No input within hit-wait millisecs.
318 (let ((pc1 (read-char))) 318 (let ((pc1 (read-char)))
319 (if (or (not (equal pc1 mouse-prefix1)) 319 (if (or (not (equal pc1 mouse-prefix1))
320 (sit-for-millisecs 3)) ; a mouse prefix will have second char 320 (sit-for-millisecs 3)) ; a mouse prefix will have second char
321 (progn (setq unread-command-char pc1) ; Can get away with one unread. 321 (progn (setq unread-command-event pc1) ; Can get away with one unread.
322 nil) ; Next input not mouse event. 322 nil) ; Next input not mouse event.
323 (let ((pc2 (read-char))) 323 (let ((pc2 (read-char)))
324 (if (not (equal pc2 mouse-prefix2)) 324 (if (not (equal pc2 mouse-prefix2))
325 (progn (setq unread-command-char pc1) ; put back the ^X 325 (progn (setq unread-command-event pc1) ; put back the ^X
326 ;;; Too bad can't do two: (setq unread-command-char (list pc1 pc2)) 326 ;;; Too bad can't do two: (setq unread-command-event (list pc1 pc2))
327 (ding) ; user will have to retype that pc2. 327 (ding) ; user will have to retype that pc2.
328 nil) ; This input is not a mouse event. 328 nil) ; This input is not a mouse event.
329 ;; Next input has mouse prefix and is within time limit. 329 ;; Next input has mouse prefix and is within time limit.
330 (let ((new-hit (mouse-hit-read))) ; Read the new hit. 330 (let ((new-hit (mouse-hit-read))) ; Read the new hit.
331 (if (sm::hit-up-p new-hit) ; Ignore up events when timing. 331 (if (sm::hit-up-p new-hit) ; Ignore up events when timing.