diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-05-23 20:31:12 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-05-23 20:31:12 +0000 |
commit | a3507bd3c2cd362c0ffd7de5462e4cacf0cf9dc7 (patch) | |
tree | d442467b6d5500630c671ae45a732e469f7f5e92 /lisp/progmodes/ada-mode.el | |
parent | 9cc236e006e474dc83a90d0bb5bc5f6b99c9351e (diff) | |
download | emacs-a3507bd3c2cd362c0ffd7de5462e4cacf0cf9dc7.tar.gz |
* 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/progmodes/ada-mode.el')
-rw-r--r-- | lisp/progmodes/ada-mode.el | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index b4621d4af2c..663f13965d1 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -448,6 +448,13 @@ The extensions should include a `.' if needed.") (defvar ada-mode-map (make-sparse-keymap) "Local keymap used for Ada mode.") +(defvar ada-mode-extra-map (make-sparse-keymap) + "Keymap used for non-standard keybindings.") + +;; default is C-c C-q because it's free in ada-mode-map +(defvar ada-mode-extra-prefix "\C-c\C-q" + "Prefix key to access `ada-mode-extra-map' functions.") + (defvar ada-mode-abbrev-table nil "Local abbrev table for Ada mode.") @@ -4537,6 +4544,9 @@ Moves to 'begin' if in a declarative part." (defun ada-create-keymap () "Create the keymap associated with the Ada mode." + ;; All non-standard keys go into ada-mode-extra-map + (define-key ada-mode-map ada-mode-extra-prefix ada-mode-extra-map) + ;; Indentation and Formatting (define-key ada-mode-map "\C-j" 'ada-indent-newline-indent-conditional) (define-key ada-mode-map "\C-m" 'ada-indent-newline-indent-conditional) @@ -4585,23 +4595,23 @@ Moves to 'begin' if in a declarative part." 'ada-point-and-xref) (define-key ada-mode-map [(control tab)] 'ada-complete-identifier) - (define-key ada-mode-map "\C-co" 'ff-find-other-file) + (define-key ada-mode-extra-map "o" 'ff-find-other-file) (define-key ada-mode-map "\C-c5\C-d" 'ada-goto-declaration-other-frame) (define-key ada-mode-map "\C-c\C-d" 'ada-goto-declaration) (define-key ada-mode-map "\C-c\C-s" 'ada-xref-goto-previous-reference) (define-key ada-mode-map "\C-c\C-c" 'ada-compile-application) - (define-key ada-mode-map "\C-cc" 'ada-change-prj) - (define-key ada-mode-map "\C-cd" 'ada-set-default-project-file) - (define-key ada-mode-map "\C-cg" 'ada-gdb-application) + (define-key ada-mode-extra-map "c" 'ada-change-prj) + (define-key ada-mode-extra-map "d" 'ada-set-default-project-file) + (define-key ada-mode-extra-map "g" 'ada-gdb-application) (define-key ada-mode-map "\C-c\C-m" 'ada-set-main-compile-application) - (define-key ada-mode-map "\C-cr" 'ada-run-application) + (define-key ada-mode-extra-map "r" 'ada-run-application) (define-key ada-mode-map "\C-c\C-o" 'ada-goto-parent) (define-key ada-mode-map "\C-c\C-r" 'ada-find-references) - (define-key ada-mode-map "\C-cl" 'ada-find-local-references) + (define-key ada-mode-extra-map "l" 'ada-find-local-references) (define-key ada-mode-map "\C-c\C-v" 'ada-check-current) - (define-key ada-mode-map "\C-cf" 'ada-find-file) + (define-key ada-mode-extra-map "f" 'ada-find-file) - (define-key ada-mode-map "\C-cu" 'ada-prj-edit) + (define-key ada-mode-extra-map "u" 'ada-prj-edit) ;; The templates, defined in ada-stmt.el @@ -4634,7 +4644,7 @@ Moves to 'begin' if in a declarative part." (define-key map "w" 'ada-while-loop) (define-key map "\C-x" 'ada-exception) (define-key map "x" 'ada-exit) - (define-key ada-mode-map "\C-ct" map)) + (define-key ada-mode-extra-map "t" map)) ) |