]> code.delx.au - gnu-emacs/blobdiff - lisp/man.el
Doc fix.
[gnu-emacs] / lisp / man.el
index 790c8a0c1bd1ebd3bfb9cdf13235227809ab5ee6..6461f3f24477abf02d27a418ef8399e12650731b 100644 (file)
@@ -1,11 +1,15 @@
-;; Read in and display parts of Unix manual.
+;;; man.el --- read in and display parts of Unix manual.
+
 ;; Copyright (C) 1985, 1986 Free Software Foundation, Inc.
 
+;; Maintainer: FSF
+;; Keywords: unix
+
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 1, or (at your option)
+;; the Free Software Foundation; either version 2, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; along with GNU Emacs; see the file COPYING.  If not, write to
 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 
+;;; Commentary:
+
+;; This package provides an equivalent of the UNIX man(1) command within
+;; Emacs.  The single entry point is `manual-entry'.
+
+;;; Code:
+
 ;;;###autoload
 (defun manual-entry (topic &optional section)
   "Display the Unix manual entry for TOPIC.
@@ -105,8 +116,9 @@ where SECTION is the desired section of the manual, as in \"tty(4)\"."
       ;; Put START and END around footer and header and garbage blank lines.
       ;; Fixed line counts are risky, but allow us to preserve
       ;; significant blank lines.
-      (setq start (save-excursion (forward-line -10) (point)))
-      (setq end (save-excursion (forward-line 4) (point)))
+      ;; These numbers are correct for MORE BSD, at least.
+      (setq start (save-excursion (forward-line -9) (point)))
+      (setq end (save-excursion (forward-line 3) (point)))
       (delete-region start end)))
   ;; Catch the final footer.
   (goto-char (point-max))
@@ -165,3 +177,5 @@ where SECTION is the desired section of the manual, as in \"tty(4)\"."
     (if (equal (substring name -2) ".z")
        (call-process "pcat" nil t nil name)
       (insert-file-contents name))))
+
+;;; man.el ends here