Mercurial > emacs
comparison lisp/bindings.el @ 91056:1251cabc40b7
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 890-898)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 122-128)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 257-258)
- Merge from emacs--rel--22
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-270
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 19 Oct 2007 00:00:21 +0000 |
parents | 14c4a6aac623 a8bff00271d4 |
children | 4b09bb044f38 |
comparison
equal
deleted
inserted
replaced
91055:46bc3a01b2fa | 91056:1251cabc40b7 |
---|---|
287 map) "\ | 287 map) "\ |
288 Keymap to display on major mode.") | 288 Keymap to display on major mode.") |
289 | 289 |
290 (defvar mode-line-minor-mode-keymap | 290 (defvar mode-line-minor-mode-keymap |
291 (let ((map (make-sparse-keymap))) | 291 (let ((map (make-sparse-keymap))) |
292 (define-key map [mode-line down-mouse-1] 'mouse-minor-mode-menu) | |
292 (define-key map [mode-line mouse-2] 'mode-line-minor-mode-help) | 293 (define-key map [mode-line mouse-2] 'mode-line-minor-mode-help) |
293 (define-key map [mode-line down-mouse-3] 'mode-line-mode-menu-1) | 294 (define-key map [mode-line down-mouse-3] 'mode-line-mode-menu-1) |
294 (define-key map [header-line down-mouse-3] 'mode-line-mode-menu-1) | 295 (define-key map [header-line down-mouse-3] 'mode-line-mode-menu-1) |
295 map) "\ | 296 map) "\ |
296 Keymap to display on minor modes.") | 297 Keymap to display on minor modes.") |
329 mouse-face mode-line-highlight | 330 mouse-face mode-line-highlight |
330 local-map ,mode-line-major-mode-keymap) | 331 local-map ,mode-line-major-mode-keymap) |
331 '("" mode-line-process) | 332 '("" mode-line-process) |
332 `(:propertize ("" minor-mode-alist) | 333 `(:propertize ("" minor-mode-alist) |
333 mouse-face mode-line-highlight | 334 mouse-face mode-line-highlight |
334 help-echo "mouse-2: minor mode help, mouse-3: toggle minor modes" | 335 help-echo "mouse-1: minor mode, mouse-2: minor mode help, mouse-3: toggle minor modes" |
335 local-map ,mode-line-minor-mode-keymap) | 336 local-map ,mode-line-minor-mode-keymap) |
336 (propertize "%n" 'help-echo "mouse-2: widen" | 337 (propertize "%n" 'help-echo "mouse-2: widen" |
337 'mouse-face 'mode-line-highlight | 338 'mouse-face 'mode-line-highlight |
338 'local-map (make-mode-line-mouse-map | 339 'local-map (make-mode-line-mouse-map |
339 'mouse-2 #'mode-line-widen)) | 340 'mouse-2 #'mode-line-widen)) |
490 | 491 |
491 (defun mode-line-mode-menu (event) | 492 (defun mode-line-mode-menu (event) |
492 (interactive "@e") | 493 (interactive "@e") |
493 (x-popup-menu event mode-line-mode-menu)) | 494 (x-popup-menu event mode-line-mode-menu)) |
494 | 495 |
496 (defun mouse-minor-mode-menu (event) | |
497 "Show minor-mode menu for EVENT on minor modes area of the mode line." | |
498 (interactive "@e") | |
499 (let ((indicator (car (nth 4 (car (cdr event)))))) | |
500 (minor-mode-menu-from-indicator indicator))) | |
501 | |
502 (defun minor-mode-menu-from-indicator (indicator) | |
503 "Show menu, if any, for minor mode specified by INDICATOR. | |
504 Interactively, INDICATOR is read using completion." | |
505 (interactive (list (completing-read "Minor mode indicator: " | |
506 (describe-minor-mode-completion-table-for-indicator)))) | |
507 (let ((minor-mode (lookup-minor-mode-from-indicator indicator))) | |
508 (if minor-mode | |
509 (let* ((map (cdr-safe (assq minor-mode minor-mode-map-alist))) | |
510 (menu (and (keymapp map) (lookup-key map [menu-bar])))) | |
511 (if menu | |
512 (popup-menu menu) | |
513 (message "No menu for minor mode `%s'" minor-mode))) | |
514 (error "Cannot find minor mode for `%s'" indicator)))) | |
515 | |
495 (defun mode-line-minor-mode-help (event) | 516 (defun mode-line-minor-mode-help (event) |
496 "Describe minor mode for EVENT occurred on minor modes area of the mode line." | 517 "Describe minor mode for EVENT on minor modes area of the mode line." |
497 (interactive "@e") | 518 (interactive "@e") |
498 (let ((indicator (car (nth 4 (car (cdr event)))))) | 519 (let ((indicator (car (nth 4 (car (cdr event)))))) |
499 (describe-minor-mode-from-indicator indicator))) | 520 (describe-minor-mode-from-indicator indicator))) |
500 | 521 |
501 (defvar minor-mode-alist nil "\ | 522 (defvar minor-mode-alist nil "\ |
534 '(".o" "~" ".bin" ".lbin" ".so" | 555 '(".o" "~" ".bin" ".lbin" ".so" |
535 ".a" ".ln" ".blg" ".bbl"))) | 556 ".a" ".ln" ".blg" ".bbl"))) |
536 '(".elc" ".lof" | 557 '(".elc" ".lof" |
537 ".glo" ".idx" ".lot" | 558 ".glo" ".idx" ".lot" |
538 ;; TeX-related | 559 ;; TeX-related |
539 ".dvi" ".fmt" ".tfm" ".pdf" | 560 ".fmt" ".tfm" |
540 ;; Java compiled | 561 ;; Java compiled |
541 ".class" | 562 ".class" |
542 ;; CLISP | 563 ;; CLISP |
543 ".fas" ".lib" ".mem" | 564 ".fas" ".lib" ".mem" |
544 ;; CMUCL | 565 ;; CMUCL |
1033 (define-key ctl-x-map "ro" 'open-rectangle) | 1054 (define-key ctl-x-map "ro" 'open-rectangle) |
1034 (define-key ctl-x-map "rt" 'string-rectangle) | 1055 (define-key ctl-x-map "rt" 'string-rectangle) |
1035 (define-key ctl-x-map "rw" 'window-configuration-to-register) | 1056 (define-key ctl-x-map "rw" 'window-configuration-to-register) |
1036 (define-key ctl-x-map "rf" 'frame-configuration-to-register) | 1057 (define-key ctl-x-map "rf" 'frame-configuration-to-register) |
1037 | 1058 |
1038 (define-key esc-map "q" 'fill-paragraph-or-region) | 1059 (define-key esc-map "q" 'fill-paragraph) |
1039 (define-key ctl-x-map "." 'set-fill-prefix) | 1060 (define-key ctl-x-map "." 'set-fill-prefix) |
1040 | 1061 |
1041 (define-key esc-map "{" 'backward-paragraph) | 1062 (define-key esc-map "{" 'backward-paragraph) |
1042 (define-key esc-map "}" 'forward-paragraph) | 1063 (define-key esc-map "}" 'forward-paragraph) |
1043 (define-key esc-map "h" 'mark-paragraph) | 1064 (define-key esc-map "h" 'mark-paragraph) |