home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Editors / Emacs / Source / lisp / eterm-fns.el next >
Encoding:
Text File  |  1992-11-15  |  18.7 KB  |  534 lines

  1. ;; Subroutines of Mouse handling for NeXT "Emacs" front end
  2. ;; Ripped off of the Sun windows support code
  3. ;; Copyright (C) 1987 Free Software Foundation, Inc.
  4.  
  5. ;; This file is NOT part of the standard GNU Emacs distribution.
  6.  
  7. ;; GNU Emacs is distributed in the hope that it will be useful,
  8. ;; but WITHOUT ANY WARRANTY.  No author or distributor
  9. ;; accepts responsibility to anyone for the consequences of using it
  10. ;; or for whether it serves any particular purpose or works at all,
  11. ;; unless he says so in writing.  Refer to the GNU Emacs General Public
  12. ;; License for full details.
  13.  
  14. ;; Everyone is granted permission to copy, modify and redistribute
  15. ;; GNU Emacs, but only under the conditions described in the
  16. ;; GNU Emacs General Public License.   A copy of this license is
  17. ;; supposed to have been given to you along with GNU Emacs so you
  18. ;; can know your rights and responsibilities.  It should be in a
  19. ;; file named COPYING.  Among other things, the copyright notice
  20. ;; and this notice must be preserved on all copies.
  21.  
  22. ;;; Apr 4 '90 jgm    Ripped off of sun-fns.el
  23. ;;(provide 'eterm-fns)
  24. ;;(require 'eterm-mouse)
  25. ;;;
  26. ;;; Functions for manipulating via the mouse and mouse-map definitions
  27. ;;; for accessing them.  Also definitons of mouse menus.
  28. ;;; This file you should freely modify to reflect you personal tastes.
  29. ;;;
  30. ;;; First half of file defines functions to implement mouse commands,
  31. ;;; Don't delete any of those, just add what ever else you need.
  32. ;;; Second half of file defines mouse bindings, do whatever you want there.
  33.  
  34. ;;;
  35. ;;;         Mouse Functions.
  36. ;;;
  37. ;;; These functions follow the eterm-mouse-handler convention of being called
  38. ;;; with three arguements: (window x-pos y-pos)
  39. ;;; This makes it easy for a mouse executed command to know where the mouse is.
  40. ;;; Use the macro "eval-in-window" to execute a function 
  41. ;;; in a temporarily selected window.
  42. ;;;
  43. ;;; If you have a function that must be called with other arguments
  44. ;;; bind the mouse button to an s-exp that contains the necessary parameters.
  45. ;;; See "minibuffer" bindings for examples.
  46. ;;;
  47. (defconst cursor-pause-milliseconds 300
  48.   "*Number of milliseconds to display alternate cursor (usually the mark)")
  49.  
  50. (defun indicate-region (&optional pause)
  51.   "Bounce cursor to mark for cursor-pause-milliseconds and back again"
  52.   (or pause (setq pause cursor-pause-milliseconds))
  53.   (let ((point (point)))
  54.     (goto-char (mark))
  55.     (if (fboundp 'sit-for-millisecs)
  56.     (sit-for-millisecs pause)
  57.       (sit-for 1))
  58.     (goto-char point)))
  59.  
  60.  
  61. ;;;
  62. ;;; Text buffer operations
  63. ;;;
  64. (defun mouse-move-point (window x y)
  65.   "Move point to mouse cursor."
  66.   (select-window window)
  67.   (move-to-loc x y)
  68.   (if (memq last-command    ; support the mouse-copy/delete/yank
  69.         '(mouse-copy mouse-delete mouse-yank-move))
  70.       (setq this-command 'mouse-yank-move))
  71.   )
  72.  
  73. (defun mouse-set-mark (window x y)
  74.   "Set mark at mouse cursor."
  75.   (eval-in-window window    ;; use this to get the unwind protect
  76.     (let ((point (point)))
  77.       (move-to-loc x y)
  78.       (set-mark (point))
  79.       (goto-char point)
  80.       (indicate-region)))
  81.   )
  82.  
  83. (defun mouse-set-mark-and-select (window x y)
  84.   "Set mark at mouse cursor, and select that window."
  85.   (select-window window)
  86.   (mouse-set-mark window x y)
  87.   )
  88.  
  89. ;;;
  90. ;;; Simple mouse dragging stuff: marking with button up
  91. ;;;
  92.  
  93. (defvar *mouse-drag-window* nil)
  94. (defvar *mouse-drag-x* -1)
  95. (defvar *mouse-drag-y* -1)
  96.  
  97. (defun mouse-drag-move-point (window x y)
  98.   "Move point to mouse cursor, and allow dragging."
  99.   (mouse-move-point window x y)
  100.   (setq *mouse-drag-window* window
  101.     *mouse-drag-x* x
  102.     *mouse-drag-y* y))
  103.  
  104. (defun mouse-drag-set-mark (window x y)
  105.   "The up click handler that goes with mouse-drag-move-point.
  106. If mouse is in same WINDOW but at different X or Y than when
  107. mouse-drag-move-point was last executed, set the mark at mouse."
  108.   (if (and (eq *mouse-drag-window* window)
  109.        (not (and (equal *mouse-drag-x* x)
  110.              (equal *mouse-drag-y* y))))
  111.       (mouse-set-mark-and-select window x y)
  112.     (setq this-command last-command))    ; this was just an upclick no-op.
  113.   )
  114.  
  115. (defun mouse-select-or-drag-move-point (window x y)
  116.   "Select window if not selected, otherwise do mouse-drag-move-point."
  117.   (if (eq (selected-window) window)
  118.       (mouse-drag-move-point window x y)
  119.     (mouse-select-window window x y)))
  120.  
  121. ;;;
  122. ;;; esoteria:
  123. ;;;
  124. (defun mouse-exch-pt-and-mark (window x y)
  125.   "Exchange point and mark."
  126.   (select-window window)
  127.   (exchange-point-and-mark)
  128.   )
  129.  
  130. (defun mouse-call-kbd-macro (window x y)
  131.   "Invokes last keyboard macro at mouse cursor."
  132.   (mouse-move-point window x y)
  133.   (call-last-kbd-macro)
  134.   )
  135.  
  136. (defun mouse-mark-thing (window x y)
  137.   "Set point and mark to text object using syntax table.
  138. The resulting region is put in the NeXT pasteboard.
  139. Left or right Paren syntax marks an s-expression.  
  140. Clicking at the end of a line marks the line including a trailing newline.  
  141. If it doesn't recognize one of these it marks the character at point."
  142.   (mouse-move-point window x y)
  143.   (if (eobp) (open-line 1))
  144.   (let* ((char (char-after (point)))
  145.          (syntax (char-syntax char)))
  146.     (cond
  147.      ((eq syntax ?w)            ; word.
  148.       (forward-word 1)
  149.       (set-mark (point))
  150.       (forward-word -1))
  151.      ;; try to include a single following whitespace (is this a good idea?)
  152.      ;; No, not a good idea since inconsistent.
  153.      ;;(if (eq (char-syntax (char-after (mark))) ?\ )
  154.      ;;    (set-mark (1+ (mark))))
  155.      ((eq syntax ?\( )            ; open paren.
  156.       (mark-sexp 1))
  157.      ((eq syntax ?\) )            ; close paren.
  158.       (forward-char 1)
  159.       (mark-sexp -1)
  160.       (exchange-point-and-mark))
  161.      ((eolp)                ; mark line if at end.
  162.       (set-mark (1+ (point)))
  163.       (beginning-of-line 1))
  164.      (t                    ; mark character
  165.       (set-mark (1+ (point)))))
  166.     (indicate-region))            ; display region boundary.
  167.   )
  168.  
  169. (defun mouse-kill-thing (window x y)
  170.   "Kill thing at mouse, and put point there."
  171.   (mouse-mark-thing window x y)
  172.   (eterm-send-region-to-cut-buffer-and-wipe (region-beginning) (region-end))
  173.   )
  174.  
  175. (defun mouse-kill-thing-there (window x y)
  176.   "Kill thing at mouse, leave point where it was.
  177. See mouse-mark-thing for a description of the objects recognized."
  178.   (eval-in-window window 
  179.     (save-excursion
  180.       (mouse-mark-thing window x y)
  181.       (eterm-send-region-to-cut-buffer-and-wipe (region-beginning) (region-end))))
  182.   )
  183.  
  184. (defun mouse-save-thing (window x y &optional quiet)
  185.   "Put thing at mouse in kill ring.
  186. See mouse-mark-thing for a description of the objects recognized."
  187.   (mouse-mark-thing window x y)
  188.   (eterm-send-region-to-cut-buffer (region-beginning) (region-end))
  189.   (if (not quiet) (message "Thing saved"))
  190.   )
  191.  
  192. (defun mouse-save-thing-there (window x y &optional quiet)
  193.   "Put thing at mouse in kill ring, leave point as is.
  194. See mouse-mark-thing for a description of the objects recognized."
  195.   (eval-in-window window
  196.     (save-excursion
  197.       (mouse-save-thing window x y quiet))))
  198.  
  199. ;;;
  200. ;;; Mouse yanking...
  201. ;;;
  202. (defun mouse-copy-thing (window x y)
  203.   "Put thing at mouse in kill ring, yank to point.
  204. See mouse-mark-thing for a description of the objects recognized."
  205.   (setq last-command 'not-kill)     ;Avoids appending to previous kills.
  206.   (mouse-save-thing-there window x y t)
  207.   (yank)
  208.   (setq this-command 'yank))
  209.  
  210. (defun mouse-move-thing (window x y)
  211.   "Kill thing at mouse, yank it to point.
  212. See mouse-mark-thing for a description of the objects recognized."
  213.   (setq last-command 'not-kill)     ;Avoids appending to previous kills.
  214.   (mouse-kill-thing-there window x y)
  215.   (yank)
  216.   (setq this-command 'yank))
  217.  
  218. (defun mouse-yank-at-point (&optional window x y)
  219.   "Yank from kill-ring at point; then cycle thru kill ring."
  220.   (if (eq last-command 'yank)
  221.       (let ((before (< (point) (mark))))
  222.     (delete-region (point) (mark))
  223.     (rotate-yank-pointer 1)
  224.     (insert (car kill-ring-yank-pointer))
  225.     (if before (exchange-point-and-mark)))
  226.     (yank))
  227.   (setq this-command 'yank))
  228.  
  229. (defun mouse-yank-at-mouse (window x y)
  230.   "Yank from kill-ring at mouse; then cycle thru kill ring."
  231.   (mouse-move-point window x y)
  232.   (mouse-yank-at-point window x y))
  233.  
  234. (defun mouse-save/delete/yank (&optional window x y)
  235.   "Context sensitive save/delete/yank.
  236. Consecutive clicks perform as follows:
  237.     * first click saves region to kill ring,
  238.     * second click kills region,
  239.     * third click yanks from kill ring,
  240.     * subsequent clicks cycle thru kill ring.
  241. If mouse-move-point is performed after the first or second click,
  242. the next click will do a yank, etc.  Except for a possible mouse-move-point,
  243. this command is insensitive to mouse location."
  244.   (cond
  245.    ((memq last-command '(mouse-delete yank mouse-yank-move))    ; third+ click
  246.     (mouse-yank-at-point))
  247.    ((eq last-command 'mouse-copy)    ; second click
  248.     (kill-region (region-beginning) (region-end))
  249.     (setq this-command 'mouse-delete))
  250.    (t                    ; first click
  251.     (copy-region-as-kill (region-beginning) (region-end))
  252.     (message "Region saved")
  253.     (setq this-command 'mouse-copy))
  254.    ))
  255.  
  256.  
  257. (defun mouse-split-horizontally (window x y)
  258.   "Splits the window horizontally at mouse cursor."
  259.   (eval-in-window window (split-window-horizontally (1+ x))))
  260.  
  261. (defun mouse-split-vertically (window x y)
  262.   "Split the window vertically at the mouse cursor."
  263.   (eval-in-window window (split-window-vertically (1+ y))))
  264.  
  265. (defun mouse-select-window (window x y)
  266.   "Selects the window, restoring point."
  267.   (select-window window))
  268.  
  269. (defun mouse-delete-other-windows (window x y)
  270.   "Deletes all windows except the one mouse is in."
  271.   (delete-other-windows window))
  272.  
  273. (defun mouse-delete-window (window x y)
  274.   "Deletes the window mouse is in."
  275.   (delete-window window))
  276.  
  277. (defun mouse-undo (window x y)
  278.   "Invokes undo in the window mouse is in."
  279.   (eval-in-window window (undo)))
  280.  
  281. ;;;
  282. ;;; Scroll operations
  283. ;;;
  284.  
  285. ;;; The move-to-window-line is used below because otherwise
  286. ;;; scrolling a non-selected process window with the mouse, after
  287. ;;; the process has written text past the bottom of the window,
  288. ;;; gives an "End of buffer" error, and then scrolls.  The
  289. ;;; move-to-window-line seems to force recomputing where things are.
  290. (defun mouse-scroll-up (window x y)
  291.   "Scrolls the window upward."
  292.   (eval-in-window window (move-to-window-line 1) (scroll-up nil)))
  293.  
  294. (defun mouse-scroll-down (window x y)
  295.   "Scrolls the window downward."
  296.   (eval-in-window window (scroll-down nil)))
  297.  
  298. (defun mouse-scroll-proportional (window x y)
  299.   "Scrolls the window proportionally corresponding to window
  300. relative X divided by window width."
  301.   (eval-in-window window 
  302.     (if (>= x (1- (window-width)))
  303.     ;; When x is maximun (equal to or 1 less than window width),
  304.     ;; goto end of buffer.  We check for this special case
  305.     ;; becuase the calculated goto-char often goes short of the
  306.     ;; end due to roundoff error, and we often really want to go
  307.     ;; to the end.
  308.     (goto-char (point-max))
  309.       (progn
  310.     (goto-char (+ (point-min)    ; For narrowed regions.
  311.               (* x (/ (- (point-max) (point-min))
  312.                   (1- (window-width))))))
  313.     (beginning-of-line))
  314.       )
  315.     (what-cursor-position)        ; Report position.
  316.     ))
  317.  
  318. (defun mouse-line-to-top (window x y)
  319.   "Scrolls the line at the mouse cursor up to the top."
  320.   (eval-in-window window (scroll-up y)))
  321.  
  322. (defun mouse-top-to-line (window x y)
  323.   "Scrolls the top line down to the mouse cursor."
  324.   (eval-in-window window (scroll-down y)))
  325.  
  326. (defun mouse-line-to-bottom (window x y)
  327.   "Scrolls the line at the mouse cursor to the bottom."
  328.   (eval-in-window window (scroll-up (+ y (- 2 (window-height))))))
  329.  
  330. (defun mouse-bottom-to-line (window x y)
  331.   "Scrolls the bottom line up to the mouse cursor."
  332.   (eval-in-window window (scroll-down (+ y (- 2 (window-height))))))
  333.  
  334. (defun mouse-line-to-middle (window x y)
  335.   "Scrolls the line at the mouse cursor to the middle."
  336.   (eval-in-window window (scroll-up (- y -1 (/ (window-height) 2)))))
  337.  
  338. (defun mouse-middle-to-line (window x y)
  339.   "Scrolls the line at the middle to the mouse cursor."
  340.   (eval-in-window window (scroll-up (- (/ (window-height) 2) y 1))))
  341.  
  342.  
  343.  
  344. ;;;
  345. ;;; minibuffer
  346. ;;;
  347. (defun mini-move-point (window x y)
  348.   ;; -6 is good for most common cases
  349.   (mouse-move-point window (- x 6) 0))
  350.  
  351. (defun mini-set-mark-and-select (window x y)
  352.   ;; -6 is good for most common cases
  353.   (mouse-set-mark-and-select window (- x 6) 0))
  354.  
  355.  
  356. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
  357. ;;; Buffer-mode Mouse commands
  358. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
  359.  
  360. (defun Buffer-at-mouse (w x y)
  361.   "Calls Buffer-menu-buffer from mouse click."
  362.   (save-window-excursion 
  363.     (mouse-move-point w x y)
  364.     (beginning-of-line)
  365.     (Buffer-menu-buffer t)))
  366.  
  367. (defun mouse-buffer-bury (w x y)
  368.   "Bury the indicated buffer."
  369.   (bury-buffer (Buffer-at-mouse w x y))
  370.   )
  371.  
  372. (defun mouse-buffer-select (w x y)
  373.   "Put the indicated buffer in selected window."
  374.   (switch-to-buffer (Buffer-at-mouse w x y))
  375.   (list-buffers)
  376.   )
  377.  
  378. (defun mouse-buffer-delete (w x y)
  379.   "mark indicated buffer for delete"
  380.   (save-window-excursion
  381.     (mouse-move-point w x y)
  382.     (Buffer-menu-delete)
  383.     ))
  384.  
  385. (defun mouse-buffer-execute (w x y)
  386.   "execute buffer-menu selections"
  387.   (save-window-excursion
  388.     (mouse-move-point w x y)
  389.     (Buffer-menu-execute)
  390.     ))
  391.   
  392. (defun enable-mouse-in-buffer-list ()
  393.   "Call this to enable mouse selections in *Buffer List*
  394.     LEFT puts the indicated buffer in the selected window.
  395.     SHIFT-LEFT buries the indicated buffer.
  396.     RIGHT marks the indicated buffer for deletion.
  397.     SHIFT-RIGHT deletes the marked buffers.
  398. To unmark a buffer marked for deletion, select it with LEFT."
  399.   (save-window-excursion
  400.     (list-buffers)            ; Initialize *Buffer List*
  401.     (set-buffer "*Buffer List*")
  402.     (local-set-mouse '(text shift left) 'mouse-buffer-bury)
  403.     (local-set-mouse '(text left) 'mouse-buffer-select)        
  404.     (local-set-mouse '(text right) 'mouse-buffer-delete)
  405.     (local-set-mouse '(text shift right) 'mouse-buffer-execute)
  406.     )
  407.   )
  408.  
  409.  
  410. ;;;*******************************************************************
  411. ;;;
  412. ;;;           Global Mouse Bindings.
  413. ;;;
  414. ;;; There is some sense to this mouse binding madness:
  415. ;;; LEFT and RIGHT scrolls are inverses.
  416. ;;; SHIFT makes an opposite meaning in the scroll bar.
  417. ;;; META makes the scrollbar functions work in the text region.
  418. ;;; RIGHT operates the mark
  419. ;;; LEFT operates at point
  420.  
  421. ;;; META commands are generally non-destructive,
  422. ;;; SHIFT is a little more dangerous.
  423. ;;; CONTROL is for the really complicated ones.
  424.  
  425. ;;; CONTROL-META-SHIFT-RIGHT gives help on that region.
  426. ;;; (or so it would if I had time to implement it --jgm)
  427.  
  428. ;;;
  429. ;;; Text Region mousemap
  430. ;;;
  431. ;; The basics: Point, Mark, Menu, Sun-Select:
  432. (global-set-mouse '(text        left)    'mouse-drag-move-point)
  433. (global-set-mouse '(text     up left)    'mouse-drag-set-mark)
  434. (global-set-mouse '(text shift  left)    'mouse-exch-pt-and-mark)
  435.  
  436. (global-set-mouse '(text    right)    'mouse-set-mark-and-select)
  437.  
  438. ;; The Slymoblics multi-command for Save, Kill, Copy, Move:
  439. (global-set-mouse '(text shift    right)    'mouse-save/delete/yank)
  440.  
  441. ;; Save, Kill, Copy, Move Things:
  442. ;; control-left composes with control middle/right to produce copy/move
  443. (global-set-mouse '(text control right        )    'mouse-save-thing-there)
  444. ;(global-set-mouse '(text control right      )    'mouse-kill-thing-there)
  445. (global-set-mouse '(text control     left)    'mouse-yank-at-point)
  446.  
  447. ;(global-set-mouse '(text control middle    left)    'mouse-copy-thing)
  448. ;(global-set-mouse '(text control right    left)    'mouse-move-thing)
  449. ;(global-set-mouse '(text control right middle)    'mouse-mark-thing)
  450.  
  451. ;; The Universal mouse help command (press all buttons):
  452. ;(global-set-mouse '(text shift  control meta right)    'mouse-help-region)
  453.  
  454. ;;; Meta in Text Region is like meta version in scrollbar:
  455. (global-set-mouse '(text meta        left)    'mouse-line-to-top)
  456. (global-set-mouse '(text meta shift  left)    'mouse-line-to-bottom)
  457. ;(global-set-mouse '(text meta         middle)    'mouse-line-to-middle)
  458. ;(global-set-mouse '(text meta shift   middle)    'mouse-middle-to-line)
  459. ;(global-set-mouse '(text meta control middle)    'mouse-split-vertically)
  460. (global-set-mouse '(text meta        right)    'mouse-top-to-line)
  461. (global-set-mouse '(text meta shift  right)    'mouse-bottom-to-line)
  462.  
  463. ;; Miscellaneous:
  464. (global-set-mouse '(text meta control left)    'mouse-call-kbd-macro)
  465. (global-set-mouse '(text meta control right)    'mouse-undo)
  466.  
  467. ;;;
  468. ;;; Scrollbar mousemap.
  469. ;;; Are available in the Scrollbar Region, or with Meta Text (or Meta Scrollbar)
  470. ;;;
  471. (global-set-mouse '(scrollbar        left)    'mouse-line-to-top)
  472. (global-set-mouse '(scrollbar shift  left)    'mouse-line-to-bottom)
  473.  
  474. ;(global-set-mouse '(scrollbar         middle)    'mouse-line-to-middle)
  475. ;(global-set-mouse '(scrollbar shift   middle)    'mouse-middle-to-line)
  476. ;(global-set-mouse '(scrollbar control middle)    'mouse-split-vertically)
  477.  
  478. (global-set-mouse '(scrollbar        right)    'mouse-top-to-line)
  479. (global-set-mouse '(scrollbar shift  right)    'mouse-bottom-to-line)
  480.  
  481. (global-set-mouse '(scrollbar meta        left)        'mouse-line-to-top)
  482. (global-set-mouse '(scrollbar meta shift  left)        'mouse-line-to-bottom)
  483. ;(global-set-mouse '(scrollbar meta         middle)    'mouse-line-to-middle)
  484. ;(global-set-mouse '(scrollbar meta shift   middle)    'mouse-middle-to-line)
  485. ;(global-set-mouse '(scrollbar meta control middle)    'mouse-split-vertically)
  486. (global-set-mouse '(scrollbar meta        right)    'mouse-top-to-line)
  487. (global-set-mouse '(scrollbar meta shift  right)    'mouse-bottom-to-line)
  488.  
  489. ;; And the help menu:
  490. ;(global-set-mouse '(scrollbar shift  control meta right) 'mouse-help-region)
  491.  
  492. ;;;
  493. ;;; Modeline mousemap.
  494. ;;;
  495. ;;; Note: meta of any single button selects window.
  496.  
  497. (global-set-mouse '(modeline      left)    'mouse-scroll-up)
  498. (global-set-mouse '(modeline meta left)    'mouse-select-window)
  499.  
  500. ;(global-set-mouse '(modeline         middle)    'mouse-scroll-proportional)
  501. ;(global-set-mouse '(modeline meta    middle)    'mouse-select-window)
  502. ;(global-set-mouse '(modeline control middle)    'mouse-split-horizontally)
  503.  
  504. (global-set-mouse '(modeline      right)    'mouse-scroll-down)
  505. (global-set-mouse '(modeline meta right)    'mouse-select-window)
  506.  
  507. ;;; control-left selects this window, control-right deletes it.
  508. (global-set-mouse '(modeline control left)    'mouse-delete-other-windows)
  509. (global-set-mouse '(modeline control right)    'mouse-delete-window)
  510.  
  511. ;; in case of confusion, just select it:
  512. (global-set-mouse '(modeline control left right)'mouse-select-window)
  513.  
  514. ;; even without confusion (and without the keyboard) select it:
  515. (global-set-mouse '(modeline left right)    'mouse-select-window)
  516.  
  517. ;; And the help menu:
  518. ;(global-set-mouse '(modeline shift  control meta right)    'mouse-help-region)
  519.  
  520. ;;;
  521. ;;; Minibuffer Mousemap
  522. ;;; Demonstrating some variety:
  523. ;;;
  524. (global-set-mouse '(minibuffer left)        'mini-move-point)
  525. (global-set-mouse '(minibuffer right)    'mini-set-mark-and-select)
  526.  
  527. (global-set-mouse '(minibuffer shift   left) '(previous-complex-command 1))
  528. (global-set-mouse '(minibuffer control left) '(next-complex-command 1))
  529.  
  530. (global-set-mouse '(minibuffer shift   right) '(next-complex-command 1))
  531. (global-set-mouse '(minibuffer control right) '(previous-complex-command 1))
  532.  
  533. ;(global-set-mouse '(minibuffer shift  control meta right)  'mouse-help-region)
  534.