1 ;; Subroutines of Mouse handling for Sun windows
2 ;; Copyright (C) 1987 Free Software Foundation, Inc.
4 ;; This file is part of GNU Emacs.
6 ;; GNU Emacs is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation; either version 1, or (at your option)
11 ;; GNU Emacs is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;; GNU General Public License for more details.
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GNU Emacs; see the file COPYING. If not, write to
18 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20 ;;; Submitted Mar. 1987, Jeff Peck
21 ;;; Sun Microsystems Inc. <peck@sun.com>
22 ;;; Conceived Nov. 1986, Stan Jefferson,
23 ;;; Computer Science Lab, SRI International.
24 ;;; GoodIdeas Feb. 1987, Steve Greenbaum
25 ;;; & UpClicks Reasoning Systems, Inc.
30 ;;; Functions for manipulating via the mouse and mouse-map definitions
31 ;;; for accessing them. Also definitons of mouse menus.
32 ;;; This file you should freely modify to reflect you personal tastes.
34 ;;; First half of file defines functions to implement mouse commands,
35 ;;; Don't delete any of those, just add what ever else you need.
36 ;;; Second half of file defines mouse bindings, do whatever you want there.
41 ;;; These functions follow the sun-mouse-handler convention of being called
42 ;;; with three arguements: (window x-pos y-pos)
43 ;;; This makes it easy for a mouse executed command to know where the mouse is.
44 ;;; Use the macro "eval-in-window" to execute a function
45 ;;; in a temporarily selected window.
47 ;;; If you have a function that must be called with other arguments
48 ;;; bind the mouse button to an s-exp that contains the necessary parameters.
49 ;;; See "minibuffer" bindings for examples.
51 (defconst cursor-pause-milliseconds
300
52 "*Number of milliseconds to display alternate cursor (usually the mark)")
54 (defun indicate-region (&optional pause
)
55 "Bounce cursor to mark for cursor-pause-milliseconds and back again"
56 (or pause
(setq pause cursor-pause-milliseconds
))
57 (let ((point (point)))
59 (sit-for-millisecs pause
)
61 ;(sleep-for-millisecs pause)
66 ;;; Text buffer operations
68 (defun mouse-move-point (window x y
)
69 "Move point to mouse cursor."
70 (select-window window
)
72 (if (memq last-command
; support the mouse-copy/delete/yank
73 '(mouse-copy mouse-delete mouse-yank-move
))
74 (setq this-command
'mouse-yank-move
))
77 (defun mouse-set-mark (window x y
)
78 "Set mark at mouse cursor."
79 (eval-in-window window
;; use this to get the unwind protect
80 (let ((point (point)))
87 (defun mouse-set-mark-and-select (window x y
)
88 "Set mark at mouse cursor, and select that window."
89 (select-window window
)
90 (mouse-set-mark window x y
)
93 (defun mouse-set-mark-and-stuff (w x y
)
94 "Set mark at mouse cursor, and put region in stuff buffer."
95 (mouse-set-mark-and-select w x y
)
96 (sun-select-region (region-beginning) (region-end)))
99 ;;; Simple mouse dragging stuff: marking with button up
102 (defvar *mouse-drag-window
* nil
)
103 (defvar *mouse-drag-x
* -
1)
104 (defvar *mouse-drag-y
* -
1)
106 (defun mouse-drag-move-point (window x y
)
107 "Move point to mouse cursor, and allow dragging."
108 (mouse-move-point window x y
)
109 (setq *mouse-drag-window
* window
113 (defun mouse-drag-set-mark-stuff (window x y
)
114 "The up click handler that goes with mouse-drag-move-point.
115 If mouse is in same WINDOW but at different X or Y than when
116 mouse-drag-move-point was last executed, set the mark at mouse
117 and put the region in the stuff buffer."
118 (if (and (eq *mouse-drag-window
* window
)
119 (not (and (equal *mouse-drag-x
* x
)
120 (equal *mouse-drag-y
* y
))))
121 (mouse-set-mark-and-stuff window x y
)
122 (setq this-command last-command
)) ; this was just an upclick no-op.
125 (defun mouse-select-or-drag-move-point (window x y
)
126 "Select window if not selected, otherwise do mouse-drag-move-point."
127 (if (eq (selected-window) window
)
128 (mouse-drag-move-point window x y
)
129 (mouse-select-window window x y
)))
134 (defun mouse-exch-pt-and-mark (window x y
)
135 "Exchange point and mark."
136 (select-window window
)
137 (exchange-point-and-mark)
140 (defun mouse-call-kbd-macro (window x y
)
141 "Invokes last keyboard macro at mouse cursor."
142 (mouse-move-point window x y
)
143 (call-last-kbd-macro)
146 (defun mouse-mark-thing (window x y
)
147 "Set point and mark to text object using syntax table.
148 The resulting region is put in the sun-window stuff buffer.
149 Left or right Paren syntax marks an s-expression.
150 Clicking at the end of a line marks the line including a trailing newline.
151 If it doesn't recognize one of these it marks the character at point."
152 (mouse-move-point window x y
)
153 (if (eobp) (open-line 1))
154 (let* ((char (char-after (point)))
155 (syntax (char-syntax char
)))
157 ((eq syntax ?w
) ; word.
161 ;; try to include a single following whitespace (is this a good idea?)
162 ;; No, not a good idea since inconsistent.
163 ;;(if (eq (char-syntax (char-after (mark))) ?\ )
164 ;; (set-mark (1+ (mark))))
165 ((eq syntax ?\
( ) ; open paren.
167 ((eq syntax ?\
) ) ; close paren.
170 (exchange-point-and-mark))
171 ((eolp) ; mark line if at end.
172 (set-mark (1+ (point)))
173 (beginning-of-line 1))
175 (set-mark (1+ (point)))))
176 (indicate-region)) ; display region boundary.
177 (sun-select-region (region-beginning) (region-end))
180 (defun mouse-kill-thing (window x y
)
181 "Kill thing at mouse, and put point there."
182 (mouse-mark-thing window x y
)
183 (kill-region-and-unmark (region-beginning) (region-end))
186 (defun mouse-kill-thing-there (window x y
)
187 "Kill thing at mouse, leave point where it was.
188 See mouse-mark-thing for a description of the objects recognized."
189 (eval-in-window window
191 (mouse-mark-thing window x y
)
192 (kill-region (region-beginning) (region-end))))
195 (defun mouse-save-thing (window x y
&optional quiet
)
196 "Put thing at mouse in kill ring.
197 See mouse-mark-thing for a description of the objects recognized."
198 (mouse-mark-thing window x y
)
199 (copy-region-as-kill (region-beginning) (region-end))
200 (if (not quiet
) (message "Thing saved"))
203 (defun mouse-save-thing-there (window x y
&optional quiet
)
204 "Put thing at mouse in kill ring, leave point as is.
205 See mouse-mark-thing for a description of the objects recognized."
206 (eval-in-window window
208 (mouse-save-thing window x y quiet
))))
213 (defun mouse-copy-thing (window x y
)
214 "Put thing at mouse in kill ring, yank to point.
215 See mouse-mark-thing for a description of the objects recognized."
216 (setq last-command
'not-kill
) ;Avoids appending to previous kills.
217 (mouse-save-thing-there window x y t
)
219 (setq this-command
'yank
))
221 (defun mouse-move-thing (window x y
)
222 "Kill thing at mouse, yank it to point.
223 See mouse-mark-thing for a description of the objects recognized."
224 (setq last-command
'not-kill
) ;Avoids appending to previous kills.
225 (mouse-kill-thing-there window x y
)
227 (setq this-command
'yank
))
229 (defun mouse-yank-at-point (&optional window x y
)
230 "Yank from kill-ring at point; then cycle thru kill ring."
231 (if (eq last-command
'yank
)
232 (let ((before (< (point) (mark))))
233 (delete-region (point) (mark))
234 (rotate-yank-pointer 1)
235 (insert (car kill-ring-yank-pointer
))
236 (if before
(exchange-point-and-mark)))
238 (setq this-command
'yank
))
240 (defun mouse-yank-at-mouse (window x y
)
241 "Yank from kill-ring at mouse; then cycle thru kill ring."
242 (mouse-move-point window x y
)
243 (mouse-yank-at-point window x y
))
245 (defun mouse-save/delete
/yank
(&optional window x y
)
246 "Context sensitive save/delete/yank.
247 Consecutive clicks perform as follows:
248 * first click saves region to kill ring,
249 * second click kills region,
250 * third click yanks from kill ring,
251 * subsequent clicks cycle thru kill ring.
252 If mouse-move-point is performed after the first or second click,
253 the next click will do a yank, etc. Except for a possible mouse-move-point,
254 this command is insensitive to mouse location."
256 ((memq last-command
'(mouse-delete yank mouse-yank-move
)) ; third+ click
257 (mouse-yank-at-point))
258 ((eq last-command
'mouse-copy
) ; second click
259 (kill-region (region-beginning) (region-end))
260 (setq this-command
'mouse-delete
))
262 (copy-region-as-kill (region-beginning) (region-end))
263 (message "Region saved")
264 (setq this-command
'mouse-copy
))
268 (defun mouse-split-horizontally (window x y
)
269 "Splits the window horizontally at mouse cursor."
270 (eval-in-window window
(split-window-horizontally (1+ x
))))
272 (defun mouse-split-vertically (window x y
)
273 "Split the window vertically at the mouse cursor."
274 (eval-in-window window
(split-window-vertically (1+ y
))))
276 (defun mouse-select-window (window x y
)
277 "Selects the window, restoring point."
278 (select-window window
))
280 (defun mouse-delete-other-windows (window x y
)
281 "Deletes all windows except the one mouse is in."
282 (delete-other-windows window
))
284 (defun mouse-delete-window (window x y
)
285 "Deletes the window mouse is in."
286 (delete-window window
))
288 (defun mouse-undo (window x y
)
289 "Invokes undo in the window mouse is in."
290 (eval-in-window window
(undo)))
293 ;;; Scroll operations
296 ;;; The move-to-window-line is used below because otherwise
297 ;;; scrolling a non-selected process window with the mouse, after
298 ;;; the process has written text past the bottom of the window,
299 ;;; gives an "End of buffer" error, and then scrolls. The
300 ;;; move-to-window-line seems to force recomputing where things are.
301 (defun mouse-scroll-up (window x y
)
302 "Scrolls the window upward."
303 (eval-in-window window
(move-to-window-line 1) (scroll-up nil
)))
305 (defun mouse-scroll-down (window x y
)
306 "Scrolls the window downward."
307 (eval-in-window window
(scroll-down nil
)))
309 (defun mouse-scroll-proportional (window x y
)
310 "Scrolls the window proportionally corresponding to window
311 relative X divided by window width."
312 (eval-in-window window
313 (if (>= x
(1- (window-width)))
314 ;; When x is maximun (equal to or 1 less than window width),
315 ;; goto end of buffer. We check for this special case
316 ;; becuase the calculated goto-char often goes short of the
317 ;; end due to roundoff error, and we often really want to go
319 (goto-char (point-max))
321 (goto-char (+ (point-min) ; For narrowed regions.
322 (* x
(/ (- (point-max) (point-min))
323 (1- (window-width))))))
326 (what-cursor-position) ; Report position.
329 (defun mouse-line-to-top (window x y
)
330 "Scrolls the line at the mouse cursor up to the top."
331 (eval-in-window window
(scroll-up y
)))
333 (defun mouse-top-to-line (window x y
)
334 "Scrolls the top line down to the mouse cursor."
335 (eval-in-window window
(scroll-down y
)))
337 (defun mouse-line-to-bottom (window x y
)
338 "Scrolls the line at the mouse cursor to the bottom."
339 (eval-in-window window
(scroll-up (+ y
(- 2 (window-height))))))
341 (defun mouse-bottom-to-line (window x y
)
342 "Scrolls the bottom line up to the mouse cursor."
343 (eval-in-window window
(scroll-down (+ y
(- 2 (window-height))))))
345 (defun mouse-line-to-middle (window x y
)
346 "Scrolls the line at the mouse cursor to the middle."
347 (eval-in-window window
(scroll-up (- y -
1 (/ (window-height) 2)))))
349 (defun mouse-middle-to-line (window x y
)
350 "Scrolls the line at the middle to the mouse cursor."
351 (eval-in-window window
(scroll-up (- (/ (window-height) 2) y
1))))
358 ("Vertically" mouse-expand-vertically
*menu-window
*)
359 ("Horizontally" mouse-expand-horizontally
*menu-window
*))
361 (defmenu delete-window-menu
362 ("This One" delete-window
*menu-window
*)
363 ("All Others" delete-other-windows
*menu-window
*))
365 (defmenu mouse-help-menu
367 mouse-help-region
*menu-window
* *menu-x
* *menu-y
* 'text
)
369 mouse-help-region
*menu-window
* *menu-x
* *menu-y
* 'scrollbar
)
371 mouse-help-region
*menu-window
* *menu-x
* *menu-y
* 'modeline
)
373 mouse-help-region
*menu-window
* *menu-x
* *menu-y
* 'minibuffer
)
376 (defmenu emacs-quit-menu
377 ("Suspend" suspend-emacstool
)
378 ("Quit" save-buffers-kill-emacs
))
382 ("Stuff Selection" sun-yank-selection
)
383 ("Expand" . expand-menu
)
384 ("Delete Window" . delete-window-menu
)
385 ("Previous Buffer" mouse-select-previous-buffer
*menu-window
*)
386 ("Save Buffers" save-some-buffers
)
387 ("List Directory" list-directory nil
)
389 ("Mouse Help" . mouse-help-menu
)
390 ("Quit" . emacs-quit-menu
))
392 (defun emacs-menu-eval (window x y
)
393 "Pop-up menu of editor commands."
394 (sun-menu-evaluate window
(1+ x
) (1- y
) 'emacs-menu
))
396 (defun mouse-expand-horizontally (window)
397 (eval-in-window window
399 (update-display) ; Try to redisplay, since can get confused.
402 (defun mouse-expand-vertically (window)
403 (eval-in-window window
(enlarge-window 4)))
405 (defun mouse-select-previous-buffer (window)
406 "Switch buffer in mouse window to most recently selected buffer."
407 (eval-in-window window
(switch-to-buffer (other-buffer))))
412 (defmenu minibuffer-menu
413 ("Minibuffer" message
"Just some miscellanous minibuffer commands")
414 ("Stuff" sun-yank-selection
)
415 ("Do-It" exit-minibuffer
)
416 ("Abort" abort-recursive-edit
)
417 ("Suspend" suspend-emacs
))
419 (defun minibuffer-menu-eval (window x y
)
420 "Pop-up menu of commands."
421 (sun-menu-evaluate window x
(1- y
) 'minibuffer-menu
))
423 (defun mini-move-point (window x y
)
424 ;; -6 is good for most common cases
425 (mouse-move-point window
(- x
6) 0))
427 (defun mini-set-mark-and-stuff (window x y
)
428 ;; -6 is good for most common cases
429 (mouse-set-mark-and-stuff window
(- x
6) 0))
432 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
433 ;;; Buffer-mode Mouse commands
434 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
436 (defun Buffer-at-mouse (w x y
)
437 "Calls Buffer-menu-buffer from mouse click."
438 (save-window-excursion
439 (mouse-move-point w x y
)
441 (Buffer-menu-buffer t
)))
443 (defun mouse-buffer-bury (w x y
)
444 "Bury the indicated buffer."
445 (bury-buffer (Buffer-at-mouse w x y
))
448 (defun mouse-buffer-select (w x y
)
449 "Put the indicated buffer in selected window."
450 (switch-to-buffer (Buffer-at-mouse w x y
))
454 (defun mouse-buffer-delete (w x y
)
455 "mark indicated buffer for delete"
456 (save-window-excursion
457 (mouse-move-point w x y
)
461 (defun mouse-buffer-execute (w x y
)
462 "execute buffer-menu selections"
463 (save-window-excursion
464 (mouse-move-point w x y
)
465 (Buffer-menu-execute)
468 (defun enable-mouse-in-buffer-list ()
469 "Call this to enable mouse selections in *Buffer List*
470 LEFT puts the indicated buffer in the selected window.
471 MIDDLE buries the indicated buffer.
472 RIGHT marks the indicated buffer for deletion.
473 MIDDLE-RIGHT deletes the marked buffers.
474 To unmark a buffer marked for deletion, select it with LEFT."
475 (save-window-excursion
476 (list-buffers) ; Initialize *Buffer List*
477 (set-buffer "*Buffer List*")
478 (local-set-mouse '(text middle
) 'mouse-buffer-bury
)
479 (local-set-mouse '(text left
) 'mouse-buffer-select
)
480 (local-set-mouse '(text right
) 'mouse-buffer-delete
)
481 (local-set-mouse '(text middle right
) 'mouse-buffer-execute
)
486 ;;;*******************************************************************
488 ;;; Global Mouse Bindings.
490 ;;; There is some sense to this mouse binding madness:
491 ;;; LEFT and RIGHT scrolls are inverses.
492 ;;; SHIFT makes an opposite meaning in the scroll bar.
493 ;;; SHIFT is an alternative to DOUBLE (but double chords do not exist).
494 ;;; META makes the scrollbar functions work in the text region.
495 ;;; MIDDLE operates the mark
496 ;;; LEFT operates at point
498 ;;; META commands are generally non-destructive,
499 ;;; SHIFT is a little more dangerous.
500 ;;; CONTROL is for the really complicated ones.
502 ;;; CONTROL-META-SHIFT-RIGHT gives help on that region.
505 ;;; Text Region mousemap
507 ;; The basics: Point, Mark, Menu, Sun-Select:
508 (global-set-mouse '(text left
) 'mouse-drag-move-point
)
509 (global-set-mouse '(text up left
) 'mouse-drag-set-mark-stuff
)
510 (global-set-mouse '(text shift left
) 'mouse-exch-pt-and-mark
)
511 (global-set-mouse '(text double left
) 'mouse-exch-pt-and-mark
)
513 (global-set-mouse '(text middle
) 'mouse-set-mark-and-stuff
)
515 (global-set-mouse '(text right
) 'emacs-menu-eval
)
516 (global-set-mouse '(text shift right
) '(sun-yank-selection))
517 (global-set-mouse '(text double right
) '(sun-yank-selection))
519 ;; The Slymoblics multi-command for Save, Kill, Copy, Move:
520 (global-set-mouse '(text shift middle
) 'mouse-save
/delete
/yank
)
521 (global-set-mouse '(text double middle
) 'mouse-save
/delete
/yank
)
523 ;; Save, Kill, Copy, Move Things:
524 ;; control-left composes with control middle/right to produce copy/move
525 (global-set-mouse '(text control middle
) 'mouse-save-thing-there
)
526 (global-set-mouse '(text control right
) 'mouse-kill-thing-there
)
527 (global-set-mouse '(text control left
) 'mouse-yank-at-point
)
528 (global-set-mouse '(text control middle left
) 'mouse-copy-thing
)
529 (global-set-mouse '(text control right left
) 'mouse-move-thing
)
530 (global-set-mouse '(text control right middle
) 'mouse-mark-thing
)
532 ;; The Universal mouse help command (press all buttons):
533 (global-set-mouse '(text shift control meta right
) 'mouse-help-region
)
534 (global-set-mouse '(text double control meta right
) 'mouse-help-region
)
536 ;;; Meta in Text Region is like meta version in scrollbar:
537 (global-set-mouse '(text meta left
) 'mouse-line-to-top
)
538 (global-set-mouse '(text meta shift left
) 'mouse-line-to-bottom
)
539 (global-set-mouse '(text meta double left
) 'mouse-line-to-bottom
)
540 (global-set-mouse '(text meta middle
) 'mouse-line-to-middle
)
541 (global-set-mouse '(text meta shift middle
) 'mouse-middle-to-line
)
542 (global-set-mouse '(text meta double middle
) 'mouse-middle-to-line
)
543 (global-set-mouse '(text meta control middle
) 'mouse-split-vertically
)
544 (global-set-mouse '(text meta right
) 'mouse-top-to-line
)
545 (global-set-mouse '(text meta shift right
) 'mouse-bottom-to-line
)
546 (global-set-mouse '(text meta double right
) 'mouse-bottom-to-line
)
549 (global-set-mouse '(text meta control left
) 'mouse-call-kbd-macro
)
550 (global-set-mouse '(text meta control right
) 'mouse-undo
)
553 ;;; Scrollbar mousemap.
554 ;;; Are available in the Scrollbar Region, or with Meta Text (or Meta Scrollbar)
556 (global-set-mouse '(scrollbar left
) 'mouse-line-to-top
)
557 (global-set-mouse '(scrollbar shift left
) 'mouse-line-to-bottom
)
558 (global-set-mouse '(scrollbar double left
) 'mouse-line-to-bottom
)
560 (global-set-mouse '(scrollbar middle
) 'mouse-line-to-middle
)
561 (global-set-mouse '(scrollbar shift middle
) 'mouse-middle-to-line
)
562 (global-set-mouse '(scrollbar double middle
) 'mouse-middle-to-line
)
563 (global-set-mouse '(scrollbar control middle
) 'mouse-split-vertically
)
565 (global-set-mouse '(scrollbar right
) 'mouse-top-to-line
)
566 (global-set-mouse '(scrollbar shift right
) 'mouse-bottom-to-line
)
567 (global-set-mouse '(scrollbar double right
) 'mouse-bottom-to-line
)
569 (global-set-mouse '(scrollbar meta left
) 'mouse-line-to-top
)
570 (global-set-mouse '(scrollbar meta shift left
) 'mouse-line-to-bottom
)
571 (global-set-mouse '(scrollbar meta double left
) 'mouse-line-to-bottom
)
572 (global-set-mouse '(scrollbar meta middle
) 'mouse-line-to-middle
)
573 (global-set-mouse '(scrollbar meta shift middle
) 'mouse-middle-to-line
)
574 (global-set-mouse '(scrollbar meta double middle
) 'mouse-middle-to-line
)
575 (global-set-mouse '(scrollbar meta control middle
) 'mouse-split-vertically
)
576 (global-set-mouse '(scrollbar meta right
) 'mouse-top-to-line
)
577 (global-set-mouse '(scrollbar meta shift right
) 'mouse-bottom-to-line
)
578 (global-set-mouse '(scrollbar meta double right
) 'mouse-bottom-to-line
)
580 ;; And the help menu:
581 (global-set-mouse '(scrollbar shift control meta right
) 'mouse-help-region
)
582 (global-set-mouse '(scrollbar double control meta right
) 'mouse-help-region
)
585 ;;; Modeline mousemap.
587 ;;; Note: meta of any single button selects window.
589 (global-set-mouse '(modeline left
) 'mouse-scroll-up
)
590 (global-set-mouse '(modeline meta left
) 'mouse-select-window
)
592 (global-set-mouse '(modeline middle
) 'mouse-scroll-proportional
)
593 (global-set-mouse '(modeline meta middle
) 'mouse-select-window
)
594 (global-set-mouse '(modeline control middle
) 'mouse-split-horizontally
)
596 (global-set-mouse '(modeline right
) 'mouse-scroll-down
)
597 (global-set-mouse '(modeline meta right
) 'mouse-select-window
)
599 ;;; control-left selects this window, control-right deletes it.
600 (global-set-mouse '(modeline control left
) 'mouse-delete-other-windows
)
601 (global-set-mouse '(modeline control right
) 'mouse-delete-window
)
603 ;; in case of confusion, just select it:
604 (global-set-mouse '(modeline control left right
)'mouse-select-window
)
606 ;; even without confusion (and without the keyboard) select it:
607 (global-set-mouse '(modeline left right
) 'mouse-select-window
)
609 ;; And the help menu:
610 (global-set-mouse '(modeline shift control meta right
) 'mouse-help-region
)
611 (global-set-mouse '(modeline double control meta right
) 'mouse-help-region
)
614 ;;; Minibuffer Mousemap
615 ;;; Demonstrating some variety:
617 (global-set-mouse '(minibuffer left
) 'mini-move-point
)
619 (global-set-mouse '(minibuffer middle
) 'mini-set-mark-and-stuff
)
621 (global-set-mouse '(minibuffer shift middle
) '(select-previous-complex-command))
622 (global-set-mouse '(minibuffer double middle
) '(select-previous-complex-command))
623 (global-set-mouse '(minibuffer control middle
) '(next-complex-command 1))
624 (global-set-mouse '(minibuffer meta middle
) '(previous-complex-command 1))
626 (global-set-mouse '(minibuffer right
) 'minibuffer-menu-eval
)
628 (global-set-mouse '(minibuffer shift control meta right
) 'mouse-help-region
)
629 (global-set-mouse '(minibuffer double control meta right
) 'mouse-help-region
)