From: Mario Lang Date: Thu, 5 Jun 2014 13:40:54 +0000 (+0200) Subject: * woman.el (woman-mapcan): Remove. X-Git-Tag: emacs-25.0.90~2612^2~709^2~773 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a1d799c25e4ad96dd2303ef2daa6cb51b5a0fe01;p=emacs.git * woman.el (woman-mapcan): Remove. (woman-parse-colon-path): Use cl-mapcan instead. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 90cfedceb85..f5273a66659 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-06-05 Mario Lang + + * woman.el (woman-mapcan): Remove. + (woman-parse-colon-path): Use cl-mapcan instead. + 2014-06-03 Rüdiger Sonderfeld * register.el: Add link to Emacs manual in Commentary. diff --git a/lisp/woman.el b/lisp/woman.el index 88510517b25..2dda211200d 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -414,18 +414,12 @@ (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. @@ -440,7 +434,7 @@ As a special case, if PATHS is nil then replace it by calling (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) @@ -451,14 +445,14 @@ As a special case, if PATHS is nil then replace it by calling (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 "")))))