[comp.emacs] mighty-mouse support files

tom@hcx2.csd.harris.com (Tom Horsley) (08/01/90)

Quite a while ago I posted my mighty-mouse.el file with various mouse
support routines. Several people have asked me for the other files that I
mentioned in the comments, so I figured I might as well go ahead and post
them as well. The info-mouse stuff is the most useful, but I did not write
it, I simply adapted it to use the separate mouse maps that mighty-mouse.el
provides (Bob Weiner is the original author). Bob has since posted newer
versions of his info support, but this is based on an older version. (This
unfortunate divergence is one reason I did not want to post this stuff
originally, but I have gotten a lot of requests, so you will just have to
take this as-is).

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 1)."
# Contents:  MANIFEST buff-mouse.el buff-setup.el info-mouse.el
#   info-setup.el mouse-help.el
# Wrapped by tom@hcx2 on Wed Aug  1 07:17:35 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MANIFEST'\"
else
echo shar: Extracting \"'MANIFEST'\" \(300 characters\)
sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
X   File Name		Archive #	Description
X-----------------------------------------------------------
X MANIFEST                   1	This shipping list
X buff-mouse.el              1	
X buff-setup.el              1	
X info-mouse.el              1	
X info-setup.el              1	
X mouse-help.el              1	
END_OF_FILE
if test 300 -ne `wc -c <'MANIFEST'`; then
    echo shar: \"'MANIFEST'\" unpacked with wrong size!
fi
# end of 'MANIFEST'
fi
if test -f 'buff-mouse.el' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'buff-mouse.el'\"
else
echo shar: Extracting \"'buff-mouse.el'\" \(888 characters\)
sed "s/^X//" >'buff-mouse.el' <<'END_OF_FILE'
X; My bindings for buffer menu mode mouse map
X
X(require 'buff-setup)
X
X(defvar buffer-menu-mode-mouse-map (make-keymap)
X"Local mouse map for use in buffer menu mode."
X)
X
X(define-key buffer-menu-mode-mouse-map x-button-left 'x-Buffer-menu-1-window)
X(define-key buffer-menu-mode-mouse-map x-button-right 'x-Buffer-menu-this-window)
X(define-key buffer-menu-mode-mouse-map x-button-middle 'x-Buffer-menu-other-window)
X(define-key buffer-menu-mode-mouse-map x-button-c-left 'x-Buffer-menu-delete)
X(define-key buffer-menu-mode-mouse-map x-button-c-right 'x-Buffer-menu-unmark)
X(define-key buffer-menu-mode-mouse-map x-button-c-middle 'x-Buffer-menu-execute)
X
X(defun x-add-buffer-menu-mouse ()
X"Add mouse bindings for buffer menu mode to local-mouse-map"
X   (x-split-mouse-maps)
X   (x-use-local-mouse-map buffer-menu-mode-mouse-map)
X)
X
X(setq buffer-menu-mode-hook (list 'x-add-buffer-menu-mouse))
END_OF_FILE
if test 888 -ne `wc -c <'buff-mouse.el'`; then
    echo shar: \"'buff-mouse.el'\" unpacked with wrong size!
fi
# end of 'buff-mouse.el'
fi
if test -f 'buff-setup.el' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'buff-setup.el'\"
else
echo shar: Extracting \"'buff-setup.el'\" \(2663 characters\)
sed "s/^X//" >'buff-setup.el' <<'END_OF_FILE'
X; Setup code to allow special mouse bindings in Buffer-menu mode.  Mostly
X; just provides a batch of functions to bind to mouse keys which first move
X; point to beginning of mouse line, then invoke the normal buffer menu
X; function.
X;
X; No default bindings are given, you will have to invent those yourself,
X; then hang a function off buffer-menu-mode-hook to setup the binding.
X;
X; tahorsley@ssd.csd.harris.com (Tom Horsley)
X; Dec 26, 1989
X;
X
X(provide 'buff-setup)
X
X(defun x-buffer-menu (arg)
X"Enter buffer menu mode from a mouse function key."
X   (buffer-menu)
X)
X
X(defun x-Buffer-menu-select (arg)
X  "Select mouse line's buffer; also display buffers marked with \">\".
XYou can mark buffers with the \\[Buffer-menu-mark] command."
X   (x-mouse-set-point arg)
X   (beginning-of-line 1)
X   (Buffer-menu-select)
X)
X
X(defun x-Buffer-menu-2-window (arg)
X  "Select mouse line's buffer, with previous buffer in second window."
X   (x-mouse-set-point arg)
X   (beginning-of-line 1)
X   (Buffer-menu-2-window)
X)
X
X(defun x-Buffer-menu-1-window (arg)
X  "Select mouse line's buffer, alone, in full screen."
X   (x-mouse-set-point arg)
X   (beginning-of-line 1)
X   (Buffer-menu-1-window)
X)
X
X(defun x-Buffer-menu-this-window (arg)
X  "Select mouse line's buffer in this window."
X   (x-mouse-set-point arg)
X   (beginning-of-line 1)
X   (Buffer-menu-this-window)
X)
X
X(defun x-Buffer-menu-other-window (arg)
X  "Select mouse line's buffer in other window, leaving buffer menu visible."
X   (x-mouse-set-point arg)
X   (beginning-of-line 1)
X   (Buffer-menu-other-window)
X)
X
X(defun x-Buffer-menu-save (arg)
X  "Mark buffer on mouse line to be saved by \\[Buffer-menu-execute] command."
X   (x-mouse-set-point arg)
X   (beginning-of-line 1)
X   (Buffer-menu-save)
X)
X
X(defun x-Buffer-menu-delete (arg)
X  "Mark buffer on mouse line to be deleted by \\[Buffer-menu-execute] command."
X   (x-mouse-set-point arg)
X   (beginning-of-line 1)
X   (Buffer-menu-delete)
X)
X
X(defun x-Buffer-menu-not-modified (arg)
X  "Mark buffer on mouse line as unmodified (no changes to save)."
X   (x-mouse-set-point arg)
X   (beginning-of-line 1)
X   (Buffer-menu-not-modified)
X)
X
X(defun x-Buffer-menu-unmark (arg)
X  "Cancel all requested operations on buffer on mouse line."
X   (x-mouse-set-point arg)
X   (beginning-of-lineBuffer-menu-execute 1)
X   (Buffer-menu-unmark)
X)
X
X(defun x-Buffer-menu-mark (arg)
X  "Mark buffer on mouse line for being displayed by \\[Buffer-menu-select] command."
X   (x-mouse-set-point arg)
X   (beginning-of-line 1)
X   (Buffer-menu-mark)
X)
X
X(defun x-Buffer-menu-execute (arg)
X  "Save and/or delete buffers marked with \\[Buffer-menu-save] or \\[Buffer-menu-delete] commands."
X   (Buffer-menu-execute)
X)
END_OF_FILE
if test 2663 -ne `wc -c <'buff-setup.el'`; then
    echo shar: \"'buff-setup.el'\" unpacked with wrong size!
fi
# end of 'buff-setup.el'
fi
if test -f 'info-mouse.el' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'info-mouse.el'\"
else
echo shar: Extracting \"'info-mouse.el'\" \(11118 characters\)
sed "s/^X//" >'info-mouse.el' <<'END_OF_FILE'
X;;!emacs
X;;
X;; FILE:         info-mouse.el
X;; SUMMARY:      Walks through Info networks using one mouse button
X;; USAGE:        GNU Emacs Lisp Library
X;;
X;; AUTHOR:       Bob Weiner, Applied Research, Motorola, Inc., (407)738-2087
X;; E-MAIL:       USENET:  weiner@novavax.UUCP
X;; ORIG-DATE:    02/04/89
X;; LAST-MOD:     12/26/89
X;;
X;; Copyright (C) 1989 Free Software Foundation, Inc.
X;;
X;; This file is not yet part of GNU Emacs.
X;;
X;; Bob Weiner, 03/06/89
X;;   Added 'mouse-non-info-command' variable to allow the 'Info-mouse' command
X;;   to perform a different function when not called from within the "*info*"
X;;   buffer.
X;;
X;;   Added 'Info-mouse-meta' command.
X;;   Added 'mouse-meta-non-info-command' variable to allow the
X;;   'Info-mouse-meta' command to perform a different function when not called
X;;   from within the "*info*" buffer.
X;;
X;; Tom Horsley, 12/26/89
X;;   Modified to work with my local/global mouse map stuff. It is no longer
X;;   a requirement to have funny mode dependent tests, you can have a different
X;;   mouse map in info mode than in other modes.
X;;
X;;   Also added def for last-line-p which is referenced, but not defined
X;;   anywhere that I can find.
X;;
X;;   EMAIL: tahorsley@ssd.csd.harris.com
X;;
X;; DESCRIPTION:  
X;;;
X;;; Note this code is machine independent. (kind of) Its only requirement is
X;;; that you have a pointer device and an Emacs command that sets point to
X;;; the location of the pointing device's cursor.
X;;;
X;;; Since the changes made by Tom Horsley, it also requires separate local
X;;; and global mouse maps. Since that has only been implemented for X, it
X;;; has sort of gotten more device specific.
X;;;
X;;;
X;;; To install:
X;;;
X;;; A pre-requsite is the mighty-mouse.el package which adds support
X;;; for local and global mouse maps.
X;;;
X;;; All you need now is a way to setup the local map when entering info
X;;; mode. This is exactly what mode hooks are for, unfortunately info mode
X;;; is another one of the criminal modes that does not call a hook, so you
X;;; should fix that by going into the emacs/lisp directory and adding some
X;;; stuff to info.el
X;;;
X;;; near the top somewhere add:
X;;;
X;;; (defvar Info-mode-hook nil
X;;;    "List of functions to run on entry to Info-mode.")
X;;;
X;;; then in the body for the defun Info-mode, just before exiting, add:
X;;;
X;;;   (run-hooks 'Info-mode-hook)
X;;;
X;;; This now makes info mode conform to the conventions that call for every
X;;; mode to have a hook. This hook is now the place to add a setup of the
X;;; local-mouse-map for info mode.
X;;;
X;;; From this point on, installation becomes more conventional. First add
X;;; code to your .emacs file to define the variable mouse-set-point-command
X;;; to be the appropriate set point command for your window system. For
X;;; instance, under X you would use:
X;;;
X;;; (setq mouse-set-point-command 'x-mouse-info-set-point)
X;;;
X;;; Then set the Info-mode-hook to run the Info-mouse-setup-mode function:
X;;;
X;;; (setq Info-mode-hook (list 'Info-mouse-setup-mode))
X;;;
X;;; Then make sure emacs can find the Info-mouse-setup-mode function by adding
X;;;
X;;; (autoload 'Info-mouse-setup-mode "info-setup" nil t)
X;;;
X;;; This will automatically load the info-setup.el file containing the X
X;;; specific mouse setup when info mode is first invoked.
X;;;
X;;;
X;; DESCRIP-END.
X
X
X(provide 'info-mouse)
X
X(defvar mouse-set-point-command nil
X"*Name of command that sets point to mouse cursor position.")
X
X(defvar mouse-non-info-command 'info
X"*Name of command to run when button bound to 'Info-mouse' is pressed
Xoutside of the *info* buffer.  Default comand is 'info'.")
X
X(defvar mouse-meta-non-info-command 'info
X"*Name of command to run when button bound to 'Info-mouse-meta' is pressed
Xoutside of the *info* buffer.  Default comand is 'info'.")
X
X(defun Info-mouse ()
X  "When bound to a mouse button, allows one to move through Info
Xdocumentation networks by using only that mouse button.  BE SURE TO CLEAR
XANY BINDING OF THE 'UP' TRANSITION OF THE MOUSE BUTTON THAT YOU BIND
XTHIS FUNCTION TO.
X
XIf button is clicked within:
X (1) any buffer other than *info*, executes command bound to
X       'mouse-non-info-command' if bound;
X (2) an Info Menu or Note, the desired node is found;
X (3) the Up,Next,or Previous entries of a Node Header (first line),
X       the desired node is found;
X (4) the File entry of a Node Header (first line),       
X       the 'Top' node within that file is found;
X (5) the *info* buffer but not within a node reference and not at the
X     end of a node, the current node entry is scrolled up one screen
X (6) the *info* buffer at the end of the current node but not within
X     a node reference, the Next node is found.
X
XReturns t if button is clicked within an Info Node Header, Note
X(cross-reference), or a Menu; otherwise returns nil.  Returns nil if
X'mouse-set-point-command' or 'mouse-non-info-command' variables are
Xnot bound to valid functions."
X
X  (interactive)
X  (if (not (fboundp mouse-set-point-command))
X      nil
X    ;;
X    ;; Set point to cursor position
X    ;;
X    (funcall mouse-set-point-command)
X    ;;
X    ;; Test if in Info buffer already
X    ;;
X    (if (not (equal (buffer-name (current-buffer)) "*info*"))
X        (if (not (fboundp mouse-non-info-command))
X               nil
X            (funcall mouse-non-info-command))
X      (cond ((Info-handle-in-node-hdr))
X	    ((Info-handle-in-note))
X	    ;;
X	    ;; If at end of node, go to next node
X            ;;
X	    ((last-line-p) (Info-next))
X	    ((Info-handle-in-menu))
X	    ;;
X	    ;; If nothing else scroll forward one screen.
X            ;;
X	    ((scroll-up))
X	    ))))
X
X(defun Info-mouse-meta ()
X  "When bound to a meta-mouse button, allows one to move in reverse through Info
Xdocumentation networks by using only that mouse button.  Used in conjunction
Xwith the 'Info-mouse' command.   BE SURE TO CLEAR ANY BINDING OF THE 'UP'
XTRANSITION OF THE MOUSE BUTTON THAT YOU BIND THIS FUNCTION TO.
X
XIf meta-button is clicked within:
X (1) any buffer other than *info*, executes command bound to
X       'mouse-meta-non-info-command' if bound;
X (2) an Info Menu or Note, the desired node is found;
X (3) the Up,Next,or Previous entries of a Node Header (first line),
X       the last node in the history list is found;
X (4) the File entry of a Node Header (first line),       
X       the 'DIR' top-level node is found;
X (5) the *info* buffer but not within a node reference and not at the
X     end of a node, the current node entry is scrolled down one screen
X (6) the *info* buffer at the end of the current node but not within
X     a node reference, the Previous node is found.
X
XReturns t if button is clicked within an Info Node Header, Note
X(cross-reference), or a Menu; otherwise returns nil.  Returns nil if
X'mouse-set-point-command' or 'mouse-meta-non-info-command' variables are
Xnot bound to valid functions."
X
X  (interactive)
X  (if (not (fboundp mouse-set-point-command))
X      nil
X    ;;
X    ;; Set point to cursor position
X    ;;
X    (funcall mouse-set-point-command)
X    ;;
X    ;; Test if in Info buffer already
X    ;;
X    (if (not (equal (buffer-name (current-buffer)) "*info*"))
X        (if (not (fboundp mouse-meta-non-info-command))
X               nil
X            (funcall mouse-meta-non-info-command))
X      (cond ((Info-handle-in-node-hdr-meta))
X	    ((Info-handle-in-note))
X	    ;;
X	    ;; If at end of node, go to previous node
X            ;;
X	    ((last-line-p) (Info-prev))
X	    ((Info-handle-in-menu))
X	    ;;
X	    ;; If nothing else scroll backward one screen.
X            ;;
X	    ((scroll-down))
X	    ))))
X
X(defun Info-handle-in-node-hdr ()
X  "If within an Info node header, move to <FILE>Top, <Up>, <Previous>, or
X<Next> node, depending on which label point is on, and return t.
XOtherwise, return nil."
X  ;;
X  ;; Test if on 1st line of node, i.e. node header
X  ;;
X  (let* ((first-line (1+ (count-lines 1 (point-min))))
X	 (current-line (count-lines 1 (1+ (point)))))
X    (if (not (equal current-line first-line))
X	nil
X      (let ((nodename "Top") (filep nil))
X	(save-excursion
X	  (if (and
X		(re-search-forward "[:, \t\n]" nil t)
X		(re-search-backward
X		  "\\(File\\|Node\\|Up\\|Prev\\|Previous\\|Next\\)[: \t]" nil t))
X	      (progn (setq filep (string-equal
X				   "file"
X				   (downcase (buffer-substring
X					       (match-beginning 1)
X					       (match-end 1)))))
X		     (if (re-search-forward (concat ":[ \n]\\([^,.\t\n"
X						    (if filep " ")
X						    "]*\\)") nil t)
X			 (setq nodename (buffer-substring
X					  (match-beginning 1)
X					  (match-end 1)))))
X	    (error "Node header not found.")))
X	(if filep (setq nodename (concat "(" nodename ")" "Top")))
X	(Info-goto-node nodename)
X	t))))
X
X(defun Info-handle-in-node-hdr-meta ()
X  "If within an Info node header when the 'Info-mouse-meta' command is
Xexecuted, when within the <FILE> header go to the DIR top-level node.  When
Xwithin any other header (<Up>, <Previous>, or <Next>) go to last node from
Xhistory list.  Return t if in Info node header.  Otherwise return nil."
X  ;;
X  ;; Test if on 1st line of node, i.e. node header
X  ;;
X  (let* ((first-line (1+ (count-lines 1 (point-min))))
X	 (current-line (count-lines 1 (1+ (point)))))
X    (if (not (equal current-line first-line))
X	nil
X      (save-excursion
X	(if (and 
X	      (re-search-forward "[:, \t\n]" nil t)
X	      (re-search-backward
X		"\\(File\\|Node\\|Up\\|Prev\\|Previous\\|Next\\)[: \t]" nil t) )
X	    ;; If in <FILE> hdr
X	    (progn (if (string-equal
X			 "file"
X			 (downcase (buffer-substring
X				     (match-beginning 1)
X				     (match-end 1))))
X		       (Info-directory)
X		     (Info-last))
X		   t)
X	  (error "Node header not found.")
X	  nil)))))
X
X(defun Info-handle-in-note ()
X  "If point is within an Info note (cross-reference), follow
Xcross-reference and return t; otherwise return nil."
X  ;;
X  ;; Test if point is within a Note
X  ;;
X  ;; Only works if entire "*Note NOTENAME" string is on one line.
X  ;; Follows Note if user clicks anywhere on the line.
X  ;;
X  (let ((note-name nil) (bol nil))
X    (save-excursion
X      (if (re-search-forward "[:.\n]" nil t)
X	  (progn
X	    (save-excursion
X	      (beginning-of-line)
X	      (setq bol (point)))
X	    (if (re-search-backward "\\*Note[ \n]+\\([^:]*\\):" bol t)
X		(setq note-name (buffer-substring
X				  (match-beginning 1)
X				  (match-end 1)))))))
X    (if (not note-name)
X	nil
X      (Info-follow-reference note-name)
X      t)))
X
X(defun Info-handle-in-menu ()
X  "If point is within an Info menu entry, go to node referenced by
Xentry and return t; otherwise return nil."
X  ;;
X  ;; Test if there is a menu in this node
X  ;;
X  (let ((in-menu nil) (curr-point (point)))
X    (save-excursion
X      (goto-char (point-min))
X      (setq in-menu 
X	    (and (re-search-forward "^\\* Menu:" nil t)
X		 (< (point) curr-point))))
X    (if (not in-menu)
X	nil
X      (forward-char) ; Pass '*' char if point is in front of
X      (if (re-search-backward "^\\*" nil t)
X	  (progn (forward-char 2)
X		 (Info-goto-node (Info-extract-menu-node-name))))
X      t)))
X    
X;; end info-mouse.el
X
X(defun last-line-p ()
X"Return t if point is on the last line."
X   (save-excursion
X      (end-of-line 1)
X      (eobp)
X   )
X)
END_OF_FILE
if test 11118 -ne `wc -c <'info-mouse.el'`; then
    echo shar: \"'info-mouse.el'\" unpacked with wrong size!
fi
# end of 'info-mouse.el'
fi
if test -f 'info-setup.el' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'info-setup.el'\"
else
echo shar: Extracting \"'info-setup.el'\" \(1334 characters\)
sed "s/^X//" >'info-setup.el' <<'END_OF_FILE'
X;; X-window specific setup code for info-mouse.el This is just a small file
X;; of glue to paste together the info-mouse package and the mighty-mouse
X;; package.
X;;
X;; tahorsley@ssd.csd.harris.com (Tom Horsley)
X;; Dec 26, 1989
X
X(require 'info-mouse)
X(require 'mighty-mouse)
X
X; Setup the keys for bopping around info tree. Since middle button is
X; normally paste, and you are not likely to be pasting into an info buffer,
X; re-use it for the info browser.
X
X(defvar Info-mode-mouse-map (make-keymap)
X"map to be used as local mouse map when in info mode."
X)
X(define-key Info-mode-mouse-map x-button-middle 'x-Info-mouse)
X(define-key Info-mode-mouse-map x-button-c-middle 'x-Info-mouse-meta)
X
X(defun Info-mouse-setup-mode ()
X   (x-use-local-mouse-map Info-mode-mouse-map)
X)
X
X(defun x-mouse-info-set-point ()
X"Digs up last mouse position and calls x-mouse-set-point with it."
X   (x-mouse-set-point x-mouse-pos)
X)
X
X(defun x-Info-mouse (arg)
X"Move forward through the info network by clicking the mouse. In a header
Xor menu item, moves to that item. At the end of the screen pages to the
Xnext screen or the next item if at end of item."
X   (Info-mouse)
X)
X
X(defun x-Info-mouse-meta (arg)
X"Move backward through the info network by clicking the mouse. At end of
Xscreen will go to previous page of note or previous item."
X   (Info-mouse-meta)
X)
END_OF_FILE
if test 1334 -ne `wc -c <'info-setup.el'`; then
    echo shar: \"'info-setup.el'\" unpacked with wrong size!
fi
# end of 'info-setup.el'
fi
if test -f 'mouse-help.el' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mouse-help.el'\"
else
echo shar: Extracting \"'mouse-help.el'\" \(5238 characters\)
sed "s/^X//" >'mouse-help.el' <<'END_OF_FILE'
X; Module to get a buffer with a readable description of the mouse key
X; bindings.
X;
X; tahorsley@ssd.csd.harris.com (Tom Horsley)
X; Dec 26, 1989
X;
X; To actually bind a function to some mouse key use:
X; (define-key mouse-map x-button-right 'func)
X; ...
X;
X; Where x-button-right can be replaced with any of the names below:
X
X(require 'x-mouse)
X
X(defvar x-button-description
X   '(
X      (x-button-right           . "right button down")
X      (x-button-right-up        . "right button up")
X      (x-button-middle          . "middle button down")
X      (x-button-middle-up       . "middle button up")
X      (x-button-left            . "left button down")
X      (x-button-left-up         . "left button up")
X
X      (x-button-s-right         . "<Shift> right button down")
X      (x-button-s-right-up      . "<Shift> right button up")
X      (x-button-s-middle        . "<Shift> middle button down")
X      (x-button-s-middle-up     . "<Shift> middle button up")
X      (x-button-s-left          . "<Shift> left button down")
X      (x-button-s-left-up       . "<Shift> left button up")
X
X      (x-button-m-right         . "<Meta> right button down")
X      (x-button-m-right-up      . "<Meta> right button up")
X      (x-button-m-middle        . "<Meta> middle button down")
X      (x-button-m-middle-up     . "<Meta> middle button up")
X      (x-button-m-left          . "<Meta> left button down")
X      (x-button-m-left-up       . "<Meta> left button up")
X
X      (x-button-c-right         . "<Ctrl> right button down")
X      (x-button-c-right-up      . "<Ctrl> right button up")
X      (x-button-c-middle        . "<Ctrl> middle button down")
X      (x-button-c-middle-up     . "<Ctrl> middle button up")
X      (x-button-c-left          . "<Ctrl> left button down")
X      (x-button-c-left-up       . "<Ctrl> left button up")
X
X      (x-button-m-s-right       . "<Meta-Shift> right button down")
X      (x-button-m-s-right-up    . "<Meta-Shift> right button up")
X      (x-button-m-s-middle      . "<Meta-Shift> middle button down")
X      (x-button-m-s-middle-up   . "<Meta-Shift> middle button up")
X      (x-button-m-s-left        . "<Meta-Shift> left button down")
X      (x-button-m-s-left-up     . "<Meta-Shift> left button up")
X
X      (x-button-c-s-right       . "<Ctrl-Shift> right button down")
X      (x-button-c-s-right-up    . "<Ctrl-Shift> right button up")
X      (x-button-c-s-middle      . "<Ctrl-Shift> middle button down")
X      (x-button-c-s-middle-up   . "<Ctrl-Shift> middle button up")
X      (x-button-c-s-left        . "<Ctrl-Shift> left button down")
X      (x-button-c-s-left-up     . "<Ctrl-Shift> left button up")
X
X      (x-button-c-m-right       . "<Ctrl-Meta> right button down")
X      (x-button-c-m-right-up    . "<Ctrl-Meta> right button up")
X      (x-button-c-m-middle      . "<Ctrl-Meta> middle button down")
X      (x-button-c-m-middle-up   . "<Ctrl-Meta> middle button up")
X      (x-button-c-m-left        . "<Ctrl-Meta> left button down")
X      (x-button-c-m-left-up     . "<Ctrl-Meta> left button up")
X
X      (x-button-c-m-s-right     . "<Ctrl-Meta-Shift> right button down")
X      (x-button-c-m-s-right-up  . "<Ctrl-Meta-Shift> right button up")
X      (x-button-c-m-s-middle    . "<Ctrl-Meta-Shift> middle button down")
X      (x-button-c-m-s-middle-up . "<Ctrl-Meta-Shift> middle button up")
X      (x-button-c-m-s-left      . "<Ctrl-Meta-Shift> left button down")
X      (x-button-c-m-s-left-up   . "<Ctrl-Meta-Shift> left button up")
X   )
X)
X
X; Add to help-map under the "x" key (for x-windows, of course)
X(define-key help-map "x" 'mouse-help)
X
X(defun mouse-help ()
X"Display reasonable description of mouse-map."
X   (interactive)
X   (let
X      (
X         (b-desc x-button-description)
X         m-fun
X         k-desc
X         (h-buf (get-buffer-create "*Help*"))
X         p-buf
X         m-ndx
X         (local-map-buffer (current-buffer))
X      )
X      (save-excursion
X         (set-buffer h-buf)
X         (erase-buffer)
X         (while b-desc
X            (setq m-ndx (string-to-char (symbol-value (car (car b-desc)))))
X            (setq m-fun (aref mouse-map m-ndx))
X            (if (eq m-fun 'x-mouse-route-click)
X               ; This is a split mouse map, go look at local-mouse-map then
X               ; global-mouse-map if local was nil.
X               (progn
X                  (save-excursion
X                     (set-buffer local-map-buffer)
X                     (setq m-fun (aref local-mouse-map m-ndx))
X                  )
X                  (if m-fun
X                     nil
X                     (setq m-fun (aref global-mouse-map m-ndx))
X                  )
X               )
X            )
X            (setq k-desc (cdr (car b-desc)))
X            (setq b-desc (cdr b-desc))
X            (if (and m-fun (not (eq m-fun 'x-mouse-ignore)))
X               (let
X                  (
X                     (doc (documentation m-fun))
X                  )
X                  (if doc
X                     (progn
X                        (insert "Function ")
X                        (princ m-fun h-buf)
X                        (insert " bound to " k-desc ":\n" doc "\n\n")
X                     )
X                  )
X               )
X            )
X         )
X         (goto-char (point-min))
X      )
X      (display-buffer h-buf)
X   )
X)
END_OF_FILE
if test 5238 -ne `wc -c <'mouse-help.el'`; then
    echo shar: \"'mouse-help.el'\" unpacked with wrong size!
fi
# end of 'mouse-help.el'
fi
echo shar: End of archive 1 \(of 1\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have the archive.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
--
======================================================================
domain: tahorsley@csd.harris.com       USMail: Tom Horsley
  uucp: ...!uunet!hcx1!tahorsley               511 Kingbird Circle
                                               Delray Beach, FL  33444
+==== Censorship is the only form of Obscenity ======================+
|     (Webster's definition of obscene: Offensive to decency.)       |
+====================================================================+