# HG changeset patch # User Eli Zaretskii # Date 1078671187 0 # Node ID 7caa4944980e0e2afe35c538bcdb642c81f7dd94 # Parent fff15d96b3755ec59d51197cdcbb723d86718a37 (woman-man.conf-path): Doc fix. (woman-parse-man.conf): Also parse OPTIONAL_MANPATH. (Suggested by Stefan Reich .) diff -r fff15d96b375 -r 7caa4944980e lisp/woman.el --- 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)) ))