;;; woman.el --- browse UN*X manual pages `wo (without) man'
-;; Copyright (C) 2000-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2015 Free Software Foundation, Inc.
;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk>
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: help, unix
;; Adapted-By: Eli Zaretskii <eliz@gnu.org>
;; Version: 0.551
(substring arg 0 (match-end 1))
arg))))
+(require 'cl-lib)
+
(eval-when-compile ; to avoid compiler warnings
(require 'dired)
- (require 'cl-lib)
(require 'apropos))
-(defun woman-mapcan (fn x)
- "Return concatenated list of FN applied to successive `car' elements of X.
-FN must return a list, cons or nil. Useful for splicing into a list."
- ;; Based on the Standard Lisp function MAPCAN but with args swapped!
- ;; More concise implementation than the recursive one. -- dak
- (apply #'nconc (mapcar fn x)))
-
(defun woman-parse-colon-path (paths)
"Explode search path string PATHS into a list of directory names.
Allow Cygwin colon-separated search paths on Microsoft platforms.
(mapcar 'woman-Cyg-to-Win (woman-parse-man.conf)))
((string-match-p ";" paths)
;; Assume DOS-style path-list...
- (woman-mapcan ; splice list into list
+ (cl-mapcan ; splice list into list
(lambda (x)
(if x
(list x)
(list paths))
(t
;; Assume UNIX/Cygwin-style path-list...
- (woman-mapcan ; splice list into list
+ (cl-mapcan ; splice list into list
(lambda (x)
(mapcar 'woman-Cyg-to-Win
(if x (list x) (woman-parse-man.conf))))
(let ((path-separator ":"))
(parse-colon-path paths)))))
;; Assume host-default-style path-list...
- (woman-mapcan ; splice list into list
+ (cl-mapcan ; splice list into list
(lambda (x) (if x (list x) (woman-parse-man.conf)))
(parse-colon-path (or paths "")))))