(woman-mode-map, woman-syntax-table): Initialize in the declaration.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 10 Sep 2007 03:22:12 +0000 (03:22 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 10 Sep 2007 03:22:12 +0000 (03:22 +0000)
lisp/ChangeLog
lisp/woman.el

index d69550b..4c9d527 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * woman.el (woman-mode-map, woman-syntax-table):
+       Initialize in the declaration.
+
 2007-09-09  Tassilo Horn  <tassilo@member.fsf.org>
 
        * doc-view.el: New file.
 
 2007-09-08  Masatake YAMATO  <jet@gyve.org>
 
-       * progmodes/which-func.el (which-func-modes): Added diff-mode.
+       * progmodes/which-func.el (which-func-modes): Add diff-mode.
 
        * progmodes/cc-langs.el: Support new keywords added to
        objective-c frontend of gcc.
-       (c-simple-stmt-kwds): Added @throw.
-       (c-block-stmt-2-kwds): Added @synchronized.
-       (c-block-stmt-1-kwds): Added @finally and @try.
+       (c-simple-stmt-kwds): Add @throw.
+       (c-block-stmt-2-kwds): Add @synchronized.
+       (c-block-stmt-1-kwds): Add @finally and @try.
 
 2007-09-07  Carsten Dominik  <dominik@science.uva.nl>
 
-       * textmodes/org.el: (org-edit-timestamp-down-means-later): New
-       option.
+       * textmodes/org.el: (org-edit-timestamp-down-means-later): New option.
        (org-agenda-after-show-hook): New variable.
        (org-columns-compile-format)
        (org-columns-get-autowidth-alist, org-buffer-property-keys)
index b5fd22f..10cf609 100644 (file)
@@ -1761,21 +1761,21 @@ Leave point at end of new text.  Return length of inserted text."
 \f
 ;;; Major mode (Man) interface:
 
-(defvar woman-mode-map nil "Keymap for woman mode.")
-
-(unless woman-mode-map
-  (setq woman-mode-map (make-sparse-keymap))
-  (set-keymap-parent woman-mode-map Man-mode-map)
-
-  (define-key woman-mode-map "R" 'woman-reformat-last-file)
-  (define-key woman-mode-map "w" 'woman)
-  (define-key woman-mode-map "\en" 'WoMan-next-manpage)
-  (define-key woman-mode-map "\ep" 'WoMan-previous-manpage)
-  (define-key woman-mode-map [M-mouse-2] 'woman-follow-word)
-
-  ;; We don't need to call `man' when we are in `woman-mode'.
-  (define-key woman-mode-map [remap man] 'woman)
-  (define-key woman-mode-map [remap man-follow] 'woman-follow))
+(defvar woman-mode-map
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map Man-mode-map)
+
+    (define-key map "R" 'woman-reformat-last-file)
+    (define-key map "w" 'woman)
+    (define-key map "\en" 'WoMan-next-manpage)
+    (define-key map "\ep" 'WoMan-previous-manpage)
+    (define-key map [M-mouse-2] 'woman-follow-word)
+
+    ;; We don't need to call `man' when we are in `woman-mode'.
+    (define-key map [remap man] 'woman)
+    (define-key map [remap man-follow] 'woman-follow)
+    map)
+  "Keymap for woman mode.")
 
 (defun woman-follow (topic)
   "Get a Un*x manual page of the item under point and put it in a buffer."
@@ -2083,17 +2083,14 @@ alist in `woman-buffer-alist' and return nil."
   (char-to-string woman-unpadded-space-char)
   "Internal string representation of unpadded space characters.")
 
-(defvar woman-syntax-table nil
+(defvar woman-syntax-table
+  (let ((st (make-syntax-table)))
+    ;; The following internal chars must NOT have whitespace syntax:
+    (modify-syntax-entry woman-unpadded-space-char "." st)
+    (modify-syntax-entry woman-escaped-escape-char "." st)
+    st)
   "Syntax table to support special characters used internally by WoMan.")
 
-(if woman-syntax-table
-    ()
-  (setq woman-syntax-table (make-syntax-table))
-  ;; The following internal chars must NOT have whitespace syntax:
-  (modify-syntax-entry woman-unpadded-space-char "." woman-syntax-table)
-  (modify-syntax-entry woman-escaped-escape-char "." woman-syntax-table)
-  )
-
 (defun woman-set-buffer-display-table ()
   "Set up a display table for a WoMan buffer.
 This display table is used for displaying internal special characters, but