From: Glenn Morris Date: Mon, 16 Apr 2012 18:46:46 +0000 (-0400) Subject: Replace a use of eval-after-load X-Git-Tag: emacs-24.2.90~471^2~352^2~28 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6b955486f5d3527479536b760a926ecea0447a80;p=emacs.git Replace a use of eval-after-load * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 97d626f9505..ee34ce1827e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2012-04-16 Glenn Morris + * 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 diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 3eb2be15698..7c95f47e0fb 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -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. diff --git a/lisp/woman.el b/lisp/woman.el index c76399a96e5..98ab27716a1 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -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 ;; 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.")