]> code.delx.au - gnu-emacs/blobdiff - lisp/man.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / man.el
index a61524b890c8e0ac6947f203564fdaa393cd4028..5acf90baf2814e8296147d1aa9ce3c95c4190e26 100644 (file)
@@ -1,6 +1,7 @@
-;;; man.el --- browse UNIX manual pages  -*- coding: utf-8 -*-
+;;; man.el --- browse UNIX manual pages
 
-;; Copyright (C) 1993-1994, 1996-1997, 2001-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 1996-1997, 2001-2016 Free Software
+;; Foundation, Inc.
 
 ;; Author: Barry A. Warsaw <bwarsaw@cen.com>
 ;; Maintainer: emacs-devel@gnu.org
@@ -74,7 +75,7 @@
 ;; ============= TODO ===========
 ;; - Add a command for printing.
 ;; - The awk script deletes multiple blank lines.  This behavior does
-;;   not allow to understand if there was indeed a blank line at the
+;;   not allow one to understand if there was indeed a blank line at the
 ;;   end or beginning of a page (after the header, or before the
 ;;   footer).  A different algorithm should be used.  It is easy to
 ;;   compute how many blank lines there are before and after the page
   "Manpage cleaning filter command phrases.
 This variable contains a list of the following form:
 
-'((command-string phrase-string*)*)
+  ((command-string phrase-string*)*)
 
 Each phrase-string is concatenated onto the command-string to form a
 command filter.  The (standard) output (and standard error) of the Un*x
@@ -183,7 +184,9 @@ The value also can be a positive integer for a fixed width."
 
 (defcustom Man-frame-parameters nil
   "Frame parameter list for creating a new frame for a manual page."
-  :type 'sexp
+  :type '(repeat (cons :format "%v"
+                      (symbol :tag "Parameter")
+                      (sexp :tag "Value")))
   :group 'man)
 
 (defcustom Man-downcase-section-letters-flag t
@@ -310,7 +313,7 @@ This regular expression should start with a `^' character.")
   "Regular expression describing a reference to another manpage.")
 
 (defvar Man-apropos-regexp
-  (concat "\\\[\\(" Man-name-regexp "\\)\\\][ \t]*(\\(" Man-section-regexp "\\))")
+  (concat "\\[\\(" Man-name-regexp "\\)\\][ \t]*(\\(" Man-section-regexp "\\))")
   "Regular expression describing a reference to manpages in \"man -k output\".")
 
 (defvar Man-synopsis-regexp "SYNOPSIS"
@@ -616,7 +619,7 @@ This is necessary if one wants to dump man.el with Emacs."
                           ;; `call-process' below sends it to /dev/null,
                           ;; so we don't need `2>' even with DOS shells
                           ;; which do support stderr redirection.
-                          ((not (fboundp 'start-process)) " %s")
+                          ((not (fboundp 'make-process)) " %s")
                           ((concat " %s 2>" null-device)))))
        (flist Man-filter-list))
     (while (and flist (car flist))
@@ -746,7 +749,8 @@ POS defaults to `point'."
          ;; Record the distance traveled.
          (setq distance (- column (current-column)))
          (when (looking-back
-                (concat "([ \t]*\\(?:" Man-section-regexp "\\)[ \t]*)"))
+                (concat "([ \t]*\\(?:" Man-section-regexp "\\)[ \t]*)")
+                 (line-beginning-position))
            ;; Skip section number backwards.
            (goto-char (match-beginning 0))
            (skip-chars-backward " \t"))
@@ -960,7 +964,7 @@ otherwise look like a page name.
 
 An \"apropos\" query with -k gives a buffer of matching page
 names or descriptions.  The pattern argument is usually an
-\"egrep\" style regexp.
+\"grep -E\" style regexp.
 
     -k pattern"
 
@@ -1076,7 +1080,7 @@ Return the buffer in which the manpage will appear."
                                        "[cleaning...]")
                                      'face 'mode-line-emphasis)))
        (Man-start-calling
-        (if (fboundp 'start-process)
+        (if (fboundp 'make-process)
             (let ((proc (start-process
                          manual-program buffer
                          (if (memq system-type '(cygwin windows-nt))