changeset 54301:7caa4944980e

(woman-man.conf-path): Doc fix. (woman-parse-man.conf): Also parse OPTIONAL_MANPATH. (Suggested by Stefan Reich <xsteve@nit.at>.)
author Eli Zaretskii <eliz@gnu.org>
date Sun, 07 Mar 2004 14:53:07 +0000
parents fff15d96b375
children d1f246b2c535
files lisp/woman.el
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/woman.el	Sun Mar 07 12:46:01 2004 +0000
+++ b/lisp/woman.el	Sun Mar 07 14:53:07 2004 +0000
@@ -539,9 +539,9 @@
 	(mapcar 'woman-Cyg-to-Win path)
       path))
   "*List of dirs to search and/or files to try for man config file.
-A trailing separator (`/' for UNIX etc.) on directories is optional
-and the filename used if a directory is specified is the first to
-match the regexp \"man.*\\.conf\".
+A trailing separator (`/' for UNIX etc.) on directories is optional,
+and the filename is used if a directory specified is the first to
+contain the strings \"man\" and \".conf\" (in that order).
 If MANPATH is not set but a config file is found then it is parsed
 instead to provide a default value for `woman-manpath'."
   :type '(repeat string)
@@ -554,7 +554,9 @@
 Concatenate data from all lines in the config file of the form
   MANPATH  /usr/man
 or
-  MANDATORY_MANPATH  /usr/man"
+  MANDATORY_MANPATH  /usr/man
+or
+  OPTIONAL_MANPATH  /usr/man"
   ;; Functionality suggested by Charles Curley.
   (let ((path woman-man.conf-path)
 	file manpath)
@@ -574,7 +576,7 @@
 		    (while (re-search-forward
 			    ;; `\(?: ... \)' is a "shy group"
 			    "\
-^[ \t]*\\(?:MANDATORY_\\)?MANPATH[ \t]+\\(\\S-+\\)" nil t)
+^[ \t]*\\(?:MANDATORY_\\|OPTIONAL_\\)?MANPATH[ \t]+\\(\\S-+\\)" nil t)
 		      (setq manpath (cons (match-string 1) manpath)))
 		    manpath))
 		 ))