Mercurial > emacs
annotate lisp/mouse.el @ 1203:bc1acd76b294
* sysdep.c (sys_suspend): Don't try to use "nice (- nice (0))" to
set the subshell's priority to normal; nice doesn't return a
defined value on all systems. Instead, since emacs_priority gives
the priority that Emacs was nastied to, we can use it to reset the
priority in a straightforward way.
[BSD4_1], [USG], [VMS] (setpriority): Remove dummy and
compatibility definitions of setpriority.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 23 Sep 1992 03:51:13 +0000 |
parents | 0ffcf74fb8ad |
children | 467833df795b |
rev | line source |
---|---|
659
505130d1ddf8
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
584
diff
changeset
|
1 ;;; mouse.el --- window system-independent mouse support. |
791
203c23c9f22c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
758
diff
changeset
|
2 |
840
113281b361ec
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
791
diff
changeset
|
3 ;;; Copyright (C) 1988, 1992 Free Software Foundation, Inc. |
113281b361ec
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
791
diff
changeset
|
4 |
791
203c23c9f22c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
758
diff
changeset
|
5 ;; Maintainer: FSF |
203c23c9f22c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
758
diff
changeset
|
6 ;; Keywords: hardware |
203c23c9f22c
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
758
diff
changeset
|
7 |
465 | 8 ;;; This file is part of GNU Emacs. |
66 | 9 |
465 | 10 ;;; GNU Emacs is free software; you can redistribute it and/or modify |
11 ;;; it under the terms of the GNU General Public License as published by | |
705 | 12 ;;; the Free Software Foundation; either version 2, or (at your option) |
465 | 13 ;;; any later version. |
66 | 14 |
465 | 15 ;;; GNU Emacs is distributed in the hope that it will be useful, |
16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;;; GNU General Public License for more details. | |
66 | 19 |
465 | 20 ;;; You should have received a copy of the GNU General Public License |
21 ;;; along with GNU Emacs; see the file COPYING. If not, write to | |
22 ;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
66 | 23 |
24 | |
465 | 25 ;;; Utility functions. |
26 | |
27 (defun mouse-movement-p (event) | |
28 (and (consp event) | |
29 (eq (car event) 'mouse-movement))) | |
30 | |
31 (defun event-window (event) (nth 1 event)) | |
32 (defun event-point (event) (nth 2 event)) | |
33 (defun mouse-coords (event) (nth 3 event)) | |
34 (defun mouse-timestamp (event) (nth 4 event)) | |
66 | 35 |
465 | 36 ;;; Indent track-mouse like progn. |
37 (put 'track-mouse 'lisp-indent-function 0) | |
66 | 38 |
465 | 39 |
40 (defun mouse-delete-window (click) | |
41 "Delete the window clicked on. | |
42 This must be bound to a mouse click." | |
1113 | 43 (interactive "e") |
465 | 44 (delete-window (event-window click))) |
45 | |
46 (defun mouse-delete-other-windows (click) | |
47 "Select Emacs window clicked on, then kill all other Emacs windows. | |
48 This must be bound to a mouse click." | |
1113 | 49 (interactive "e") |
465 | 50 (select-window (event-window click)) |
66 | 51 (delete-other-windows)) |
52 | |
465 | 53 (defun mouse-split-window-vertically (click) |
54 "Select Emacs window mouse is on, then split it vertically in half. | |
55 The window is split at the line clicked on. | |
56 This command must be bound to a mouse click." | |
1113 | 57 (interactive "e") |
465 | 58 (select-window (event-window click)) |
59 (split-window-vertically (1+ (cdr (mouse-coords click))))) | |
66 | 60 |
465 | 61 (defun mouse-set-point (click) |
62 "Move point to the position clicked on with the mouse. | |
63 This must be bound to a mouse click." | |
1113 | 64 (interactive "e") |
465 | 65 (select-window (event-window click)) |
1039 | 66 (if (numberp (event-point click)) |
67 (goto-char (event-point click)))) | |
66 | 68 |
465 | 69 (defun mouse-set-mark (click) |
70 "Set mark at the position clicked on with the mouse. | |
71 Display cursor at that position for a second. | |
72 This must be bound to a mouse click." | |
1113 | 73 (interactive "e") |
66 | 74 (let ((point-save (point))) |
75 (unwind-protect | |
465 | 76 (progn (mouse-set-point click) |
66 | 77 (push-mark nil t) |
191 | 78 (sit-for 1)) |
66 | 79 (goto-char point-save)))) |
80 | |
465 | 81 (defun mouse-kill (click) |
82 "Kill the region between point and the mouse click. | |
83 The text is saved in the kill ring, as with \\[kill-region]." | |
1113 | 84 (interactive "e") |
758 | 85 (let ((click-posn (event-point click))) |
1039 | 86 (if (numberp click-posn) |
87 (kill-region (min (point) click-posn) | |
88 (max (point) click-posn))))) | |
66 | 89 |
705 | 90 (defun mouse-yank-at-click (click arg) |
91 "Insert the last stretch of killed text at the position clicked on. | |
92 Prefix arguments are interpreted as with \\[yank]." | |
1113 | 93 (interactive "e\nP") |
705 | 94 (mouse-set-point click) |
95 (yank arg)) | |
96 | |
97 (defun mouse-kill-ring-save (click) | |
465 | 98 "Copy the region between point and the mouse click in the kill ring. |
99 This does not delete the region; it acts like \\[kill-ring-save]." | |
1113 | 100 (interactive "e") |
465 | 101 (mouse-set-mark click) |
705 | 102 (call-interactively 'kill-ring-save)) |
66 | 103 |
1056
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
104 (defun mouse-buffer-menu (event) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
105 "Pop up a menu of buffers for selection with the mouse." |
1113 | 106 (interactive "e") |
1056
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
107 (let ((menu |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
108 (list "Buffer Menu" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
109 (cons "Select Buffer" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
110 (let ((tail (buffer-list)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
111 head) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
112 (while tail |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
113 (let ((elt (car tail))) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
114 (if (not (string-match "^ " |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
115 (buffer-name elt))) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
116 (setq head (cons |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
117 (cons |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
118 (format |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
119 "%14s %s" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
120 (buffer-name elt) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
121 (or (buffer-file-name elt) "")) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
122 elt) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
123 head)))) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
124 (setq tail (cdr tail))) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
125 (reverse head)))))) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
126 (switch-to-buffer (or (x-popup-menu event menu) (current-buffer))))) |
66 | 127 |
128 ;; Commands for the scroll bar. | |
129 | |
130 (defun mouse-scroll-down (nlines) | |
131 (interactive "@p") | |
132 (scroll-down nlines)) | |
133 | |
134 (defun mouse-scroll-up (nlines) | |
135 (interactive "@p") | |
136 (scroll-up nlines)) | |
137 | |
138 (defun mouse-scroll-down-full () | |
139 (interactive "@") | |
140 (scroll-down nil)) | |
141 | |
142 (defun mouse-scroll-up-full () | |
143 (interactive "@") | |
144 (scroll-up nil)) | |
145 | |
146 (defun mouse-scroll-move-cursor (nlines) | |
147 (interactive "@p") | |
148 (move-to-window-line nlines)) | |
149 | |
150 (defun mouse-scroll-absolute (event) | |
151 (interactive "@e") | |
152 (let* ((pos (car event)) | |
153 (position (car pos)) | |
154 (length (car (cdr pos)))) | |
155 (if (<= length 0) (setq length 1)) | |
156 (let* ((scale-factor (max 1 (/ length (/ 8000000 (buffer-size))))) | |
157 (newpos (* (/ (* (/ (buffer-size) scale-factor) | |
158 position) | |
159 length) | |
160 scale-factor))) | |
161 (goto-char newpos) | |
162 (recenter '(4))))) | |
163 | |
164 (defun mouse-scroll-left (ncolumns) | |
165 (interactive "@p") | |
166 (scroll-left ncolumns)) | |
167 | |
168 (defun mouse-scroll-right (ncolumns) | |
169 (interactive "@p") | |
170 (scroll-right ncolumns)) | |
171 | |
172 (defun mouse-scroll-left-full () | |
173 (interactive "@") | |
174 (scroll-left nil)) | |
175 | |
176 (defun mouse-scroll-right-full () | |
177 (interactive "@") | |
178 (scroll-right nil)) | |
179 | |
180 (defun mouse-scroll-move-cursor-horizontally (ncolumns) | |
181 (interactive "@p") | |
182 (move-to-column ncolumns)) | |
183 | |
184 (defun mouse-scroll-absolute-horizontally (event) | |
185 (interactive "@e") | |
186 (let* ((pos (car event)) | |
187 (position (car pos)) | |
188 (length (car (cdr pos)))) | |
189 (set-window-hscroll (selected-window) 33))) | |
190 | |
1060
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
191 (global-set-key [scroll-bar mouse-1] 'mouse-scroll-up) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
192 (global-set-key [scroll-bar mouse-2] 'mouse-scroll-absolute) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
193 (global-set-key [scroll-bar mouse-3] 'mouse-scroll-down) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
194 |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
195 (global-set-key [vertical-slider mouse-1] 'mouse-scroll-move-cursor) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
196 (global-set-key [vertical-slider mouse-2] 'mouse-scroll-move-cursor) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
197 (global-set-key [vertical-slider mouse-3] 'mouse-scroll-move-cursor) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
198 |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
199 (global-set-key [thumbup mouse-1] 'mouse-scroll-up-full) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
200 (global-set-key [thumbup mouse-2] 'mouse-scroll-up-full) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
201 (global-set-key [thumbup mouse-3] 'mouse-scroll-up-full) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
202 |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
203 (global-set-key [thumbdown mouse-1] 'mouse-scroll-down-full) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
204 (global-set-key [thumbdown mouse-2] 'mouse-scroll-down-full) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
205 (global-set-key [thumbdown mouse-3] 'mouse-scroll-down-full) |
66 | 206 |
1060
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
207 (global-set-key [horizontal-scroll-bar mouse-1] 'mouse-scroll-left) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
208 (global-set-key [horizontal-scroll-bar mouse-2] |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
209 'mouse-scroll-absolute-horizontally) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
210 (global-set-key [horizontal-scroll-bar mouse-3] 'mouse-scroll-right) |
66 | 211 |
1060
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
212 (global-set-key [horizontal-slider mouse-1] |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
213 'mouse-scroll-move-cursor-horizontally) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
214 (global-set-key [horizontal-slider mouse-2] |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
215 'mouse-scroll-move-cursor-horizontally) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
216 (global-set-key [horizontal-slider mouse-3] |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
217 'mouse-scroll-move-cursor-horizontally) |
66 | 218 |
1060
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
219 (global-set-key [thumbleft mouse-1] 'mouse-scroll-left-full) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
220 (global-set-key [thumbleft mouse-2] 'mouse-scroll-left-full) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
221 (global-set-key [thumbleft mouse-3] 'mouse-scroll-left-full) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
222 |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
223 (global-set-key [thumbright mouse-1] 'mouse-scroll-right-full) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
224 (global-set-key [thumbright mouse-2] 'mouse-scroll-right-full) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
225 (global-set-key [thumbright mouse-3] 'mouse-scroll-right-full) |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
226 |
303 | 227 ;;;; |
228 ;;;; Here are experimental things being tested. Mouse events | |
229 ;;;; are of the form: | |
230 ;;;; ((x y) window screen-part key-sequence timestamp) | |
66 | 231 ;; |
303 | 232 ;;;; |
233 ;;;; Dynamically track mouse coordinates | |
234 ;;;; | |
66 | 235 ;; |
303 | 236 ;;(defun track-mouse (event) |
237 ;; "Track the coordinates, absolute and relative, of the mouse." | |
238 ;; (interactive "@e") | |
239 ;; (while mouse-grabbed | |
240 ;; (let* ((pos (read-mouse-position (selected-screen))) | |
241 ;; (abs-x (car pos)) | |
242 ;; (abs-y (cdr pos)) | |
243 ;; (relative-coordinate (coordinates-in-window-p | |
244 ;; (list (car pos) (cdr pos)) | |
245 ;; (selected-window)))) | |
246 ;; (if (consp relative-coordinate) | |
247 ;; (message "mouse: [%d %d], (%d %d)" abs-x abs-y | |
248 ;; (car relative-coordinate) | |
249 ;; (car (cdr relative-coordinate))) | |
250 ;; (message "mouse: [%d %d]" abs-x abs-y))))) | |
66 | 251 |
252 ;; | |
253 ;; Dynamically put a box around the line indicated by point | |
254 ;; | |
758 | 255 ;; |
256 ;;(require 'backquote) | |
257 ;; | |
258 ;;(defun mouse-select-buffer-line (event) | |
259 ;; (interactive "@e") | |
260 ;; (let ((relative-coordinate | |
261 ;; (coordinates-in-window-p (car event) (selected-window))) | |
262 ;; (abs-y (car (cdr (car event))))) | |
263 ;; (if (consp relative-coordinate) | |
264 ;; (progn | |
265 ;; (save-excursion | |
266 ;; (move-to-window-line (car (cdr relative-coordinate))) | |
267 ;; (x-draw-rectangle | |
268 ;; (selected-screen) | |
269 ;; abs-y 0 | |
270 ;; (save-excursion | |
271 ;; (move-to-window-line (car (cdr relative-coordinate))) | |
272 ;; (end-of-line) | |
273 ;; (push-mark nil t) | |
274 ;; (beginning-of-line) | |
275 ;; (- (region-end) (region-beginning))) 1)) | |
276 ;; (sit-for 1) | |
277 ;; (x-erase-rectangle (selected-screen)))))) | |
278 ;; | |
279 ;;(defvar last-line-drawn nil) | |
280 ;;(defvar begin-delim "[^ \t]") | |
281 ;;(defvar end-delim "[^ \t]") | |
282 ;; | |
283 ;;(defun mouse-boxing (event) | |
284 ;; (interactive "@e") | |
285 ;; (save-excursion | |
286 ;; (let ((screen (selected-screen))) | |
287 ;; (while (= (x-mouse-events) 0) | |
288 ;; (let* ((pos (read-mouse-position screen)) | |
289 ;; (abs-x (car pos)) | |
290 ;; (abs-y (cdr pos)) | |
291 ;; (relative-coordinate | |
292 ;; (coordinates-in-window-p (` ((, abs-x) (, abs-y))) | |
293 ;; (selected-window))) | |
294 ;; (begin-reg nil) | |
295 ;; (end-reg nil) | |
296 ;; (end-column nil) | |
297 ;; (begin-column nil)) | |
298 ;; (if (and (consp relative-coordinate) | |
299 ;; (or (not last-line-drawn) | |
300 ;; (not (= last-line-drawn abs-y)))) | |
301 ;; (progn | |
302 ;; (move-to-window-line (car (cdr relative-coordinate))) | |
303 ;; (if (= (following-char) 10) | |
304 ;; () | |
305 ;; (progn | |
306 ;; (setq begin-reg (1- (re-search-forward end-delim))) | |
307 ;; (setq begin-column (1- (current-column))) | |
308 ;; (end-of-line) | |
309 ;; (setq end-reg (1+ (re-search-backward begin-delim))) | |
310 ;; (setq end-column (1+ (current-column))) | |
311 ;; (message "%s" (buffer-substring begin-reg end-reg)) | |
312 ;; (x-draw-rectangle screen | |
313 ;; (setq last-line-drawn abs-y) | |
314 ;; begin-column | |
315 ;; (- end-column begin-column) 1)))))))))) | |
316 ;; | |
317 ;;(defun mouse-erase-box () | |
318 ;; (interactive) | |
319 ;; (if last-line-drawn | |
320 ;; (progn | |
321 ;; (x-erase-rectangle (selected-screen)) | |
322 ;; (setq last-line-drawn nil)))) | |
66 | 323 |
465 | 324 ;;; (defun test-x-rectangle () |
325 ;;; (use-local-mouse-map (setq rectangle-test-map (make-sparse-keymap))) | |
326 ;;; (define-key rectangle-test-map mouse-motion-button-left 'mouse-boxing) | |
327 ;;; (define-key rectangle-test-map mouse-button-left-up 'mouse-erase-box)) | |
66 | 328 |
329 ;; | |
330 ;; Here is how to do double clicking in lisp. About to change. | |
331 ;; | |
332 | |
333 (defvar double-start nil) | |
334 (defconst double-click-interval 300 | |
335 "Max ticks between clicks") | |
336 | |
337 (defun double-down (event) | |
338 (interactive "@e") | |
339 (if double-start | |
340 (let ((interval (- (nth 4 event) double-start))) | |
341 (if (< interval double-click-interval) | |
342 (progn | |
343 (backward-up-list 1) | |
344 ;; (message "Interval %d" interval) | |
345 (sleep-for 1))) | |
346 (setq double-start nil)) | |
347 (setq double-start (nth 4 event)))) | |
348 | |
349 (defun double-up (event) | |
350 (interactive "@e") | |
351 (and double-start | |
352 (> (- (nth 4 event ) double-start) double-click-interval) | |
353 (setq double-start nil))) | |
354 | |
465 | 355 ;;; (defun x-test-doubleclick () |
356 ;;; (use-local-mouse-map (setq doubleclick-test-map (make-sparse-keymap))) | |
357 ;;; (define-key doubleclick-test-map mouse-button-left 'double-down) | |
358 ;;; (define-key doubleclick-test-map mouse-button-left-up 'double-up)) | |
66 | 359 |
360 ;; | |
361 ;; This scrolls while button is depressed. Use preferable in scrollbar. | |
362 ;; | |
363 | |
364 (defvar scrolled-lines 0) | |
365 (defconst scroll-speed 1) | |
366 | |
367 (defun incr-scroll-down (event) | |
368 (interactive "@e") | |
369 (setq scrolled-lines 0) | |
370 (incremental-scroll scroll-speed)) | |
371 | |
372 (defun incr-scroll-up (event) | |
373 (interactive "@e") | |
374 (setq scrolled-lines 0) | |
375 (incremental-scroll (- scroll-speed))) | |
376 | |
377 (defun incremental-scroll (n) | |
378 (while (= (x-mouse-events) 0) | |
379 (setq scrolled-lines (1+ (* scroll-speed scrolled-lines))) | |
380 (scroll-down n) | |
381 (sit-for 300 t))) | |
382 | |
383 (defun incr-scroll-stop (event) | |
384 (interactive "@e") | |
385 (message "Scrolled %d lines" scrolled-lines) | |
386 (setq scrolled-lines 0) | |
387 (sleep-for 1)) | |
388 | |
465 | 389 ;;; (defun x-testing-scroll () |
390 ;;; (let ((scrolling-map (function mouse-vertical-scroll-bar-prefix))) | |
391 ;;; (define-key scrolling-map mouse-button-left 'incr-scroll-down) | |
392 ;;; (define-key scrolling-map mouse-button-right 'incr-scroll-up) | |
393 ;;; (define-key scrolling-map mouse-button-left-up 'incr-scroll-stop) | |
394 ;;; (define-key scrolling-map mouse-button-right-up 'incr-scroll-stop))) | |
66 | 395 |
396 ;; | |
397 ;; Some playthings suitable for picture mode? They need work. | |
398 ;; | |
399 | |
400 (defun mouse-kill-rectangle (event) | |
401 "Kill the rectangle between point and the mouse cursor." | |
402 (interactive "@e") | |
403 (let ((point-save (point))) | |
404 (save-excursion | |
405 (mouse-set-point event) | |
406 (push-mark nil t) | |
407 (if (> point-save (point)) | |
408 (kill-rectangle (point) point-save) | |
409 (kill-rectangle point-save (point)))))) | |
410 | |
411 (defun mouse-open-rectangle (event) | |
412 "Kill the rectangle between point and the mouse cursor." | |
413 (interactive "@e") | |
414 (let ((point-save (point))) | |
415 (save-excursion | |
416 (mouse-set-point event) | |
417 (push-mark nil t) | |
418 (if (> point-save (point)) | |
419 (open-rectangle (point) point-save) | |
420 (open-rectangle point-save (point)))))) | |
421 | |
422 ;; Must be a better way to do this. | |
423 | |
424 (defun mouse-multiple-insert (n char) | |
425 (while (> n 0) | |
426 (insert char) | |
427 (setq n (1- n)))) | |
428 | |
429 ;; What this could do is not finalize until button was released. | |
430 | |
431 (defun mouse-move-text (event) | |
432 "Move text from point to cursor position, inserting spaces." | |
433 (interactive "@e") | |
434 (let* ((relative-coordinate | |
435 (coordinates-in-window-p (car event) (selected-window)))) | |
436 (if (consp relative-coordinate) | |
437 (cond ((> (current-column) (car relative-coordinate)) | |
438 (delete-char | |
439 (- (car relative-coordinate) (current-column)))) | |
440 ((< (current-column) (car relative-coordinate)) | |
441 (mouse-multiple-insert | |
442 (- (car relative-coordinate) (current-column)) " ")) | |
443 ((= (current-column) (car relative-coordinate)) (ding)))))) | |
1100
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
444 |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
445 ;; Font selection. |
465 | 446 |
1100
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
447 (defvar x-fixed-font-alist |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
448 '("Font menu" |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
449 ("Misc" |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
450 ("fixed" "fixed") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
451 ("6x10" "6x10") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
452 ("6x12" "6x12") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
453 ("6x13" "6x13") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
454 ("7x13" "7x13") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
455 ("7x14" "7x14") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
456 ("8x13" "8x13") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
457 ("8x13 bold" "8x13bold") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
458 ("8x16" "8x16") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
459 ("9x15" "9x15") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
460 ("9x15 bold" "9x15bold") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
461 ("10x20" "10x20") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
462 ("11x18" "11x18") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
463 ("12x24" "12x24")) |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
464 ;;; We don't seem to have these; who knows what they are. |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
465 ;;; ("fg-18" "fg-18") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
466 ;;; ("fg-25" "fg-25") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
467 ;;; ("lucidasanstypewriter-12" "lucidasanstypewriter-12") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
468 ;;; ("lucidasanstypewriter-bold-14" "lucidasanstypewriter-bold-14") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
469 ;;; ("lucidasanstypewriter-bold-24" "lucidasanstypewriter-bold-24") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
470 ;;; ("lucidatypewriter-bold-r-24" "-b&h-lucidatypewriter-bold-r-normal-sans-24-240-75-75-m-140-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
471 ;;; ("fixed-medium-20" "-misc-fixed-medium-*-*-*-20-*-*-*-*-*-*-*") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
472 ("Courier" |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
473 ("8" "-adobe-courier-medium-r-normal--8-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
474 ("10" "-adobe-courier-medium-r-normal--10-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
475 ("12" "-adobe-courier-medium-r-normal--12-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
476 ("14" "-adobe-courier-medium-r-normal--14-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
477 ("18" "-adobe-courier-medium-r-normal--18-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
478 ("24" "-adobe-courier-medium-r-normal--24-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
479 ("8 bold" "-adobe-courier-bold-r-normal--8-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
480 ("10 bold" "-adobe-courier-bold-r-normal--10-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
481 ("12 bold" "-adobe-courier-bold-r-normal--12-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
482 ("14 bold" "-adobe-courier-bold-r-normal--14-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
483 ("18 bold" "-adobe-courier-bold-r-normal--18-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
484 ("24 bold" "-adobe-courier-bold-r-normal--24-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
485 ("8 slant" "-adobe-courier-medium-o-normal--8-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
486 ("10 slant" "-adobe-courier-medium-o-normal--10-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
487 ("12 slant" "-adobe-courier-medium-o-normal--12-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
488 ("14 slant" "-adobe-courier-medium-o-normal--14-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
489 ("18 slant" "-adobe-courier-medium-o-normal--18-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
490 ("24 slant" "-adobe-courier-medium-o-normal--24-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
491 ("8 bold slant" "-adobe-courier-bold-o-normal--8-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
492 ("10 bold slant" "-adobe-courier-bold-o-normal--10-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
493 ("12 bold slant" "-adobe-courier-bold-o-normal--12-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
494 ("14 bold slant" "-adobe-courier-bold-o-normal--14-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
495 ("18 bold slant" "-adobe-courier-bold-o-normal--18-*-*-*-m-*-iso8859-1") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
496 ("24 bold slant" "-adobe-courier-bold-o-normal--24-*-*-*-m-*-iso8859-1")) |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
497 ) |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
498 "X fonts suitable for use in Emacs.") |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
499 |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
500 (defun mouse-set-font (font) |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
501 "Select an emacs font from a list of known good fonts" |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
502 (interactive |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
503 (x-popup-menu last-nonmenu-event x-fixed-font-alist)) |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
504 (modify-frame-parameters (selected-frame) |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
505 (list (cons 'font font)))) |
465 | 506 |
507 ;;; Bindings for mouse commands. | |
508 | |
1060
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
509 ;; This won't be needed once the drag and down events |
1057
d9775f33488d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1056
diff
changeset
|
510 ;; are properly implemented. |
d9775f33488d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1056
diff
changeset
|
511 (global-set-key [mouse-1] 'mouse-set-point) |
d9775f33488d
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1056
diff
changeset
|
512 |
1056
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
513 (global-set-key [down-mouse-1] 'mouse-set-point) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
514 (global-set-key [drag-mouse-1] 'mouse-set-mark) |
705 | 515 (global-set-key [mouse-2] 'mouse-yank-at-click) |
516 (global-set-key [mouse-3] 'mouse-kill-ring-save) | |
1056
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
517 (global-set-key [S-mouse-3] 'mouse-kill) |
705 | 518 |
1056
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
519 (global-set-key [C-mouse-1] 'mouse-buffer-menu) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
520 |
1100
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
521 (global-set-key [C-mouse-3] 'mouse-set-font) |
5b3b202a84c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1064
diff
changeset
|
522 |
1056
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
523 ;; Replaced with dragging mouse-1 |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
524 ;; (global-set-key [S-mouse-1] 'mouse-set-mark) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
525 |
1060
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
526 ;; Define the mouse help menu tree. |
af78c65921c8
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1058
diff
changeset
|
527 |
1056
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
528 (defvar help-menu-map '(keymap "Help")) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
529 (global-set-key [C-mouse-2] help-menu-map) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
530 |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
531 (defvar help-apropos-map '(keymap "Is there a command that...")) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
532 (defvar help-keys-map '(keymap "Key Commands <==> Functions")) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
533 (defvar help-manual-map '(keymap "Manual and tutorial")) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
534 (defvar help-misc-map '(keymap "Odds and ends")) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
535 (defvar help-modes-map '(keymap "Modes")) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
536 (defvar help-admin-map '(keymap "Administrivia")) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
537 |
1058
19c6978ab218
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1057
diff
changeset
|
538 (define-key help-menu-map [apropos] |
1064
e699ce19609f
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1060
diff
changeset
|
539 (cons "@Is there a command that..." help-apropos-map)) |
1058
19c6978ab218
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1057
diff
changeset
|
540 (define-key help-menu-map [keys] |
1064
e699ce19609f
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1060
diff
changeset
|
541 (cons "@Key Commands <==> Functions" help-keys-map)) |
1058
19c6978ab218
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1057
diff
changeset
|
542 (define-key help-menu-map [manuals] |
1064
e699ce19609f
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1060
diff
changeset
|
543 (cons "@Manual and tutorial" help-manual-map)) |
1058
19c6978ab218
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1057
diff
changeset
|
544 (define-key help-menu-map [misc] |
1064
e699ce19609f
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1060
diff
changeset
|
545 (cons "@Odds and ends" help-misc-map)) |
1058
19c6978ab218
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1057
diff
changeset
|
546 (define-key help-menu-map [modes] |
1064
e699ce19609f
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1060
diff
changeset
|
547 (cons "@Modes" help-modes-map)) |
1058
19c6978ab218
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1057
diff
changeset
|
548 (define-key help-menu-map [admin] |
1064
e699ce19609f
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1060
diff
changeset
|
549 (cons "@Administrivia" help-admin-map)) |
1056
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
550 |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
551 (define-key help-apropos-map "c" '("Command Apropos" . command-apropos)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
552 (define-key help-apropos-map "a" '("Apropos" . apropos)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
553 |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
554 (define-key help-keys-map "b" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
555 '("List all keystroke commands" . describe-bindings)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
556 (define-key help-keys-map "c" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
557 '("Describe key briefly" . describe-key-briefly)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
558 (define-key help-keys-map "k" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
559 '("Describe key verbose" . describe-key)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
560 (define-key help-keys-map "f" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
561 '("Describe Lisp function" . describe-function)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
562 (define-key help-keys-map "w" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
563 '("Where is this command" . where-is)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
564 |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
565 (define-key help-manual-map "i" '("Info system" . info)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
566 (define-key help-manual-map "t" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
567 '("Invoke Emacs tutorial" . help-with-tutorial)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
568 |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
569 (define-key help-misc-map "l" '("Last 100 Keystrokes" . view-lossage)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
570 (define-key help-misc-map "s" '("Describe syntax table" . describe-syntax)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
571 |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
572 (define-key help-modes-map "m" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
573 '("Describe current major mode" . describe-mode)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
574 (define-key help-modes-map "b" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
575 '("List all keystroke commands" . describe-bindings)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
576 |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
577 (define-key help-admin-map "n" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
578 '("view Emacs news" . view-emacs-news)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
579 (define-key help-admin-map "l" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
580 '("View the GNU Emacs license" . describe-copying)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
581 (define-key help-admin-map "d" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
582 '("Describe distribution" . describe-distribution)) |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
583 (define-key help-admin-map "w" |
a7fc54083464
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
1039
diff
changeset
|
584 '("Describe (non)warranty" . describe-no-warranty)) |
584 | 585 |
586 (provide 'mouse) | |
587 | |
659
505130d1ddf8
*** empty log message ***
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
584
diff
changeset
|
588 ;;; mouse.el ends here |