diff options
author | Tom Schutter <t.schutter@comcast.net> | 2012-09-20 02:45:15 (GMT) |
---|---|---|
committer | Eric NOULARD <eric.noulard@gmail.com> | 2012-09-21 04:28:24 (GMT) |
commit | 301e67e3baae5ee3471f34216c7839a517f2d32c (patch) | |
tree | 2b7232f65309ccfb35e3e4173f4d998ba26b80fc /Docs | |
parent | 6d1e4efd00862f57dd9434ddbf4d5d7c8cb1f24a (diff) | |
download | CMake-301e67e3baae5ee3471f34216c7839a517f2d32c.zip CMake-301e67e3baae5ee3471f34216c7839a517f2d32c.tar.gz CMake-301e67e3baae5ee3471f34216c7839a517f2d32c.tar.bz2 |
cmake-mode.el: add local keybindings
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
Diffstat (limited to 'Docs')
-rw-r--r-- | Docs/cmake-mode.el | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Docs/cmake-mode.el b/Docs/cmake-mode.el index 79d2319..6feed94 100644 --- a/Docs/cmake-mode.el +++ b/Docs/cmake-mode.el @@ -230,13 +230,26 @@ the indentation. Otherwise it retains the same position on the line" ;; (defvar cmake-tab-width 2) +;; +;; Keymap. +;; +(defvar cmake-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-ch" 'cmake-help-command) + (define-key map "\C-cl" 'cmake-help-list-commands) + (define-key map "\C-cu" 'unscreamify-cmake-buffer) + map) + "Keymap used in cmake-mode buffers.") + ;------------------------------------------------------------------------------ ;; ;; CMake mode startup function. ;; (defun cmake-mode () - "Major mode for editing CMake listfiles." + "Major mode for editing CMake listfiles. + +\\{cmake-mode-map}" (interactive) (kill-all-local-variables) (setq major-mode 'cmake-mode) @@ -263,6 +276,9 @@ the indentation. Otherwise it retains the same position on the line" (make-local-variable 'comment-start) (setq comment-start "#") + ; Setup keymap. + (use-local-map cmake-mode-map) + ; Run user hooks. (run-hooks 'cmake-mode-hook)) |