all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Do we still need `woman-mapcan'?
@ 2014-06-03 17:27 Mario Lang
  2014-06-03 20:35 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Lang @ 2014-06-03 17:27 UTC (permalink / raw)
  To: emacs-devel

Hi.

Or do we want to kill it in favour of `cl-mapcan'?  Besides, the comment is lying,
there are no swapped args anywhere.

--- 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 "")))))
 

-- 
CYa,
  ⡍⠁⠗⠊⠕



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Do we still need `woman-mapcan'?
  2014-06-03 17:27 Do we still need `woman-mapcan'? Mario Lang
@ 2014-06-03 20:35 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-06-03 20:35 UTC (permalink / raw)
  To: Mario Lang; +Cc: emacs-devel

> Or do we want to kill it in favour of `cl-mapcan'?

Indeed, we do, thanks,


        Stefan



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-03 20:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-03 17:27 Do we still need `woman-mapcan'? Mario Lang
2014-06-03 20:35 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.