X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/0d20f9a04efa7cfbe205e4967b6797b89fc64fe7..85b5a0254674475e1fbd5b51c8ed8b5fa67f3c8e:/lisp/sun-fns.el diff --git a/lisp/sun-fns.el b/lisp/sun-fns.el index b2ca59203f..21b5146da5 100644 --- a/lisp/sun-fns.el +++ b/lisp/sun-fns.el @@ -1,11 +1,16 @@ -;; Subroutines of Mouse handling for Sun windows +;;; sun-fns.el --- subroutines of Mouse handling for Sun windows + ;; Copyright (C) 1987 Free Software Foundation, Inc. +;; Author: Jeff Peck +;; Maintainer: none +;; Keywords: hardware + ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 1, or (at your option) +;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -14,40 +19,46 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -;;; Submitted Mar. 1987, Jeff Peck -;;; Sun Microsystems Inc. -;;; Conceived Nov. 1986, Stan Jefferson, -;;; Computer Science Lab, SRI International. -;;; GoodIdeas Feb. 1987, Steve Greenbaum -;;; & UpClicks Reasoning Systems, Inc. -;;; -(provide 'sun-fns) -(require 'sun-mouse) -;;; -;;; Functions for manipulating via the mouse and mouse-map definitions -;;; for accessing them. Also definitons of mouse menus. -;;; This file you should freely modify to reflect you personal tastes. -;;; -;;; First half of file defines functions to implement mouse commands, -;;; Don't delete any of those, just add what ever else you need. -;;; Second half of file defines mouse bindings, do whatever you want there. +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; Submitted Mar. 1987, Jeff Peck +;; Sun Microsystems Inc. +;; Conceived Nov. 1986, Stan Jefferson, +;; Computer Science Lab, SRI International. +;; GoodIdeas Feb. 1987, Steve Greenbaum +;; & UpClicks Reasoning Systems, Inc. +;; +;; +;; Functions for manipulating via the mouse and mouse-map definitions +;; for accessing them. Also definitions of mouse menus. +;; This file you should freely modify to reflect you personal tastes. +;; +;; First half of file defines functions to implement mouse commands, +;; Don't delete any of those, just add what ever else you need. +;; Second half of file defines mouse bindings, do whatever you want there. + +;; +;; Mouse Functions. +;; +;; These functions follow the sun-mouse-handler convention of being called +;; with three arguments: (window x-pos y-pos) +;; This makes it easy for a mouse executed command to know where the mouse is. +;; Use the macro "eval-in-window" to execute a function +;; in a temporarily selected window. +;; +;; If you have a function that must be called with other arguments +;; bind the mouse button to an s-exp that contains the necessary parameters. +;; See "minibuffer" bindings for examples. +;; + +;;; Code: + +(require 'term/sun-mouse) -;;; -;;; Mouse Functions. -;;; -;;; These functions follow the sun-mouse-handler convention of being called -;;; with three arguements: (window x-pos y-pos) -;;; This makes it easy for a mouse executed command to know where the mouse is. -;;; Use the macro "eval-in-window" to execute a function -;;; in a temporarily selected window. -;;; -;;; If you have a function that must be called with other arguments -;;; bind the mouse button to an s-exp that contains the necessary parameters. -;;; See "minibuffer" bindings for examples. -;;; (defconst cursor-pause-milliseconds 300 "*Number of milliseconds to display alternate cursor (usually the mark)") @@ -129,7 +140,7 @@ and put the region in the stuff buffer." (mouse-select-window window x y))) ;;; -;;; esoteria: +;;; esoterica: ;;; (defun mouse-exch-pt-and-mark (window x y) "Exchange point and mark." @@ -231,8 +242,7 @@ See mouse-mark-thing for a description of the objects recognized." (if (eq last-command 'yank) (let ((before (< (point) (mark)))) (delete-region (point) (mark)) - (rotate-yank-pointer 1) - (insert (car kill-ring-yank-pointer)) + (insert (current-kill 1)) (if before (exchange-point-and-mark))) (yank)) (setq this-command 'yank)) @@ -311,9 +321,9 @@ this command is insensitive to mouse location." relative X divided by window width." (eval-in-window window (if (>= x (1- (window-width))) - ;; When x is maximun (equal to or 1 less than window width), + ;; When x is maximum (equal to or 1 less than window width), ;; goto end of buffer. We check for this special case - ;; becuase the calculated goto-char often goes short of the + ;; because the calculated goto-char often goes short of the ;; end due to roundoff error, and we often really want to go ;; to the end. (goto-char (point-max)) @@ -410,7 +420,7 @@ relative X divided by window width." ;;; minibuffer menu ;;; (defmenu minibuffer-menu - ("Minibuffer" message "Just some miscellanous minibuffer commands") + ("Minibuffer" message "Just some miscellaneous minibuffer commands") ("Stuff" sun-yank-selection) ("Do-It" exit-minibuffer) ("Abort" abort-recursive-edit) @@ -628,3 +638,6 @@ To unmark a buffer marked for deletion, select it with LEFT." (global-set-mouse '(minibuffer shift control meta right) 'mouse-help-region) (global-set-mouse '(minibuffer double control meta right) 'mouse-help-region) +(provide 'sun-fns) + +;;; sun-fns.el ends here