• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/term/

Lines Matching +defs:set +defs:window +defs:buffer

36 ;;   define-mouse, global-set-mouse, local-set-mouse,
66 (make-variable-buffer-local 'current-local-mousemap)
87 (mousemap-set (mouse-list-to-mouse-code mouse-list) mousemap def))
89 (defun global-set-mouse (mouse-list def)
92 Note that if MOUSE-EVENT-LIST has a local definition in the current buffer,
97 (defun local-set-mouse (mouse-list def)
100 The definition goes in the current buffer's local mousemap.
128 "True if any bits set in X are also set in Y.
168 ;;; Loc accessors. for sm::window-xy
174 (defmacro eval-in-buffer (buffer &rest forms)
175 "Macro to switches to BUFFER, evaluates FORMS, returns to original buffer."
176 ;; When you don't need the complete window context of eval-in-window
177 `(let ((StartBuffer (current-buffer)))
180 (set-buffer ,buffer)
182 (set-buffer StartBuffer))))
184 (put 'eval-in-buffer 'lisp-indent-function 1)
188 (defmacro eval-in-window (window &rest forms)
189 "Switch to WINDOW, evaluate FORMS, return to original window."
190 `(let ((OriginallySelectedWindow (selected-window)))
193 (select-window ,window)
195 (select-window OriginallySelectedWindow))))
196 (put 'eval-in-window 'lisp-indent-function 1)
204 "Switches to each window and evaluates FORM. Optional argument
205 YESMINI says to include the minibuffer as a window.
207 `(let ((OriginallySelectedWindow (selected-window)))
212 (select-window
213 (next-window nil ,yesmini))))))
214 (select-window OriginallySelectedWindow))))
215 (put 'eval-in-window 'lisp-indent-function 0)
218 "Move cursor to window location X, Y.
220 (move-to-window-line y)
221 ;; window-line-end expects this to return the window column it moved to.
224 (if (zerop (window-hscroll))
226 (min (- (window-width) 2) ; To stay on the line.
228 (+ (window-hscroll) -1
229 (min (1- (window-width)) ; To stay on the line.
234 (defun minibuffer-window-p (window)
237 (nth 3 (window-edges window)) ; The bottom edge.
246 The variables: *mouse-window*, *mouse-x*, *mouse-y* are bound.
247 If the form is a symbol (symbolp), it is funcall'ed with *mouse-window*,
253 (let ((loc (sm::window-xy (sm::hit-x hit) (sm::hit-y hit))))
254 (let ((*mouse-window* (sm::loc-w loc))
258 (let ((form (eval-in-buffer (window-buffer *mouse-window*)
267 (funcall form *mouse-window* *mouse-x* *mouse-y*))
312 ;;; Something to do later: We could buffer the read commands and
347 (defun sm::window-xy (x y)
348 "Find window containing screen coordinates X and Y.
349 Returns list (window x y) where x and y are relative to window."
353 (let ((we (window-edges (selected-window))))
359 ;; include the continuation column with this window
362 ;; include partial line at bottom of frame with this window
363 ;; id est, if window is not multiple of char size.
369 (list (selected-window) (- x le) (- y te))))))
375 (defun sm::window-region (loc)
381 (let ((right (1- (window-width w)))
382 (bottom (1- (window-height w))))
383 (cond ((minibuffer-window-p w) 'minibuffer)
386 ;; far right column (window separator) is always a scrollbar
391 (>= x (+ 2 (window-line-end w x y))))
395 (defun window-line-end (w x y)
397 (eval-in-window w (save-excursion (move-to-loc (frame-width) y))))
414 (mouse-region-to-code (sm::window-region loc))))
435 (defun mousemap-set (code mousemap value)
482 currently set in the REGION."
548 (with-output-to-temp-buffer "*Help*"
575 (let* ((region (or region (sm::window-region (list w x y))))
601 (defun sun-menu-evaluate (*menu-window* *menu-x* *menu-y* menu)
614 (eval (sun-menu-internal *menu-window* *menu-x* *menu-y* 4 menu)))
617 "Sends the tty-sub-window escape sequence CODE to terminal,
640 "Cached frame-to-window X-Offset for sm::menu-kludge")
642 "Cached frame-to-window Y-Offset for sm::menu-kludge")
661 Insert contents into the current buffer at point."
663 (set-mark-command nil)
667 "Set the sunwindows selection to the region in the current buffer."
669 (sun-set-selection (buffer-substring beg end)))
673 ;;; This closes the window instead of stopping emacs.
679 just close the window, and wait for reopening."
683 (send-string-to-terminal "\033[2t") ; To close EmacsTool window.