diff options
| author | Stefan Monnier | 2008-05-23 20:31:12 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-05-23 20:31:12 +0000 |
| commit | a3507bd3c2cd362c0ffd7de5462e4cacf0cf9dc7 (patch) | |
| tree | d442467b6d5500630c671ae45a732e469f7f5e92 /lisp/textmodes | |
| parent | 9cc236e006e474dc83a90d0bb5bc5f6b99c9351e (diff) | |
| download | emacs-a3507bd3c2cd362c0ffd7de5462e4cacf0cf9dc7.tar.gz emacs-a3507bd3c2cd362c0ffd7de5462e4cacf0cf9dc7.zip | |
* textmodes/reftex-vars.el (reftex-extra-bindings-prefix): New var.
* textmodes/reftex.el (reftex-extra-bindings-map): New var.
(reftex-extra-bindings): Use it.
* progmodes/mixal-mode.el (mixal-mode-map): Move key-bindings
away from the user-reserved keys.
* progmodes/ada-mode.el (ada-mode-extra-map, ada-mode-extra-prefix): New vars.
(ada-create-keymap): Use them.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/reftex-vars.el | 11 | ||||
| -rw-r--r-- | lisp/textmodes/reftex.el | 25 |
2 files changed, 26 insertions, 10 deletions
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index ca9706a476b..5d575eb6e80 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el | |||
| @@ -1847,7 +1847,16 @@ symbol indicating in what context the hook is called." | |||
| 1847 | 1847 | ||
| 1848 | (defcustom reftex-extra-bindings nil | 1848 | (defcustom reftex-extra-bindings nil |
| 1849 | "Non-nil means, make additional key bindings on startup. | 1849 | "Non-nil means, make additional key bindings on startup. |
| 1850 | These extra bindings are located in the users `C-c letter' map." | 1850 | These extra bindings are located in the |
| 1851 | `reftex-extra-bindings-map' map, bound to | ||
| 1852 | `reftex-extra-bindings-prefix'." | ||
| 1853 | :group 'reftex-miscellaneous-configurations | ||
| 1854 | :type 'boolean) | ||
| 1855 | |||
| 1856 | ;; below, default is C-c C-y because it is free in LaTeX mode. | ||
| 1857 | (defcustom reftex-extra-bindings-prefix "\C-c\C-y" | ||
| 1858 | "When `reftex-extra-bindings' is set to non-nil, use extra | ||
| 1859 | bindings with this prefix bound to `reftex-extra-bindings-map'." | ||
| 1851 | :group 'reftex-miscellaneous-configurations | 1860 | :group 'reftex-miscellaneous-configurations |
| 1852 | :type 'boolean) | 1861 | :type 'boolean) |
| 1853 | 1862 | ||
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 47c25a15663..c391b55d109 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el | |||
| @@ -2406,16 +2406,23 @@ IGNORE-WORDS List of words which should be removed from the string." | |||
| 2406 | ;; Setting `reftex-extra-bindings' really is only there to spare users | 2406 | ;; Setting `reftex-extra-bindings' really is only there to spare users |
| 2407 | ;; the hassle of defining bindings in the user space themselves. This | 2407 | ;; the hassle of defining bindings in the user space themselves. This |
| 2408 | ;; is why they violate the key binding recommendations. | 2408 | ;; is why they violate the key binding recommendations. |
| 2409 | (defvar reftex-extra-bindings-map | ||
| 2410 | (let ((map (make-sparse-keymap))) | ||
| 2411 | (define-key map "t" 'reftex-toc) | ||
| 2412 | (define-key map "l" 'reftex-label) | ||
| 2413 | (define-key map "r" 'reftex-reference) | ||
| 2414 | (define-key map "c" 'reftex-citation) | ||
| 2415 | (define-key map "v" 'reftex-view-crossref) | ||
| 2416 | (define-key map "g" 'reftex-grep-document) | ||
| 2417 | (define-key map "s" 'reftex-search-document) | ||
| 2418 | map) | ||
| 2419 | "Reftex extra bindings map") | ||
| 2420 | |||
| 2409 | (when reftex-extra-bindings | 2421 | (when reftex-extra-bindings |
| 2410 | (loop for x in | 2422 | (define-key reftex-mode-map |
| 2411 | '(("\C-ct" . reftex-toc) | 2423 | reftex-extra-bindings-prefix |
| 2412 | ("\C-cl" . reftex-label) | 2424 | reftex-extra-bindings-map)) |
| 2413 | ("\C-cr" . reftex-reference) | 2425 | |
| 2414 | ("\C-cc" . reftex-citation) | ||
| 2415 | ("\C-cv" . reftex-view-crossref) | ||
| 2416 | ("\C-cg" . reftex-grep-document) | ||
| 2417 | ("\C-cs" . reftex-search-document)) | ||
| 2418 | do (define-key reftex-mode-map (car x) (cdr x)))) | ||
| 2419 | 2426 | ||
| 2420 | ;;; ========================================================================= | 2427 | ;;; ========================================================================= |
| 2421 | ;;; | 2428 | ;;; |