changeset 88332:2a74a9280eba

(rmail-edit-map): Initialize at definition. Doc String.
author Henrik Enberg <henrik.enberg@telia.com>
date Thu, 09 Mar 2006 22:53:18 +0000
parents 87edb010d368
children 46c7a7f6d451
files lisp/mail/rmailedit.el
diffstat 1 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailedit.el	Thu Mar 09 02:16:39 2006 +0000
+++ b/lisp/mail/rmailedit.el	Thu Mar 09 22:53:18 2006 +0000
@@ -40,14 +40,13 @@
 
 (defvar rmail-old-text)
 
-(defvar rmail-edit-map nil)
-(if rmail-edit-map
-    nil
-  ;; Make a keymap that inherits text-mode-map.
-  (setq rmail-edit-map (make-sparse-keymap))
-  (set-keymap-parent rmail-edit-map text-mode-map)
-  (define-key rmail-edit-map "\C-c\C-c" 'rmail-cease-edit)
-  (define-key rmail-edit-map "\C-c\C-]" 'rmail-abort-edit))
+(defvar rmail-edit-map
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map text-mode-map)
+    (define-key map "\C-c\C-c" 'rmail-cease-edit)
+    (define-key map "\C-c\C-]" 'rmail-abort-edit)
+    map)
+  "Keymap for `rmail-edit-mode'.")
 
 ;; Rmail Edit mode is suitable only for specially formatted data.
 (put 'rmail-edit-mode 'mode-class 'special)
@@ -90,7 +89,6 @@
   (setq rmail-old-pruned (rmail-msg-is-pruned))
   (make-local-variable 'rmail-edit-saved-coding-system)
   (setq rmail-edit-saved-coding-system save-buffer-coding-system)
-  ;; (rmail-toggle-header 0)
   (rmail-header-show-headers)
   (rmail-edit-mode)
   ;; As the local value of save-buffer-coding-system is deleted by