Function: woman-manpath-add-locales
woman-manpath-add-locales is a byte-compiled function defined in
woman.el.gz.
Signature
(woman-manpath-add-locales MANPATH)
Documentation
Add locale-specific subdirectories to the elements of MANPATH.
MANPATH is a list of the form of woman-manpath. Returns a list
with those locale-specific subdirectories specified by the action
of woman-expand-locale on woman-locale added, where they exist.
Source Code
;; Defined in /usr/src/emacs/lisp/woman.el.gz
(defun woman-manpath-add-locales (manpath)
"Add locale-specific subdirectories to the elements of MANPATH.
MANPATH is a list of the form of `woman-manpath'. Returns a list
with those locale-specific subdirectories specified by the action
of `woman-expand-locale' on `woman-locale' added, where they exist."
(if (zerop (length woman-locale))
manpath
(let ((subdirs (woman-expand-locale woman-locale))
lst dir)
(dolist (elem manpath (nreverse lst))
(dolist (sub subdirs)
(when (file-directory-p
(setq dir
;; Use f-n-a-d because parse-colon-path does.
(file-name-as-directory
(expand-file-name sub (substitute-in-file-name
(if (consp elem)
(cdr elem)
elem))))))
(cl-pushnew (if (consp elem)
(cons (car elem) dir)
dir)
lst :test #'equal)))
;; Non-locale-specific has lowest precedence.
(cl-pushnew elem lst :test #'equal)))))