-If the platform is Microsoft Windows and no path contains `\\' then
-assume a Cygwin-style colon-separated search path and convert any
-leading drive specifier `//X/' to `X:', otherwise assume paths
-separated by `path-separator'."
- ;; Based on a suggestion by Jari Aalto.
- (woman-mapcan ; splice into list...
- (lambda (path)
- ;; parse-colon-path returns nil for a null path component and
- ;; an empty substring of MANPATH denotes the default list...
- (if path (cons path nil) (woman-parse-man.conf)))
- (if (and (memq system-type '(windows-nt ms-dos))
- (not (or (string-match ";" cd-path)
- (string-match "\\\\" cd-path))))
- (let ((path-separator ":"))
- (mapcar
- (lambda (path) ; //a/b -> a:/b
- (cond ((and path (string-match "\\`//./" path))
- (setq path (substring path 1)) ; //a/b -> /a/b
- (aset path 0 (aref path 1)) ; /a/b -> aa/b
- (aset path 1 ?:) ; aa/b -> a:/b
- ))
- path)
- (parse-colon-path cd-path)))
- (parse-colon-path cd-path))))
+Replace null components by calling `woman-parse-man.conf'.
+Allow UN*X-style search paths on Microsoft platforms, i.e. allow path
+elements to be separated by colons and convert Cygwin-style drive
+specifiers `//x/' to `x:'."
+ ;; Based on suggestions by Jari Aalto and Eli Zaretskii.
+ (mapcar
+ (lambda (path) ; //a/b -> a:/b
+ (when (and path (string-match "\\`//./" path))
+ (setq path (substring path 1)) ; //a/b -> /a/b
+ (aset path 0 (aref path 1)) ; /a/b -> aa/b
+ (aset path 1 ?:)) ; aa/b -> a:/b
+ path)
+ (woman-mapcan ; splice into list...
+ (lambda (path)
+ ;; parse-colon-path returns nil for a null path component and
+ ;; an empty substring of MANPATH denotes the default list...
+ (if path (list path) (woman-parse-man.conf)))
+ (if (and (memq system-type '(windows-nt ms-dos))
+ (not (string-match ";" cd-path)))
+ (let ((path-separator ":"))
+ (parse-colon-path cd-path))
+ (parse-colon-path cd-path)))))