;ELC ;;; compiled by jimb@geech.gnu.ai.mit.edu on Tue Jul 6 00:25:35 1993 ;;; from file /gd/gnu/emacs/19.0/lisp/term/sun-mouse.el ;;; emacs version 19.15.16. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19")) (defvar extra-click-wait 150 "\ *Number of milliseconds to wait for an extra click. Set this to zero if you don't want chords or double clicks.") (defvar scrollbar-width 5 "\ *The character width of the scrollbar. The cursor is deemed to be in the right edge scrollbar if it is this near the right edge, and more than two chars past the end of the indicated line. Setting to nil limits the scrollbar to the edge or vertical dividing bar.") (defalias 'make-mousemap #[nil "ÀÁB‡" [mousemap nil] 2 "\ Returns a new mousemap."]) (defalias 'copy-mousemap #[(mousemap) "À !‡" [copy-alist mousemap] 2 "\ Return a copy of mousemap."]) (defalias 'define-mouse #[(mousemap mouse-list def) "ÀÁ\n! #‡" [mousemap-set mouse-list-to-mouse-code mouse-list mousemap def] 4 "\ Args MOUSEMAP, MOUSE-LIST, DEF. Define MOUSE-LIST in MOUSEMAP as DEF. MOUSE-LIST is a list of atoms specifying a mouse hit according to these rules: * One of these atoms specifies the active region of the definition. text, scrollbar, modeline, minibuffer * One or two or these atoms specify the button or button combination. left, middle, right, double * Any combination of these atoms specify the active shift keys. control, shift, meta * With a single unshifted button, you can add up to indicate an up-click. The atom `double' is used with a button designator to denote a double click. Two button chords are denoted by listing the two buttons. See sun-mouse-handler for the treatment of the form DEF."]) (defalias 'global-set-mouse #[(mouse-list def) "À \n #‡" [define-mouse current-global-mousemap mouse-list def] 4 "\ Give MOUSE-EVENT-LIST a local definition of DEF. See define-mouse for a description of MOUSE-EVENT-LIST and DEF. Note that if MOUSE-EVENT-LIST has a local definition in the current buffer, that local definition will continue to shadow any global definition." "xMouse event: \nxDefinition: "]) (defalias 'local-set-mouse #[(mouse-list def) "„Á  #‡" [current-local-mousemap make-mousemap define-mouse mouse-list def] 4 "\ Give MOUSE-EVENT-LIST a local definition of DEF. See define-mouse for a description of the arguments. The definition goes in the current buffer's local mousemap. Normally buffers in the same major mode share a local mousemap." "xMouse event: \nxDefinition: "]) (defalias 'use-global-mousemap #[(mousemap) "‰‡" [mousemap current-global-mousemap] 2 "\ Selects MOUSEMAP as the global mousemap."]) (defalias 'use-local-mousemap #[(mousemap) "‰‡" [mousemap current-local-mousemap] 2 "\ Selects MOUSEMAP as the local mousemap. nil for MOUSEMAP means no local mousemap."]) (defalias 'logtest #[(x y) "À \n\"ÃU?‡" [logand x y 0] 3 "\ True if any bits set in X are also set in Y. Just like the Common Lisp function of the same name."]) (byte-code "ÀÂÄÆÈÉÊ\"ˆÈËÌ\"ˆÈÍÎ\"ˆÈÏÐ\"ˆÈÑÒ\"ˆÈÓÔ\"ˆÈÕÖ\"ˆÈ×Ø\"ˆÈÙÚ\"ˆÈÛÜ\"ˆÈÝÞ\"ˆÈßà\"‡" [7 sm::ButtonBits 56 sm::ShiftmaskBits 64 sm::DoubleBits 128 sm::UpBits defalias sm::hit-code (macro . #[(hit) "ÀÁ\nE‡" [nth 0 hit] 3]) sm::hit-button (macro . #[(hit) "ÀÁÂà EE‡" [logand sm::ButtonBits nth 0 hit] 5]) sm::hit-shiftmask (macro . #[(hit) "ÀÁÂà EE‡" [logand sm::ShiftmaskBits nth 0 hit] 5]) sm::hit-double (macro . #[(hit) "ÀÁÂà EE‡" [logand sm::DoubleBits nth 0 hit] 5]) sm::hit-up (macro . #[(hit) "ÀÁÂà EE‡" [logand sm::UpBits nth 0 hit] 5]) sm::hit-x (macro . #[(hit) "ÀÁ\nE‡" [nth 1 hit] 3]) sm::hit-y (macro . #[(hit) "ÀÁ\nE‡" [nth 2 hit] 3]) sm::hit-delta (macro . #[(hit) "ÀÁ\nE‡" [nth 3 hit] 3]) sm::hit-up-p (macro . #[(hit) "ÀÁ DDD‡" [not zerop sm::hit-up hit] 4]) sm::loc-w (macro . #[(loc) "ÀÁ\nE‡" [nth 0 loc] 3]) sm::loc-x (macro . #[(loc) "ÀÁ\nE‡" [nth 1 loc] 3]) sm::loc-y (macro . #[(loc) "ÀÁ\nE‡" [nth 2 loc] 3])] 3) (defalias 'eval-in-buffer '(macro . #[(buffer &rest forms) "ÀÁÂÃÄÅDD\"ÈEE‡" [let ((StartBuffer (current-buffer))) unwind-protect append progn set-buffer buffer forms (set-buffer StartBuffer)] 7 "\ Macro to switches to BUFFER, evaluates FORMS, returns to original buffer."])) (put (quote eval-in-buffer) (quote lisp-indent-function) 1) (defalias 'eval-in-window '(macro . #[(window &rest forms) "ÀÁÂÃÄÅDD\"ÈEE‡" [let ((OriginallySelectedWindow (selected-window))) unwind-protect append progn select-window window forms (select-window OriginallySelectedWindow)] 7 "\ Switch to WINDOW, evaluate FORMS, return to original window."])) (put (quote eval-in-window) (quote lisp-indent-function) 1) (defalias 'eval-in-windows '(macro . #[(form &optional yesmini) "ÀÁÂÃÄ ÆÇÈÉÊË EDEDEDÍEE‡" [let ((OriginallySelectedWindow (selected-window))) unwind-protect while progn form not eq OriginallySelectedWindow select-window next-window nil yesmini (select-window OriginallySelectedWindow)] 13 "\ Switches to each window and evaluates FORM. Optional argument YESMINI says to include the minibuffer as a window. This is a macro, and does not evaluate its arguments."])) (put (quote eval-in-window) (quote lisp-indent-function) 0) (defalias 'move-to-loc #[(x y) "À !ˆiÂà ÄUƒiÅ ÆZ^\\‚$à ŠS^È\\\\! \n \nZ*‡" [move-to-window-line y move-to-column window-hscroll 0 window-width 2 x -1 nc cc] 5 "\ Move cursor to window location X, Y. Handles wrapped and horizontally scrolled lines correctly."]) (defalias 'minibuffer-window-p #[(window) "À Á !8U‡" [frame-height 3 window-edges window] 4 "\ True iff this WINDOW is minibuffer."]) (defalias 'sun-mouse-handler #[(&optional hit) "„Á ÂA@Ã8\"‰@ A@à 8Å \" p\nËŽÌ !qˆÍ!*‰„RÏ@\"ÑUƒ‚ÒÓÔÕ!!\"ˆ‚‚9ƒi #ˆ‚‚<ƒ|@×!ˆ‚‚ÒØ\"ˆ.Ù=ƒÛ‡" [hit sm::combined-hits sm::window-xy 2 loc mouse-event-code mouse-code *mouse-y* *mouse-x* *mouse-window* StartBuffer ((set-buffer StartBuffer)) window-buffer mouse-lookup form logand sm::UpBits 0 error "Undefined mouse event: %s" prin1-to-string mouse-code-to-mouse-list this-command eval "Mouse action must be symbol or list, but was: %s" sun-mouse-handler last-command nil] 7 "\ Evaluates the function or list associated with a mouse hit. Expecting to read a hit, which is a list: (button x y delta). A form bound to button by define-mouse is found by mouse-lookup. The variables: *mouse-window*, *mouse-x*, *mouse-y* are bound. If the form is a symbol (symbolp), it is funcall'ed with *mouse-window*, *mouse-x*, and *mouse-y* as arguments; if the form is a list (listp), the form is eval'ed; if the form is neither of these, it is an error. Returns nil." nil]) (defalias 'sm::combined-hits #[nil "À  @\"ÄUƒ9Å!‰ƒ8 È @@ @\" @\"Uƒ4\n‚5Ä# ˆ) )‡" [mouse-hit-read hit1 logand sm::UpBits 0 mouse-second-hit extra-click-wait hit2 logior sm::ButtonBits sm::DoubleBits] 9 "\ Read and return next mouse-hit, include possible double click"]) (defalias 'mouse-hit-read #[nil "À‰à ‰‰\nBÄšƒÅÆÇ\nŸÈ#!*‡" [nil char char-list read-char 13 read mapconcat char-to-string ""] 5 "\ Read mouse-hit list from keyboard. Like (read 'read-char), but that uses minibuffer, and mucks up last-command."]) (defvar mouse-prefix1 24 "\ First char of mouse-prefix. Used to detect double clicks and chords.") (defvar mouse-prefix2 0 "\ Second char of mouse-prefix. Used to detect double clicks and chords.") (defalias 'mouse-second-hit #[(hit-wait) "À !?…T ‰ šƒÀÅ!ƒ CÇ‚S ‰ š„4 CÊ ˆÇ‚RË  Í @\"ÏU„OÐ Å 8Z!‚Q )))‡" [sit-for-millisecs hit-wait read-char pc1 mouse-prefix1 3 unread-command-events nil pc2 mouse-prefix2 ding mouse-hit-read new-hit logand sm::UpBits 0 mouse-second-hit] 5 "\ Returns the next mouse hit occurring within HIT-WAIT milliseconds."]) (defalias 'sm::window-xy #[(x y) "ÀÁ†\n E‡" [found (byte-code "À ÂŽÃÀ !‰@ A@Å 8Æ 8 \nË Uƒ*TÌ Uƒ7T \nYƒh Wƒh YƒhWƒhÏÐÀ  \nZ ZE\"ˆ- ÑÒÓÔ\"!=?…x‚*‡" [selected-window OriginallySelectedWindow ((select-window OriginallySelectedWindow)) window-edges we 2 3 be re te le frame-width frame-height x y throw found select-window next-window nil t] 7) nil x y] 3 "\ Find window containing screen coordinates X and Y. Returns list (window x y) where x and y are relative to window."]) (defalias 'sm::window-region #[(loc) "@A@Á8Å !SÆ !SÉ !ƒ!Ê‚W\nYƒ,Ë‚W Yƒ7Ì‚W ƒV  ZYƒV Î \n#Á\\YƒVÌ‚WÏ-‡" [loc 2 y x w window-width window-height bottom right minibuffer-window-p minibuffer modeline scrollbar scrollbar-width window-line-end text] 5 "\ Parse LOC into a region symbol. Returns one of (text scrollbar modeline minibuffer)"]) (defalias 'window-line-end #[(w x y) "À ÂŽÃ !ˆŠÅÆ \"+‡" [selected-window OriginallySelectedWindow ((select-window OriginallySelectedWindow)) select-window w move-to-loc frame-width y] 3 "\ Return WINDOW column (ignore X) containing end of line Y"]) (byte-code "À‡" [((left . 1) (middle . 2) (right . 4) (shift . 8) (control . 16) (meta . 32) (double . 64) (up . 128) (text . 256) (scrollbar . 512) (modeline . 1024) (minibuffer . 2048)) sm::keyword-alist nil] 1) (defalias 'mouse-event-code #[(hit loc) "À @Âà !!\"‡" [logior hit mouse-region-to-code sm::window-region loc] 5 "\ Maps MOUSE-HIT and LOC into a mouse-code."]) (defalias 'mouse-region-to-code #[(region) " žA‡" [region sm::keyword-alist] 2 "\ Returns partial mouse-code for specified REGION."]) (defalias 'mouse-list-to-mouse-code #[(mouse-list) "ÀÁÂà \"\"‡" [apply logior mapcar #[(x) " žA‡" [x sm::keyword-alist] 2] mouse-list] 5 "\ Map a MOUSE-LIST to a mouse-code."]) (defalias 'mouse-code-to-mouse-list #[(mouse-code) "ÀÁÂà \"\"‡" [apply nconc mapcar #[(x) "À \nA\"… \n@C‡" [logtest mouse-code x] 3] sm::keyword-alist] 5 "\ Map a MOUSE-CODE to a mouse-list."]) (byte-code "ÀÁÂ\"ˆÀÃÄ\"‡" [defalias mousemap-set #[(code mousemap value) "A\n ž‰ƒ ¡‚\n B B¡*‡" [mousemap alist code assq-result value] 4] mousemap-get #[(code mousemap) " AžA‡" [code mousemap] 2]] 3) (defalias 'mouse-lookup #[(mouse-code) "À \n\"† À \"‡" [mousemap-get mouse-code current-local-mousemap current-global-mousemap] 3 "\ Look up MOUSE-EVENT and return the definition. nil means undefined."]) (defalias 'mouse-mask-lookup #[(mask list) "À\nƒà \n@@\"ƒ\n@ B\nA‰„ )‡" [nil result list logtest mask] 4 "\ Args MASK (a bit mask) and LIST (a list of (code . form) pairs). Returns a list of elements of LIST whose code or'ed with MASK is non-zero."]) (defalias 'mouse-union #[(l l-unique) "\nƒ\n@‰@ ž„ B)\nA‰„ )‡" [l-unique result l code-form-pair] 3 "\ Return the union of list of mouse (code . form) pairs L and L-UNIQUE, where L-UNIQUE is considered to be union'ized already."]) (defalias 'mouse-union-first-preferred #[(l1 l2) "À À\nÃ\"\"‡" [mouse-union l2 l1 nil] 5 "\ Return the union of lists of mouse (code . form) pairs L1 and L2, based on the code's, with preference going to elements in L1."]) (defalias 'mouse-code-function-pairs-of-region #[(region) "À !ÃÄ\n A\"Ä\nA\"\")‡" [mouse-region-to-code region mask mouse-union-first-preferred mouse-mask-lookup current-local-mousemap current-global-mousemap] 5 "\ Return a list of (code . function) pairs, where each code is currently set in the REGION."]) (defalias 'one-line-doc-string #[(function) ":ƒ @‰‚Á!‰„Â\"ÄÅ\n\"ˆ\nƉ•O)‡" [function documentation doc "No documentation." string-match "^.*$" 0] 4 "\ Returns first line of documentation string for FUNCTION. If there is no documentation string, then the string \"No documentation\" is returned."]) (defalias (quote print-mouse-format) #[(binding) "À @!ˆÀÂ!ˆÃÄ A\"ˆÅ ˆÀÆ!ˆÀÇ @!!ˆÅ ‡" [princ binding ": " mapcar #[(mouse-list) "À !ˆÀÂ!‡" [princ mouse-list " "] 2] terpri " " one-line-doc-string] 3]) (defalias 'print-mouse-bindings #[(region) "ÀÁ !\"‡" [mapcar print-mouse-format sm::event-bindings region] 4 "\ Prints mouse-event bindings for REGION."]) (defalias 'sm::event-bindings #[(region) "À !‰ƒ: @Æ A \"‰ƒ'È @!AB¡ˆ‚2 AÈ @!CB B* A‰„\n *‡" [mouse-code-function-pairs-of-region region nil result mouse-bindings code-function-pair assoc current-entry mouse-code-to-mouse-list] 4 "\ Returns an alist of (function . (mouse-list1 ... mouse-listN)) for REGION, where each mouse-list is bound to the function in REGION."]) (defalias 'describe-mouse-bindings #[nil "ÀÁÂ!ˆÃ ˆÁÄ!ˆÃ ˆÅÆ!ˆÃ ˆÁÇ!ˆÃ ˆÁÈ!ˆÃ ˆÅÉ!ˆÃ ˆÁÊ!ˆÃ ˆÁË!ˆÃ ˆÅÌ!‘‡" ["*Help*" princ "Text Region" terpri "---- ------" print-mouse-bindings text "Modeline Region" "-------- ------" modeline "Scrollbar Region" "--------- ------" scrollbar] 3 "\ Lists all current mouse-event bindings." nil]) (defalias 'describe-mouse-briefly #[(mouse-list) "ÀÁ\n!!‰ƒÄÅ\n #‚ÄÆ\n\")‡" [mouse-lookup mouse-list-to-mouse-code mouse-list function message "%s runs the command %s" "%s is undefined"] 5 "\ Print a short description of the function bound to MOUSE-LIST." "xDescibe mouse list briefly: "]) (defalias (quote mouse-help-menu) #[(function-and-binding) "À @!Âà @!CÀ A!CD!B‡" [prin1-to-string function-and-binding menu-create one-line-doc-string] 5]) (defalias 'mouse-help-region #[(w x y &optional region) "†\nÁ\n E!ÅÆÇ!\"ÉÊ!CB! Ì\nÍ  $ˆ+·" [region sm::window-region w x y mapcar mouse-help-menu sm::event-bindings mlist menu-create symbol-name menu sun-menu-evaluate 0 nil] 5 "\ Displays a menu of mouse functions callable in this region."]) (defalias 'menu-create #[(items) "ÀÁ\n\"‡" [apply vector items] 3 "\ Functional form for defmenu, given a list of ITEMS returns a menu. Each ITEM is a (STRING . VALUE) pair."]) (defalias 'defmenu '(macro . #[(menu &rest itemlist) "À  !E‡" [defconst menu menu-create itemlist] 4 "\ Defines MENU to be a menu, the ITEMS are (STRING . VALUE) pairs. See sun-menu-evaluate for interpretation of ITEMS."])) (defalias 'sun-menu-evaluate #[(*menu-window* *menu-x* *menu-y* menu) "9ƒJÁ Æ%!‡" [menu eval sun-menu-internal *menu-window* *menu-x* *menu-y* 4] 7 "\ Display a pop-up menu in WINDOW at X Y and evaluate selected item of MENU. MENU (or its symbol-value) should be a menu defined by defmenu. A menu ITEM is a (STRING . FORM) pair; the FORM associated with the selected STRING is evaluated, and the resulting value is returned. Generally these FORMs are evaluated for their side-effects rather than their values. If the selected form is a menu or a symbol whose value is a menu, then it is displayed and evaluated as a pullright menu item. If the the FORM of the first ITEM is nil, the STRING of the item is used as a label for the menu, i.e. it's inverted and not selectable."]) (defalias 'sun-get-frame-data #[(code) "ÀÁ !ÄQ!ˆÅ‰‰‰ Ê ‰ Ëš„) B‚ÌÍŸÎ#ÏÐ\"ˆÑ”TÑ•OÑ•ÅOÏÐ\"ˆÑ”TÑ•OÒ!Ò!,B‡" [send-string-to-terminal "[" int-to-string code "t" nil y x str char read-char 116 mapconcat char-to-string "" string-match ";[0-9]*" 0 string-to-int] 4 "\ Sends the tty-sub-window escape sequence CODE to terminal, and returns a cons of the two numbers in returned escape sequence. That is it returns (cons ) from \"\\E[n;;t\". CODE values: 13 = Tool-Position, 14 = Size-in-Pixels, 18 = Size-in-Chars."]) (defalias 'sm::font-size #[nil "ÀÁ!ÀÂ!‰@ @¥ A A¥*B‡" [sun-get-frame-data 14 18 chr pix] 4 "\ Returns font size in pixels: (cons Ysize Xsize)"]) (defvar sm::menu-kludge-x nil "\ Cached frame-to-window X-Offset for sm::menu-kludge") (defvar sm::menu-kludge-y nil "\ Cached frame-to-window Y-Offset for sm::menu-kludge") (defalias 'sm::menu-kludge #[nil "„Á ‰@Ã\\Ä)ÆÇ!‰@\\A \\)B‡" [sm::menu-kludge-y sm::font-size fs 8 4 sm::menu-kludge-x sun-get-frame-data 13 wl] 4 "\ If sunfns.c uses this function must be here!"]) (defalias 'sun-yank-selection #[nil "ÀÁ!ˆÂà !‡" [set-mark-command nil insert-string sun-get-selection] 2 "\ Set mark and yank the contents of the current sunwindows selection. Insert contents into the current buffer at point." "*"]) (defalias 'sun-select-region #[(beg end) "À \n{!‡" [sun-set-selection beg end] 3 "\ Set the sunwindows selection to the region in the current buffer." "r"]) (defalias 'suspend-emacstool #[(&optional stuffstring) "ÀÁ!ˆ\nƒ Ã\n!ˆÃÄ!ˆÀÅ!‡" [run-hooks suspend-hook stuffstring send-string-to-terminal "" suspend-resume-hook] 2 "\ Suspend emacstool. If running under as a detached process emacstool, you don't want to suspend (there is no way to resume), just close the window, and wait for reopening." nil]) (byte-code "ÀÁ!ˆÂÁÃ\"ˆÄÅ!„Æ ÇÈ!‡" [make-variable-buffer-local current-local-mousemap set-default nil boundp current-global-mousemap make-mousemap provide sun-mouse] 3)