home *** CD-ROM | disk | FTP | other *** search
Wrap
(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.") (defun make-mousemap nil "\ Returns a new mousemap." (byte-code "ˋ¹BÇ" [nil mousemap] 2)) (defun copy-mousemap (mousemap) "\ Return a copy of mousemap." (byte-code "ˋ!Ç" [mousemap copy-alist] 2)) (defun define-mouse (mousemap mouse-list def) "\ Args MOUSEMAP, MOUSE-LIST, DEF. Define MOUSE-LIST in MOUSEMAP as DEF. MOUSE-LIST is a list of atoms specifing 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 eterm-mouse-handler for the treatment of the form DEF." (byte-code "ˆ˜! #Ç" [mouse-list mousemap def mousemap-set mouse-list-to-mouse-code] 5)) (defun global-set-mouse (mouse-list def) "\ 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." (interactive "xMouse event: xDefinition: ") (byte-code "ˆÈ˜ #Ç" [current-global-mousemap mouse-list def nil define-mouse] 4)) (defun local-set-mouse (mouse-list def) "\ 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." (interactive "xMouse event: xDefinition: ") (byte-code "ˆÈ?Ä ˜ Éȯ #Ç" [current-local-mousemap mouse-list def nil make-mousemap define-mouse] 5)) (defun use-global-mousemap (mousemap) "\ Selects MOUSEMAP as the global mousemap." (byte-code " ÉÇ" [current-global-mousemap mousemap] 2)) (defun use-local-mousemap (mousemap) "\ Selects MOUSEMAP as the local mousemap. nil for MOUSEMAP means no local mousemap." (byte-code " ÉÇ" [current-local-mousemap mousemap] 2)) (defun logtest (x y) "\ True if any bits set in X are also set in Y. Just like the Common Lisp function of the same name." (byte-code "´ˆ \"!?Ç" [x y zerop logand] 4)) (defconst em::ButtonBits 7) (defconst em::ShiftmaskBits 56) (defconst em::DoubleBits 64) (defconst em::UpBits 128) (defmacro em::hit-code (hit) (byte-code "ˋ´EÇ" [hit nth 0] 3)) (defmacro em::hit-button (hit) (byte-code "ˋ´ˆ˜EEÇ" [hit logand em::ButtonBits nth 0] 5)) (defmacro em::hit-shiftmask (hit) (byte-code "ˋ´ˆ˜EEÇ" [hit logand em::ShiftmaskBits nth 0] 5)) (defmacro em::hit-double (hit) (byte-code "ˋ´ˆ˜EEÇ" [hit logand em::DoubleBits nth 0] 5)) (defmacro em::hit-up (hit) (byte-code "ˋ´ˆ˜EEÇ" [hit logand em::UpBits nth 0] 5)) (defmacro em::hit-x (hit) (byte-code "ˋ´EÇ" [hit nth 1] 3)) (defmacro em::hit-y (hit) (byte-code "ˋ´EÇ" [hit nth 2] 3)) (defmacro em::hit-delta (hit) (byte-code "ˋ´EÇ" [hit nth 3] 3)) (defmacro em::hit-up-p (hit) (byte-code "ˋ´ˆDDDÇ" [hit not zerop em::hit-up] 4)) (defmacro em::loc-w (loc) (byte-code "ˋ´EÇ" [loc nth 0] 3)) (defmacro em::loc-x (loc) (byte-code "ˋ´EÇ" [loc nth 1] 3)) (defmacro em::loc-y (loc) (byte-code "ˋ´EÇ" [loc nth 2] 3)) (defmacro eval-in-buffer (buffer &rest forms) "Macro to switches to BUFFER, evaluates FORMS, returns to original buffer." (byte-code "´ˆ˜¯˘˙DD \"¨EEÇ" [buffer forms let ((StartBuffer (current-buffer))) unwind-protect append progn set-buffer (set-buffer StartBuffer)] 7)) (put (quote eval-in-buffer) (quote lisp-indent-hook) 1) (defmacro eval-in-window (window &rest forms) "Switch to WINDOW, evaluate FORMS, return to original window." (byte-code "´ˆ˜¯˘˙DD \"¨EEÇ" [window forms let ((OriginallySelectedWindow (selected-window))) unwind-protect append progn select-window (select-window OriginallySelectedWindow)] 7)) (put (quote eval-in-window) (quote lisp-indent-hook) 1) (defmacro eval-in-windows (form &optional yesmini) "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." (byte-code "´ˆ˜¯˘˙¨²˚¸³ EDEDED˝EEÇ" [form yesmini let ((OriginallySelectedWindow (selected-window))) unwind-protect while progn not eq OriginallySelectedWindow select-window next-window nil (select-window OriginallySelectedWindow)] 13)) (put (quote eval-in-window) (quote lisp-indent-hook) 0) (defun move-to-loc (x y) "\ Move cursor to window location X, Y. Handles wrapped and horizontally scrolled lines correctly." (byte-code "˜!Èi¯˘˙ ! i¨ ²Z^\\Á\" ˚˙ ¸¨ S^#! Z*Ç" [y cc nc x move-to-window-line move-to-column zerop window-hscroll window-width 2 + -1] 13)) (defun minibuffer-window-p (window) "\ True iff this WINDOW is minibuffer." (byte-code "ˋ ´ˆ!8UÇ" [window screen-height 3 window-edges] 5)) (defun eterm-mouse-handler (&optional hit) "\ Evaluates the function or list associated with a mouse hit. Expecting to read a hit, which is a list: (button x y unused). 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." (interactive) (byte-code "³È?Ä ˝ ÉÈ˛ˇ8—8\"± 8ˇ 8— 8¼ \"p½Î¾ !qÈà !))?ÂV áâ±8\"!??ÄS ãäåç !!\"ÁÄ 9Âl É Èè $ÁÄ < @É Èé!ÁÄ ãê\"),)È ë=ÄÕ É È³Ç" [hit loc *mouse-window* *mouse-x* *mouse-y* mouse-code form StartBuffer em::UpBits this-command t last-command nil mouse-hit-read em::window-xy 1 2 0 mouse-event-code ((byte-code "qÇ" [StartBuffer] 1)) window-buffer mouse-lookup zerop logand error "Undefined mouse event: %s" prin1-to-string mouse-code-to-mouse-list funcall eval "Mouse action must be symbol or list, but was: %s" eterm-mouse-handler] 15)) (defun mouse-hit-read nil "\ Read mouse-hit list from keyboard. Like (read 'read-char), but that uses minibuffer, and mucks up last-command." (byte-code "ˋˋˆ˜rÉ BÉÈ\"?Ä ˋÈÁ ȯ˘˙¨!²#!*Ç" [char-list nil char equal 13 read mapconcat char-to-string nreverse ""] 7)) (defun em::window-xy (x y) "\ Find window containing screen coordinates X and Y. Returns list (window x y) where x and y are relative to window." (byte-code "ˆ˜ÍÅ