aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1992-08-31 05:06:54 +0000
committerRichard M. Stallman1992-08-31 05:06:54 +0000
commit8b34e79d82c83e47709504e9a00cef26971a8ad1 (patch)
treeb625ba6659a8c47e1a7925ad5104dc5b6003e399
parentac876a7913c7b01f02b8f7f6a3d7f9d4580b0c46 (diff)
downloademacs-8b34e79d82c83e47709504e9a00cef26971a8ad1.tar.gz
emacs-8b34e79d82c83e47709504e9a00cef26971a8ad1.zip
*** empty log message ***
-rw-r--r--lisp/mouse.el91
1 files changed, 88 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index ac93d577daf..837b8d9a0cf 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -101,7 +101,29 @@ This does not delete the region; it acts like \\[kill-ring-save]."
101 (mouse-set-mark click) 101 (mouse-set-mark click)
102 (call-interactively 'kill-ring-save)) 102 (call-interactively 'kill-ring-save))
103 103
104 104(defun mouse-buffer-menu (event)
105 "Pop up a menu of buffers for selection with the mouse."
106 (interactive "K")
107 (let ((menu
108 (list "Buffer Menu"
109 (cons "Select Buffer"
110 (let ((tail (buffer-list))
111 head)
112 (while tail
113 (let ((elt (car tail)))
114 (if (not (string-match "^ "
115 (buffer-name elt)))
116 (setq head (cons
117 (cons
118 (format
119 "%14s %s"
120 (buffer-name elt)
121 (or (buffer-file-name elt) ""))
122 elt)
123 head))))
124 (setq tail (cdr tail)))
125 (reverse head))))))
126 (switch-to-buffer (or (x-popup-menu event menu) (current-buffer)))))
105 127
106;; Commands for the scroll bar. 128;; Commands for the scroll bar.
107 129
@@ -462,11 +484,74 @@ This does not delete the region; it acts like \\[kill-ring-save]."
462 484
463;;; Bindings for mouse commands. 485;;; Bindings for mouse commands.
464 486
465(global-set-key [mouse-1] 'mouse-set-point) 487(global-set-key [down-mouse-1] 'mouse-set-point)
488(global-set-key [drag-mouse-1] 'mouse-set-mark)
466(global-set-key [mouse-2] 'mouse-yank-at-click) 489(global-set-key [mouse-2] 'mouse-yank-at-click)
467(global-set-key [mouse-3] 'mouse-kill-ring-save) 490(global-set-key [mouse-3] 'mouse-kill-ring-save)
491(global-set-key [S-mouse-3] 'mouse-kill)
468 492
469(global-set-key [S-mouse-1] 'mouse-set-mark) 493(global-set-key [C-mouse-1] 'mouse-buffer-menu)
494
495;; Replaced with dragging mouse-1
496;; (global-set-key [S-mouse-1] 'mouse-set-mark)
497
498(defvar help-menu-map '(keymap "Help"))
499(global-set-key [C-mouse-2] help-menu-map)
500
501(defvar help-apropos-map '(keymap "Is there a command that..."))
502(defvar help-keys-map '(keymap "Key Commands <==> Functions"))
503(defvar help-manual-map '(keymap "Manual and tutorial"))
504(defvar help-misc-map '(keymap "Odds and ends"))
505(defvar help-modes-map '(keymap "Modes"))
506(defvar help-admin-map '(keymap "Administrivia"))
507
508(define-key help-menu-map "a"
509 (cons "Is there a command that..." help-apropos-map))
510(define-key help-menu-map "k"
511 (cons "Key Commands <==> Functions" help-keys-map))
512(define-key help-menu-map "m"
513 (cons "Manual and tutorial" help-manual-map))
514(define-key help-menu-map "x"
515 (cons "Odds and ends" help-misc-map))
516(define-key help-menu-map "M"
517 (cons "Modes" help-modes-map))
518(define-key help-menu-map "z"
519 (cons "Administrivia" help-admin-map))
520
521(define-key help-apropos-map "c" '("Command Apropos" . command-apropos))
522(define-key help-apropos-map "a" '("Apropos" . apropos))
523
524(define-key help-keys-map "b"
525 '("List all keystroke commands" . describe-bindings))
526(define-key help-keys-map "c"
527 '("Describe key briefly" . describe-key-briefly))
528(define-key help-keys-map "k"
529 '("Describe key verbose" . describe-key))
530(define-key help-keys-map "f"
531 '("Describe Lisp function" . describe-function))
532(define-key help-keys-map "w"
533 '("Where is this command" . where-is))
534
535(define-key help-manual-map "i" '("Info system" . info))
536(define-key help-manual-map "t"
537 '("Invoke Emacs tutorial" . help-with-tutorial))
538
539(define-key help-misc-map "l" '("Last 100 Keystrokes" . view-lossage))
540(define-key help-misc-map "s" '("Describe syntax table" . describe-syntax))
541
542(define-key help-modes-map "m"
543 '("Describe current major mode" . describe-mode))
544(define-key help-modes-map "b"
545 '("List all keystroke commands" . describe-bindings))
546
547(define-key help-admin-map "n"
548 '("view Emacs news" . view-emacs-news))
549(define-key help-admin-map "l"
550 '("View the GNU Emacs license" . describe-copying))
551(define-key help-admin-map "d"
552 '("Describe distribution" . describe-distribution))
553(define-key help-admin-map "w"
554 '("Describe (non)warranty" . describe-no-warranty))
470 555
471(provide 'mouse) 556(provide 'mouse)
472 557