Replace a use of eval-after-load
authorGlenn Morris <rgm@gnu.org>
Mon, 16 Apr 2012 18:46:46 +0000 (14:46 -0400)
committerGlenn Morris <rgm@gnu.org>
Mon, 16 Apr 2012 18:46:46 +0000 (14:46 -0400)
* lisp/woman.el: Remove eval-after-load for tar-mode.

* lisp/tar-mode.el (tar-mode-map): Add woman binding and menu entry.
(woman-tar-extract-file): Autoload it.

lisp/ChangeLog
lisp/tar-mode.el
lisp/woman.el

index 97d626f..ee34ce1 100644 (file)
@@ -1,5 +1,9 @@
 2012-04-16  Glenn Morris  <rgm@gnu.org>
 
+       * woman.el: Remove eval-after-load for tar-mode.
+       * tar-mode.el (tar-mode-map): Add woman binding and menu entry.
+       (woman-tar-extract-file): Autoload it.
+
        * frame.el (automatic-hscrolling): Make this alias obsolete.
 
 2012-04-12  Agustín Martín Domingo  <agustin.martin@hispalinux.es>
index 3eb2be1..7c95f47 100644 (file)
@@ -549,6 +549,7 @@ MODE should be an integer which is a file mode value."
     (define-key map "R" 'tar-rename-entry)
     (define-key map "u" 'tar-unflag)
     (define-key map "v" 'tar-view)
+    (define-key map "w" 'woman-tar-extract-file)
     (define-key map "x" 'tar-expunge)
     (define-key map "\177" 'tar-unflag-backwards)
     (define-key map "E" 'tar-extract-other-window)
@@ -566,6 +567,8 @@ MODE should be an integer which is a file mode value."
     (define-key map [menu-bar immediate]
       (cons "Immediate" (make-sparse-keymap "Immediate")))
 
+    (define-key map [menu-bar immediate woman]
+      '("Read Man Page (WoMan)" . woman-tar-extract-file))
     (define-key map [menu-bar immediate view]
       '("View This File" . tar-view))
     (define-key map [menu-bar immediate display]
@@ -677,6 +680,8 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'.
      (fundamental-mode)
      (signal (car err) (cdr err)))))
 
+(autoload 'woman-tar-extract-file "woman"
+  "In tar mode, run the WoMan man-page browser on this file." t)
 
 (define-minor-mode tar-subfile-mode
   "Minor mode for editing an element of a tar-file.
index c76399a..98ab277 100644 (file)
@@ -1,6 +1,6 @@
 ;;; woman.el --- browse UN*X manual pages `wo (without) man'
 
-;; Copyright (C) 2000-2012  Free Software Foundation, Inc.
+;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
 
 ;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk>
 ;; Maintainer: FSF
@@ -1595,14 +1595,6 @@ Also make each path-info component into a list.
       (woman-process-buffer)
       (goto-char (point-min)))))
 
-;; There is currently no `tar-mode-hook' so use ...
-(eval-after-load "tar-mode"
-  '(progn
-    (define-key tar-mode-map "w" 'woman-tar-extract-file)
-    (define-key-after (lookup-key tar-mode-map [menu-bar immediate])
-      [woman] '("Read Man Page (WoMan)" . woman-tar-extract-file) 'view)))
-
-
 (defvar woman-last-file-name nil
   "The full pathname of the last file formatted by WoMan.")