diff options
| author | Richard M. Stallman | 1994-02-25 19:35:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-02-25 19:35:58 +0000 |
| commit | 3c2dd2c035419d709c6ee0d174acddca77661581 (patch) | |
| tree | a85b1f56415c270aa533472c630c498a3de34d93 | |
| parent | 47d531753817dc218c69420e826b4b63b3762289 (diff) | |
| download | emacs-3c2dd2c035419d709c6ee0d174acddca77661581.tar.gz emacs-3c2dd2c035419d709c6ee0d174acddca77661581.zip | |
(help-menu-map): Variable deleted, and its binding.
(mouse-select-window): New command, now on mode-line mouse-1.
(mouse-delete-other-windows): Now on mode-line mouse-2.
(mouse-split-window-horizontally): Now on mode-line C-mouse-2.
| -rw-r--r-- | lisp/mouse.el | 77 |
1 files changed, 15 insertions, 62 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index c3f69340c85..29f866019b2 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -45,6 +45,18 @@ This must be bound to a mouse click." | |||
| 45 | (interactive "e") | 45 | (interactive "e") |
| 46 | (delete-window (posn-window (event-start click)))) | 46 | (delete-window (posn-window (event-start click)))) |
| 47 | 47 | ||
| 48 | (defun mouse-select-window (click) | ||
| 49 | "Select the window clicked on; don't move point." | ||
| 50 | (interactive "e") | ||
| 51 | (let ((oframe (selected-frame)) | ||
| 52 | (frame (window-frame (posn-window (event-start click))))) | ||
| 53 | (select-window (posn-window (event-start click))) | ||
| 54 | (raise-frame frame) | ||
| 55 | (select-frame frame) | ||
| 56 | (or (eq frame oframe) | ||
| 57 | (set-mouse-position (selected-frame) (1- (frame-width)) 0)) | ||
| 58 | (unfocus-frame))) | ||
| 59 | |||
| 48 | (defun mouse-tear-off-window (click) | 60 | (defun mouse-tear-off-window (click) |
| 49 | "Delete the window clicked on, and create a new frame displaying its buffer." | 61 | "Delete the window clicked on, and create a new frame displaying its buffer." |
| 50 | (interactive "e") | 62 | (interactive "e") |
| @@ -1331,69 +1343,10 @@ and selects that window." | |||
| 1331 | ;; Replaced with dragging mouse-1 | 1343 | ;; Replaced with dragging mouse-1 |
| 1332 | ;; (global-set-key [S-mouse-1] 'mouse-set-mark) | 1344 | ;; (global-set-key [S-mouse-1] 'mouse-set-mark) |
| 1333 | 1345 | ||
| 1334 | (global-set-key [mode-line mouse-1] 'mouse-delete-other-windows) | 1346 | (global-set-key [mode-line mouse-1] 'mouse-select-window) |
| 1347 | (global-set-key [mode-line mouse-2] 'mouse-delete-other-windows) | ||
| 1335 | (global-set-key [mode-line mouse-3] 'mouse-delete-window) | 1348 | (global-set-key [mode-line mouse-3] 'mouse-delete-window) |
| 1336 | (global-set-key [mode-line S-mouse-2] 'mouse-split-window-horizontally) | 1349 | (global-set-key [mode-line C-mouse-2] 'mouse-split-window-horizontally) |
| 1337 | |||
| 1338 | ;; Define the mouse help menu tree. | ||
| 1339 | |||
| 1340 | (defvar help-menu-map '(keymap "Help")) | ||
| 1341 | (global-set-key [C-down-mouse-2] help-menu-map) | ||
| 1342 | |||
| 1343 | (defvar help-apropos-map (make-sparse-keymap "Is there a command that...")) | ||
| 1344 | (defvar help-keys-map (make-sparse-keymap "Key Commands <==> Functions")) | ||
| 1345 | (defvar help-manual-map (make-sparse-keymap "Manual and tutorial")) | ||
| 1346 | (defvar help-misc-map (make-sparse-keymap "Odds and ends")) | ||
| 1347 | (defvar help-modes-map (make-sparse-keymap "Modes")) | ||
| 1348 | (defvar help-admin-map (make-sparse-keymap "Administrivia")) | ||
| 1349 | |||
| 1350 | (define-key help-menu-map [apropos] | ||
| 1351 | (cons "@Is there a command that..." help-apropos-map)) | ||
| 1352 | (define-key help-menu-map [keys] | ||
| 1353 | (cons "@Key Commands <==> Functions" help-keys-map)) | ||
| 1354 | (define-key help-menu-map [manuals] | ||
| 1355 | (cons "@Manual and tutorial" help-manual-map)) | ||
| 1356 | (define-key help-menu-map [misc] | ||
| 1357 | (cons "@Odds and ends" help-misc-map)) | ||
| 1358 | (define-key help-menu-map [modes] | ||
| 1359 | (cons "@Modes" help-modes-map)) | ||
| 1360 | (define-key help-menu-map [admin] | ||
| 1361 | (cons "@Administrivia" help-admin-map)) | ||
| 1362 | |||
| 1363 | (define-key help-apropos-map "c" '("Command Apropos" . command-apropos)) | ||
| 1364 | (define-key help-apropos-map "a" '("Apropos" . apropos)) | ||
| 1365 | |||
| 1366 | (define-key help-keys-map "b" | ||
| 1367 | '("List all keystroke commands" . describe-bindings)) | ||
| 1368 | (define-key help-keys-map "c" | ||
| 1369 | '("Describe key briefly" . describe-key-briefly)) | ||
| 1370 | (define-key help-keys-map "k" | ||
| 1371 | '("Describe key verbose" . describe-key)) | ||
| 1372 | (define-key help-keys-map "f" | ||
| 1373 | '("Describe Lisp function" . describe-function)) | ||
| 1374 | (define-key help-keys-map "w" | ||
| 1375 | '("Where is this command" . where-is)) | ||
| 1376 | |||
| 1377 | (define-key help-manual-map "i" '("Info system" . info)) | ||
| 1378 | (define-key help-manual-map "t" | ||
| 1379 | '("Invoke Emacs tutorial" . help-with-tutorial)) | ||
| 1380 | |||
| 1381 | (define-key help-misc-map "l" '("Last 100 Keystrokes" . view-lossage)) | ||
| 1382 | (define-key help-misc-map "s" '("Describe syntax table" . describe-syntax)) | ||
| 1383 | |||
| 1384 | (define-key help-modes-map "m" | ||
| 1385 | '("Describe current major mode" . describe-mode)) | ||
| 1386 | (define-key help-modes-map "b" | ||
| 1387 | '("List all keystroke commands" . describe-bindings)) | ||
| 1388 | |||
| 1389 | (define-key help-admin-map "n" | ||
| 1390 | '("View Emacs news" . view-emacs-news)) | ||
| 1391 | (define-key help-admin-map "l" | ||
| 1392 | '("View Emacs copying conditions" . describe-copying)) | ||
| 1393 | (define-key help-admin-map "d" | ||
| 1394 | '("Describe distribution" . describe-distribution)) | ||
| 1395 | (define-key help-admin-map "w" | ||
| 1396 | '("Describe (non)warranty" . describe-no-warranty)) | ||
| 1397 | 1350 | ||
| 1398 | (provide 'mouse) | 1351 | (provide 'mouse) |
| 1399 | 1352 | ||