changeset 81994:10d258c6090d

(vera-mode-map): Move initialization into declaration.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 20 Jul 2007 04:48:30 +0000
parents 83f3a5b8e58f
children 389e3d7783aa
files lisp/ChangeLog lisp/progmodes/vera-mode.el
diffstat 2 files changed, 31 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Jul 20 04:11:14 2007 +0000
+++ b/lisp/ChangeLog	Fri Jul 20 04:48:30 2007 +0000
@@ -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.
--- a/lisp/progmodes/vera-mode.el	Fri Jul 20 04:11:14 2007 +0000
+++ b/lisp/progmodes/vera-mode.el	Fri Jul 20 04:48:30 2007 +0000
@@ -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 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; 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