changeset 85862:9e1be56af44a

remember.el (remember-mode-map): Define and initialize in one step.
author Michael Olson <mwolson@gnu.org>
date Thu, 01 Nov 2007 04:40:55 +0000
parents 70f347d257ec
children f5b982bf98e0
files lisp/ChangeLog lisp/textmodes/remember.el
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Nov 01 04:37:47 2007 +0000
+++ b/lisp/ChangeLog	Thu Nov 01 04:40:55 2007 +0000
@@ -10,6 +10,7 @@
 	remember-buffer to emphasize that this does not have any
 	functional overlap with the `remember' function.
 	(remember-destroy): Remove autoload cookie.
+	(remember-mode-map): Define and initialize in one step.
 
 2007-11-01  Glenn Morris  <rgm@gnu.org>
 
--- a/lisp/textmodes/remember.el	Thu Nov 01 04:37:47 2007 +0000
+++ b/lisp/textmodes/remember.el	Thu Nov 01 04:40:55 2007 +0000
@@ -452,13 +452,12 @@
 
 ;;; Internal Functions:
 
-(defvar remember-mode-map ()
+(defvar remember-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\C-x\C-s" 'remember-finalize)
+    (define-key map "\C-c\C-c" 'remember-finalize)
+    (define-key map "\C-c\C-k" 'remember-destroy))
   "Keymap used in Remember mode.")
-(when (not remember-mode-map)
-  (setq remember-mode-map (make-sparse-keymap))
-  (define-key remember-mode-map "\C-x\C-s" 'remember-finalize)
-  (define-key remember-mode-map "\C-c\C-c" 'remember-finalize)
-  (define-key remember-mode-map "\C-c\C-k" 'remember-destroy))
 
 (defun remember-mode ()
   "Major mode for output from \\[remember].