Commit e341a817 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(vera-mode-map): Move initialization into declaration.

parent ceb19436
......@@ -2,6 +2,7 @@
* progmodes/vera-mode.el (vera-re-search-forward)
(vera-re-search-backward): Remove use of store-match-data.
(vera-mode-map): Move initialization into declaration.
* progmodes/flymake.el (flymake-buildfile-dirs): Remove.
(flymake-find-buildfile): Use locate-dominating-file.
......
......@@ -48,7 +48,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Documentation
;; See comment string of function `vera-mode' or type `C-c C-h' in Emacs.
;; See comment string of function `vera-mode' or type `C-h m' in Emacs.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Installation
......@@ -122,37 +122,37 @@ If nil, TAB always indents current line."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Key bindings
(defvar vera-mode-map ()
(defvar vera-mode-map
(let ((map (make-sparse-keymap)))
;; Backspace/delete key bindings.
(define-key map [backspace] 'backward-delete-char-untabify)
(unless (boundp 'delete-key-deletes-forward) ; XEmacs variable
(define-key map [delete] 'delete-char)
(define-key map [(meta delete)] 'kill-word))
;; Standard key bindings.
(define-key map "\M-e" 'vera-forward-statement)
(define-key map "\M-a" 'vera-backward-statement)
(define-key map "\M-\C-e" 'vera-forward-same-indent)
(define-key map "\M-\C-a" 'vera-backward-same-indent)
;; Mode specific key bindings.
(define-key map "\C-c\t" 'indent-according-to-mode)
(define-key map "\M-\C-\\" 'vera-indent-region)
(define-key map "\C-c\C-c" 'vera-comment-uncomment-region)
(define-key map "\C-c\C-f" 'vera-fontify-buffer)
(define-key map "\C-c\C-v" 'vera-version)
(define-key map "\M-\t" 'tab-to-tab-stop)
;; Electric key bindings.
(define-key map "\t" 'vera-electric-tab)
(define-key map "\r" 'vera-electric-return)
(define-key map " " 'vera-electric-space)
(define-key map "{" 'vera-electric-opening-brace)
(define-key map "}" 'vera-electric-closing-brace)
(define-key map "#" 'vera-electric-pound)
(define-key map "*" 'vera-electric-star)
(define-key map "/" 'vera-electric-slash)
map)
"Keymap for Vera Mode.")
(setq vera-mode-map (make-sparse-keymap))
;; backspace/delete key bindings
(define-key vera-mode-map [backspace] 'backward-delete-char-untabify)
(unless (boundp 'delete-key-deletes-forward) ; XEmacs variable
(define-key vera-mode-map [delete] 'delete-char)
(define-key vera-mode-map [(meta delete)] 'kill-word))
;; standard key bindings
(define-key vera-mode-map "\M-e" 'vera-forward-statement)
(define-key vera-mode-map "\M-a" 'vera-backward-statement)
(define-key vera-mode-map "\M-\C-e" 'vera-forward-same-indent)
(define-key vera-mode-map "\M-\C-a" 'vera-backward-same-indent)
;; mode specific key bindings
(define-key vera-mode-map "\C-c\t" 'indent-according-to-mode)
(define-key vera-mode-map "\M-\C-\\" 'vera-indent-region)
(define-key vera-mode-map "\C-c\C-c" 'vera-comment-uncomment-region)
(define-key vera-mode-map "\C-c\C-f" 'vera-fontify-buffer)
(define-key vera-mode-map "\C-c\C-v" 'vera-version)
(define-key vera-mode-map "\M-\t" 'tab-to-tab-stop)
;; electric key bindings
(define-key vera-mode-map "\t" 'vera-electric-tab)
(define-key vera-mode-map "\r" 'vera-electric-return)
(define-key vera-mode-map " " 'vera-electric-space)
(define-key vera-mode-map "{" 'vera-electric-opening-brace)
(define-key vera-mode-map "}" 'vera-electric-closing-brace)
(define-key vera-mode-map "#" 'vera-electric-pound)
(define-key vera-mode-map "*" 'vera-electric-star)
(define-key vera-mode-map "/" 'vera-electric-slash)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Menu
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment