comparison lisp/term/sun-mouse.el @ 3591:507f64624555

Apply typo patches from Paul Eggert.
author Jim Blandy <jimb@redhat.com>
date Wed, 09 Jun 1993 11:59:12 +0000
parents 1c1a6e2961c2
children dd14d8d6e7db
comparison
equal deleted inserted replaced
3590:d5f22061277d 3591:507f64624555
63 "Return a copy of mousemap." 63 "Return a copy of mousemap."
64 (copy-alist mousemap)) 64 (copy-alist mousemap))
65 65
66 (defun define-mouse (mousemap mouse-list def) 66 (defun define-mouse (mousemap mouse-list def)
67 "Args MOUSEMAP, MOUSE-LIST, DEF. Define MOUSE-LIST in MOUSEMAP as DEF. 67 "Args MOUSEMAP, MOUSE-LIST, DEF. Define MOUSE-LIST in MOUSEMAP as DEF.
68 MOUSE-LIST is a list of atoms specifing a mouse hit according to these rules: 68 MOUSE-LIST is a list of atoms specifying a mouse hit according to these rules:
69 * One of these atoms specifies the active region of the definition. 69 * One of these atoms specifies the active region of the definition.
70 text, scrollbar, modeline, minibuffer 70 text, scrollbar, modeline, minibuffer
71 * One or two or these atoms specify the button or button combination. 71 * One or two or these atoms specify the button or button combination.
72 left, middle, right, double 72 left, middle, right, double
73 * Any combination of these atoms specify the active shift keys. 73 * Any combination of these atoms specify the active shift keys.
149 (` (logand sm::UpBits (nth 0 (, hit))))) 149 (` (logand sm::UpBits (nth 0 (, hit)))))
150 ;;; Screen x position. 150 ;;; Screen x position.
151 (defmacro sm::hit-x (hit) (list 'nth 1 hit)) 151 (defmacro sm::hit-x (hit) (list 'nth 1 hit))
152 ;;; Screen y position. 152 ;;; Screen y position.
153 (defmacro sm::hit-y (hit) (list 'nth 2 hit)) 153 (defmacro sm::hit-y (hit) (list 'nth 2 hit))
154 ;;; Millisconds since last hit. 154 ;;; Milliseconds since last hit.
155 (defmacro sm::hit-delta (hit) (list 'nth 3 hit)) 155 (defmacro sm::hit-delta (hit) (list 'nth 3 hit))
156 156
157 (defmacro sm::hit-up-p (hit) ; A predicate. 157 (defmacro sm::hit-up-p (hit) ; A predicate.
158 (` (not (zerop (sm::hit-up (, hit)))))) 158 (` (not (zerop (sm::hit-up (, hit))))))
159 159
372 (let ((right (1- (window-width w))) 372 (let ((right (1- (window-width w)))
373 (bottom (1- (window-height w)))) 373 (bottom (1- (window-height w))))
374 (cond ((minibuffer-window-p w) 'minibuffer) 374 (cond ((minibuffer-window-p w) 'minibuffer)
375 ((>= y bottom) 'modeline) 375 ((>= y bottom) 'modeline)
376 ((>= x right) 'scrollbar) 376 ((>= x right) 'scrollbar)
377 ;; far right column (window seperator) is always a scrollbar 377 ;; far right column (window separator) is always a scrollbar
378 ((and scrollbar-width 378 ((and scrollbar-width
379 ;; mouse within scrollbar-width of edge. 379 ;; mouse within scrollbar-width of edge.
380 (>= x (- right scrollbar-width)) 380 (>= x (- right scrollbar-width))
381 ;; mouse a few chars past the end of line. 381 ;; mouse a few chars past the end of line.
382 (>= x (+ 2 (window-line-end w x y)))) 382 (>= x (+ 2 (window-line-end w x y))))
594 and the resulting value is returned. Generally these FORMs are 594 and the resulting value is returned. Generally these FORMs are
595 evaluated for their side-effects rather than their values. 595 evaluated for their side-effects rather than their values.
596 If the selected form is a menu or a symbol whose value is a menu, 596 If the selected form is a menu or a symbol whose value is a menu,
597 then it is displayed and evaluated as a pullright menu item. 597 then it is displayed and evaluated as a pullright menu item.
598 If the the FORM of the first ITEM is nil, the STRING of the item 598 If the the FORM of the first ITEM is nil, the STRING of the item
599 is used as a label for the menu, i.e. it's inverted and not selectible." 599 is used as a label for the menu, i.e. it's inverted and not selectable."
600 600
601 (if (symbolp menu) (setq menu (symbol-value menu))) 601 (if (symbolp menu) (setq menu (symbol-value menu)))
602 (eval (sun-menu-internal *menu-window* *menu-x* *menu-y* 4 menu))) 602 (eval (sun-menu-internal *menu-window* *menu-x* *menu-y* 4 menu)))
603 603
604 (defun sun-get-frame-data (code) 604 (defun sun-get-frame-data (code)
639 (cons (+ (car wl) sm::menu-kludge-y) 639 (cons (+ (car wl) sm::menu-kludge-y)
640 (+ (cdr wl) sm::menu-kludge-x)))) 640 (+ (cdr wl) sm::menu-kludge-x))))
641 641
642 ;;; 642 ;;;
643 ;;; Function interface to selection/region 643 ;;; Function interface to selection/region
644 ;;; primative functions are defined in sunfns.c 644 ;;; primitive functions are defined in sunfns.c
645 ;;; 645 ;;;
646 (defun sun-yank-selection () 646 (defun sun-yank-selection ()
647 "Set mark and yank the contents of the current sunwindows selection. 647 "Set mark and yank the contents of the current sunwindows selection.
648 Insert contents into the current buffer at point." 648 Insert contents into the current buffer at point."
649 (interactive "*") 649 (interactive "*")